From a2195db9aebe3b9cd8a85cae0b491c060c9c84ce Mon Sep 17 00:00:00 2001 From: Daniel Greenfeld Date: Fri, 16 Aug 2013 18:23:22 +0200 Subject: [PATCH] Customization prep --- README.rst | 5 +++++ {{cookiecutter.repo_name}}/Procfile | 1 + .../{{cookiecutter.repo_name}}/config/settings.py | 8 ++++++-- .../{{cookiecutter.repo_name}}/config/urls.py | 2 +- .../{{cookiecutter.repo_name}}/templates/base.html | 6 +++++- 5 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 {{cookiecutter.repo_name}}/Procfile diff --git a/README.rst b/README.rst index 053d9cc9..e55ca506 100644 --- a/README.rst +++ b/README.rst @@ -30,3 +30,8 @@ Using this template $ pip install cookiecutter $ cookiecutter https://github.com/sloria/cookiecutter-dj-project.git + +"Your Stuff" +------------- + +Scattered throughout the Python and HTML of this project are places marked with "your stuff". This is where third-party libraries are to be integrated with your project. \ No newline at end of file diff --git a/{{cookiecutter.repo_name}}/Procfile b/{{cookiecutter.repo_name}}/Procfile new file mode 100644 index 00000000..0a678489 --- /dev/null +++ b/{{cookiecutter.repo_name}}/Procfile @@ -0,0 +1 @@ +web: python {{cookiecutter.repo_name}}/manage.py run_gunicorn --settings=config.settings -b "0.0.0.0:$PORT" -w 3 \ No newline at end of file diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/settings.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/settings.py index 6072c30c..17d3d5d3 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/settings.py +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/settings.py @@ -141,6 +141,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( 'django.core.context_processors.tz', 'django.contrib.messages.context_processors.messages', 'django.core.context_processors.request', + # Your stuff: custom template context processers go here ) @@ -182,7 +183,7 @@ THIRD_PARTY_APPS = ( # Apps specific for this project go here. LOCAL_APPS = ( 'users', # custom users app - # Your custom apps go here + # Your stuff: custom apps go here ) # See: https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps @@ -206,7 +207,6 @@ WSGI_APPLICATION = 'config.wsgi.application' ########## End URL Configuration ########## django-secure - INSTALLED_APPS += ("djangosecure", ) # set this to 60 seconds and then to 518400 when you can prove it works @@ -349,3 +349,7 @@ LOGGING = { } } ########## END LOGGING CONFIGURATION + + +########## Your stuff: Below this line define 3rd party libary settings + diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/urls.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/urls.py index d9b2ead2..c85e2591 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/urls.py +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/urls.py @@ -28,7 +28,7 @@ urlpatterns = patterns('', # Uncomment the next line to enable avatars #url(r'^avatar/', include('avatar.urls')), - # Your custom urls go here + # Your stuff: custom urls go here ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html index 752eaf73..0b3324b4 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html @@ -16,6 +16,8 @@ + + {% endblock %} @@ -67,7 +69,9 @@ {% block javascript %} - + +