Skip to content

Commit 37e0c97

Browse files
committed
kickstart using cookiecutter-djangopackage
0 parents  commit 37e0c97

35 files changed

+1318
-0
lines changed

.coveragerc

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[run]
2+
branch = true
3+
4+
[report]
5+
omit =
6+
*site-packages*
7+
*tests*
8+
*.tox*
9+
show_missing = True
10+
exclude_lines =
11+
raise NotImplementedError

.editorconfig

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.{py,rst,ini}]
12+
indent_style = space
13+
indent_size = 4
14+
15+
[*.{html,css,scss,json,yml}]
16+
indent_style = space
17+
indent_size = 2
18+
19+
[*.md]
20+
trim_trailing_whitespace = false
21+
22+
[Makefile]
23+
indent_style = tab

.github/ISSUE_TEMPLATE.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
* Django Panpub version:
2+
* Django version:
3+
* Python version:
4+
* Operating System:
5+
6+
### Description
7+
8+
Describe what you were trying to get done.
9+
Tell us what happened, what went wrong, and what you expected to happen.
10+
11+
### What I Did
12+
13+
```
14+
Paste the command(s) you ran and the output.
15+
If there was a crash, please include the traceback here.
16+
```

.gitignore

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
*.py[cod]
2+
__pycache__
3+
4+
# C extensions
5+
*.so
6+
7+
# Packages
8+
*.egg
9+
*.egg-info
10+
dist
11+
build
12+
eggs
13+
parts
14+
bin
15+
var
16+
sdist
17+
develop-eggs
18+
.installed.cfg
19+
lib
20+
lib64
21+
22+
# Installer logs
23+
pip-log.txt
24+
25+
# Unit test / coverage reports
26+
.coverage
27+
.tox
28+
nosetests.xml
29+
htmlcov
30+
31+
# Translations
32+
*.mo
33+
34+
# Mr Developer
35+
.mr.developer.cfg
36+
.project
37+
.pydevproject
38+
39+
# Pycharm/Intellij
40+
.idea
41+
42+
# Complexity
43+
output/*.html
44+
output/*/index.html
45+
46+
# Sphinx
47+
docs/_build

.travis.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Config file for automatic testing at travis-ci.org
2+
3+
language: python
4+
5+
python:
6+
- "3.5"
7+
8+
env:
9+
- TOX_ENV=py35-django-110
10+
- TOX_ENV=py34-django-110
11+
- TOX_ENV=py27-django-110
12+
13+
matrix:
14+
fast_finish: true
15+
16+
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
17+
install: pip install -r requirements_test.txt
18+
19+
# command to run tests using coverage, e.g. python setup.py test
20+
script: tox -e $TOX_ENV
21+
22+
after_success:
23+
- codecov -e TOX_ENV

AUTHORS.rst

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
=======
2+
Credits
3+
=======
4+
5+

CONTRIBUTING.rst

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
============
2+
Contributing
3+
============
4+
5+
Contributions are welcome, and they are greatly appreciated! Every
6+
little bit helps, and credit will always be given.
7+
8+
You can contribute in many ways:
9+
10+
Types of Contributions
11+
----------------------
12+
13+
Report Bugs
14+
~~~~~~~~~~~
15+
16+
Report bugs at https://github.com/guzmud/django-panpub/issues.
17+
18+
If you are reporting a bug, please include:
19+
20+
* Your operating system name and version.
21+
* Any details about your local setup that might be helpful in troubleshooting.
22+
* Detailed steps to reproduce the bug.
23+
24+
Fix Bugs
25+
~~~~~~~~
26+
27+
Look through the GitHub issues for bugs. Anything tagged with "bug"
28+
is open to whoever wants to implement it.
29+
30+
Implement Features
31+
~~~~~~~~~~~~~~~~~~
32+
33+
Look through the GitHub issues for features. Anything tagged with "feature"
34+
is open to whoever wants to implement it.
35+
36+
Write Documentation
37+
~~~~~~~~~~~~~~~~~~~
38+
39+
Django Panpub could always use more documentation, whether as part of the
40+
official Django Panpub docs, in docstrings, or even on the web in blog posts,
41+
articles, and such.
42+
43+
Submit Feedback
44+
~~~~~~~~~~~~~~~
45+
46+
The best way to send feedback is to file an issue at https://github.com/guzmud/django-panpub/issues.
47+
48+
If you are proposing a feature:
49+
50+
* Explain in detail how it would work.
51+
* Keep the scope as narrow as possible, to make it easier to implement.
52+
* Remember that this is a volunteer-driven project, and that contributions
53+
are welcome :)
54+
55+
Get Started!
56+
------------
57+
58+
Ready to contribute? Here's how to set up `django-panpub` for local development.
59+
60+
1. Fork the `django-panpub` repo on GitHub.
61+
2. Clone your fork locally::
62+
63+
$ git clone [email protected]:your_name_here/django-panpub.git
64+
65+
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
66+
67+
$ mkvirtualenv django-panpub
68+
$ cd django-panpub/
69+
$ python setup.py develop
70+
71+
4. Create a branch for local development::
72+
73+
$ git checkout -b name-of-your-bugfix-or-feature
74+
75+
Now you can make your changes locally.
76+
77+
5. When you're done making changes, check that your changes pass flake8 and the
78+
tests, including testing other Python versions with tox::
79+
80+
$ flake8 django_panpub tests
81+
$ python setup.py test
82+
$ tox
83+
84+
To get flake8 and tox, just pip install them into your virtualenv.
85+
86+
6. Commit your changes and push your branch to GitHub::
87+
88+
$ git add .
89+
$ git commit -m "Your detailed description of your changes."
90+
$ git push origin name-of-your-bugfix-or-feature
91+
92+
7. Submit a pull request through the GitHub website.
93+
94+
Pull Request Guidelines
95+
-----------------------
96+
97+
Before you submit a pull request, check that it meets these guidelines:
98+
99+
1. The pull request should include tests.
100+
2. If the pull request adds functionality, the docs should be updated. Put
101+
your new functionality into a function with a docstring, and add the
102+
feature to the list in README.rst.
103+
3. The pull request should work for Python 2.6, 2.7, and 3.3, and for PyPy. Check
104+
https://travis-ci.org/guzmud/django-panpub/pull_requests
105+
and make sure that the tests pass for all supported Python versions.
106+
107+
Tips
108+
----
109+
110+
To run a subset of tests::
111+
112+
$ python -m unittest tests.test_django_panpub

