75 |
Server error :(
76 |
Sorry, but there seems to be a technical problem with the page you are trying to view.
77 |
Our support team has been informed and will try to fix the problem as soon as possible.
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/{{ cookiecutter.repo_name }}/setup.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 | import os
4 | from codecs import open
5 |
6 | from setuptools import find_packages, setup
7 |
8 | BASE_DIR = os.path.dirname(os.path.abspath(__file__))
9 |
10 |
11 | def read(*paths):
12 | """Build a file path from *paths and return the contents."""
13 | with open(os.path.join(*paths), 'r', 'utf-8') as f:
14 | return f.read()
15 |
16 | extras_require = {
17 | 'mailgun': [
18 | 'django-mailgun==0.8.0',
19 | ],
20 | 'raven': [
21 | 'raven==5.8.1',
22 | ],
23 | }
24 |
25 | requires = [
26 | 'Django==1.8.7',
27 | 'dj-database-url==0.3.0',
28 | 'django-braces==1.8.1',
29 | 'django-configurations==1.0',
30 | 'django-crispy-forms==1.5.2',
31 | 'django-grappelli==2.7.2',
32 | 'django-model-utils==2.4',
33 | 'envdir==0.7',
34 | 'psycopg2==2.6.1',
35 | 'pytz==2015.7',
36 | 'rules==1.1.1',
37 | ]
38 |
39 | setup(
40 | name='{{ cookiecutter.pkg_name }}',
41 | version='{{ cookiecutter.version }}',
42 | description='{{ cookiecutter.description }}',
43 | long_description=read(BASE_DIR, 'README.rst'),
44 | author='{{ cookiecutter.author_name }}',
45 | author_email='{{ cookiecutter.email }}',
46 | packages=find_packages(),
47 | include_package_data=True,
48 | scripts=['manage.py'],
49 | install_requires=requires,
50 | license='{{ cookiecutter.license }}',
51 | zip_safe=False,
52 | classifiers=[
53 | 'Framework :: Django',
54 | 'Intended Audience :: Developers',
55 | {% if cookiecutter.license|lower == 'bsd' -%}
56 | 'License :: OSI Approved :: BSD License',
57 | {%- endif %}
58 | 'Natural Language :: English',
59 | 'Operating System :: OS Independent',
60 | 'Programming Language :: Python',
61 | 'Programming Language :: Python :: 2',
62 | 'Programming Language :: Python :: 2.7',
63 | 'Programming Language :: Python :: 3',
64 | 'Programming Language :: Python :: 3.5',
65 | 'Programming Language :: Python :: Implementation :: CPython',
66 | ],
67 | )
68 |
--------------------------------------------------------------------------------
/{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/config/settings/public.py:
--------------------------------------------------------------------------------
1 | from configurations import values
2 |
3 | from . import common, databases, email
4 | from .. import __version__
5 |
6 |
7 | class Raven(object):
8 | """Report uncaught exceptions to the Sentry server."""
9 |
10 | INSTALLED_APPS = common.Common.INSTALLED_APPS + ('raven.contrib.django.raven_compat',)
11 |
12 | RAVEN_CONFIG = {
13 | 'dsn': values.URLValue(environ_name='RAVEN_CONFIG_DSN'),
14 | 'release': __version__,
15 | }
16 |
17 |
18 | class Sentry404(Raven):
19 | """Log 404 events to the Sentry server."""
20 |
21 | MIDDLEWARE_CLASSES = values.ListValue([
22 | 'raven.contrib.django.raven_compat.middleware.Sentry404CatchMiddleware',
23 | ].append(common.Common.MIDDLEWARE_CLASSES))
24 |
25 |
26 | class Public(email.Email, databases.Databases, common.Common):
27 | """General settings for all public servers."""
28 |
29 | CSRF_COOKIE_HTTPONLY = True
30 |
31 | SECRET_KEY = values.SecretValue()
32 |
33 | SECURE_BROWSER_XSS_FILTER = True
34 |
35 | SECURE_CONTENT_TYPE_NOSNIFF = True
36 |
37 | SILENCED_SYSTEM_CHECKS = values.ListValue([])
38 |
39 | X_FRAME_OPTIONS = 'DENY'
40 |
41 |
42 | class SSL(object):
43 | """Default settings for SSL-enabled servers.
44 |
45 | Please read Django's SSL/HTTPS documentation and modify this configuration
46 | as needed. Be advised that the default settings will not work with all web
47 | servers.
48 | """
49 |
50 | CSRF_COOKIE_SECURE = values.BooleanValue(True)
51 |
52 | SECURE_HSTS_INCLUDE_SUBDOMAINS = values.BooleanValue(True)
53 |
54 | SECURE_HSTS_SECONDS = values. IntegerValue(3600)
55 |
56 | SECURE_PROXY_SSL_HEADER = values.TupleValue(None)
57 |
58 | SECURE_REDIRECT_EXEMPT = values.ListValue([])
59 |
60 | SECURE_SSL_HOST = values.Value('{{ cookiecutter.domain }}')
61 |
62 | SECURE_SSL_REDIRECT = values.BooleanValue(True)
63 |
64 | SESSION_COOKIE_SECURE = values.BooleanValue(True)
65 |
66 |
67 | class Staging(Public):
68 | """Settings for staging servers."""
69 |
70 | pass
71 |
72 |
73 | class Production(Public, SSL):
74 | """Settings for production servers."""
75 |
76 | pass
77 |
--------------------------------------------------------------------------------
/CONTRIBUTING.rst:
--------------------------------------------------------------------------------
1 | ************
2 | Contributing
3 | ************
4 |
5 | Contributions are welcome, and they are greatly appreciated! Every little bit
6 | 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 the `GitHub issue tracker
17 |