LICENSE

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
MIT License
3+
4+
Copyright (c) 2018, guzmud (nopunkintended)
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7+
8+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9+
10+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11+
12+
13+
14+

MANIFEST.in

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
include AUTHORS.rst
2+
include CONTRIBUTING.rst
3+
include HISTORY.rst
4+
include LICENSE
5+
include README.rst
6+
recursive-include django_panpub *.html *.png *.gif *js *.css *jpg *jpeg *svg *py

Makefile

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
.PHONY: clean-pyc clean-build docs help
2+
.DEFAULT_GOAL := help
3+
define BROWSER_PYSCRIPT
4+
import os, webbrowser, sys
5+
try:
6+
from urllib import pathname2url
7+
except:
8+
from urllib.request import pathname2url
9+
10+
webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
11+
endef
12+
export BROWSER_PYSCRIPT
13+
BROWSER := python -c "$$BROWSER_PYSCRIPT"
14+
15+
help:
16+
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-25s\033[0m %s\n", $$1, $$2}'
17+
18+
clean: clean-build clean-pyc
19+
20+
clean-build: ## remove build artifacts
21+
rm -fr build/
22+
rm -fr dist/
23+
rm -fr *.egg-info
24+
25+
clean-pyc: ## remove Python file artifacts
26+
find . -name '*.pyc' -exec rm -f {} +
27+
find . -name '*.pyo' -exec rm -f {} +
28+
find . -name '*~' -exec rm -f {} +
29+
30+
lint: ## check style with flake8
31+
flake8 django_panpub tests
32+
33+
test: ## run tests quickly with the default Python
34+
python runtests.py tests
35+
36+
test-all: ## run tests on every Python version with tox
37+
tox
38+
39+
coverage: ## check code coverage quickly with the default Python
40+
coverage run --source django_panpub runtests.py tests
41+
coverage report -m
42+
coverage html
43+
open htmlcov/index.html
44+
45+
docs: ## generate Sphinx HTML documentation, including API docs
46+
rm -f docs/django-panpub.rst
47+
rm -f docs/modules.rst
48+
sphinx-apidoc -o docs/ django_panpub
49+
$(MAKE) -C docs clean
50+
$(MAKE) -C docs html
51+
$(BROWSER) docs/_build/html/index.html
52+
53+
release: clean ## package and upload a release
54+
python setup.py sdist upload
55+
python setup.py bdist_wheel upload
56+
57+
sdist: clean ## package
58+
python setup.py sdist
59+
ls -l dist

django_panpub/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = '0.1.0'

django_panpub/apps.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# -*- coding: utf-8
2+
from django.apps import AppConfig
3+
4+
5+
class DjangoPanpubConfig(AppConfig):
6+
name = 'django_panpub'

django_panpub/models.py

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# -*- coding: utf-8 -*-
2+
3+
from django.db import models
4+
5+
from model_utils.models import TimeStampedModel
6+
7+
8+
class Post(TimeStampedModel):
9+
pass
10+
11+
12+
class Text(TimeStampedModel):
13+
pass
14+
15+
16+
class Picture(TimeStampedModel):
17+
pass
18+
19+
20+
class Audio(TimeStampedModel):
21+
pass
22+
23+
24+
class Tag(TimeStampedModel):
25+
pass
26+
27+
28+

0 commit comments

Comments
 (0)