├── project_name ├── project_name │ ├── __init__.py │ ├── settings │ │ ├── test.py │ │ ├── __init__.py │ │ ├── production.py │ │ ├── local.py │ │ └── base.py │ ├── urls.py │ └── wsgi.py ├── templates │ ├── 500.html │ ├── 404.html │ └── base.html ├── static │ ├── css │ │ └── project_name.css │ ├── js │ │ ├── project_name.js │ │ └── bootstrap.min.js │ └── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.svg └── manage.py ├── requirements ├── test.txt ├── base.txt ├── local.txt └── production.txt ├── docs ├── __init__.py ├── deploy.rst ├── install.rst ├── index.rst ├── make.bat ├── Makefile └── conf.py ├── .env ├── Procfile ├── requirements.txt ├── .gitignore ├── LICENSE.txt └── README.md /project_name/project_name/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /project_name/templates/500.html: -------------------------------------------------------------------------------- 1 |

Whoops!

2 | -------------------------------------------------------------------------------- /project_name/static/css/project_name.css: -------------------------------------------------------------------------------- 1 | /*! project specific CSS goes here. */ 2 | -------------------------------------------------------------------------------- /requirements/test.txt: -------------------------------------------------------------------------------- 1 | # Test dependencies go here. 2 | -r base.txt 3 | coverage 4 | -------------------------------------------------------------------------------- /project_name/static/js/project_name.js: -------------------------------------------------------------------------------- 1 | /* Project specific Javascript goes here. */ 2 | -------------------------------------------------------------------------------- /docs/__init__.py: -------------------------------------------------------------------------------- 1 | # Included so that Django's startproject comment runs against the docs directory 2 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | export SECRET_KEY="{{ secret_key }}" 2 | export DJANGO_SETTINGS_MODULE="{{ project_name }}.settings.local" 3 | -------------------------------------------------------------------------------- /docs/deploy.rst: -------------------------------------------------------------------------------- 1 | Deploy 2 | ======== 3 | 4 | This is where you describe how the project is deployed in production. 5 | -------------------------------------------------------------------------------- /requirements/base.txt: -------------------------------------------------------------------------------- 1 | dj-database-url 2 | dj-static 3 | django-model-utils 4 | Django 5 | gunicorn 6 | psycopg2 7 | -------------------------------------------------------------------------------- /docs/install.rst: -------------------------------------------------------------------------------- 1 | Install 2 | ========= 3 | 4 | This is where you write how to get a new laptop to run this project. 5 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | # Should use gunicorn here, but static files seem to be an issue 2 | web: python {{ project_name }}/manage.py runserver 3 | -------------------------------------------------------------------------------- /requirements/local.txt: -------------------------------------------------------------------------------- 1 | # Local development dependencies go here 2 | -r test.txt 3 | bpython 4 | honcho 5 | django-debug-toolbar 6 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | # This file is here because many Platforms as a Service look for 2 | # requirements.txt in the root directory of a project. 3 | -r requirements/production.txt 4 | -------------------------------------------------------------------------------- /project_name/static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffbr13/minimum-viable-django/master/project_name/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /project_name/static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffbr13/minimum-viable-django/master/project_name/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /project_name/static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffbr13/minimum-viable-django/master/project_name/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /requirements/production.txt: -------------------------------------------------------------------------------- 1 | # Pro-tip: Try not to put anything here. There should be no dependency in 2 | # production that isn't in development. 3 | -r base.txt 4 | 5 | gunicorn==18.0 6 | -------------------------------------------------------------------------------- /project_name/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings.local") 7 | 8 | from django.core.management import execute_from_command_line 9 | 10 | execute_from_command_line(sys.argv) 11 | -------------------------------------------------------------------------------- /project_name/project_name/settings/test.py: -------------------------------------------------------------------------------- 1 | """Test environment settings.""" 2 | 3 | from .base import * 4 | 5 | ########## IN-MEMORY TEST DATABASE 6 | DATABASES = { 7 | "default": { 8 | "ENGINE": "django.db.backends.sqlite3", 9 | "NAME": ":memory:", 10 | "USER": "", 11 | "PASSWORD": "", 12 | "HOST": "", 13 | "PORT": "", 14 | }, 15 | } 16 | 17 | PASSWORD_HASHERS = ( 18 | 'django.contrib.auth.hashers.MD5PasswordHasher', 19 | ) 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Python bytecode: 2 | *.py[co] 3 | 4 | # Packaging files: 5 | *.egg* 6 | 7 | # Sphinx docs: 8 | build 9 | 10 | # SQLite3 database files: 11 | *.db 12 | 13 | # Logs: 14 | *.log 15 | 16 | # Eclipse 17 | .project 18 | .pydevproject 19 | .settings 20 | 21 | # Linux Editors 22 | *~ 23 | \#*\# 24 | /.emacs.desktop 25 | /.emacs.desktop.lock 26 | .elc 27 | auto-save-list 28 | tramp 29 | .\#* 30 | *.swp 31 | *.swo 32 | 33 | # Mac 34 | .DS_Store 35 | ._* 36 | 37 | # Windows 38 | Thumbs.db 39 | Desktop.ini 40 | 41 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. {{ project_name }} documentation master file, created by 2 | sphinx-quickstart on Sun Feb 17 11:46:20 2013. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to {{ project_name }}'s documentation! 7 | ==================================== 8 | 9 | Contents: 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | install 15 | deploy 16 | tests 17 | 18 | 19 | 20 | Indices and tables 21 | ================== 22 | 23 | * :ref:`genindex` 24 | * :ref:`modindex` 25 | * :ref:`search` 26 | -------------------------------------------------------------------------------- /project_name/templates/404.html: -------------------------------------------------------------------------------- 1 | {% templatetag openblock %} extends "base.html" {% templatetag closeblock %} 2 | 3 | {% templatetag openblock %} block title {% templatetag closeblock %}Page Not found{% templatetag openblock %} endblock {% templatetag closeblock %} 4 | 5 | {% templatetag openblock %} block page_title {% templatetag closeblock %}Page Not found{% templatetag openblock %} endblock page_title {% templatetag closeblock %} 6 | 7 | {% templatetag openblock %} block content {% templatetag closeblock %} 8 |

This is not the page you were looking for.

9 | {% templatetag openblock %} endblock content {% templatetag closeblock %} -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Audrey Roy, Daniel Greenfeld, and contributors. 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /project_name/project_name/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import patterns, include, url 2 | from django.conf.urls.static import static 3 | from django.conf import settings 4 | from django.views.generic import TemplateView 5 | 6 | # Uncomment the next two lines to enable the admin: 7 | from django.contrib import admin 8 | admin.autodiscover() 9 | 10 | urlpatterns = patterns('', 11 | url(r'^$', TemplateView.as_view(template_name='base.html')), 12 | 13 | # Examples: 14 | # url(r'^$', '{{ project_name }}.views.home', name='home'), 15 | # url(r'^{{ project_name }}/', include('{{ project_name }}.foo.urls')), 16 | 17 | # Uncomment the admin/doc line below to enable admin documentation: 18 | # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), 19 | 20 | # Uncomment the next line to enable the admin: 21 | url(r'^admin/', include(admin.site.urls)), 22 | ) 23 | 24 | # Uncomment the next line to serve media files in dev. 25 | # urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 26 | 27 | if settings.DEBUG: 28 | import debug_toolbar 29 | urlpatterns += patterns('', 30 | url(r'^__debug__/', include(debug_toolbar.urls)), 31 | ) 32 | -------------------------------------------------------------------------------- /project_name/project_name/settings/__init__.py: -------------------------------------------------------------------------------- 1 | from os import environ 2 | 3 | # Normally you should not import ANYTHING from Django directly 4 | # into your settings, but ImproperlyConfigured is an exception. 5 | from django.core.exceptions import ImproperlyConfigured 6 | 7 | 8 | def get_env_setting(setting): 9 | """ Get the environment setting or return exception """ 10 | try: 11 | return environ[setting] 12 | except KeyError: 13 | error_msg = "Set the %s env variable" % setting 14 | raise ImproperlyConfigured(error_msg) 15 | 16 | 17 | def load_environment_variables(envfile_path): 18 | """ 19 | Load key-value pairs from an `autoenv`_-style env file (a.k.a. shell script) into the local environment. 20 | 21 | .. _`autoenv`: https://github.com/kennethreitz/autoenv 22 | """ 23 | try: 24 | with open(envfile_path) as envfile: 25 | lines = envfile.readlines() 26 | for line in lines: 27 | if 'export' in line: 28 | key, value = line[len('export '):].split('=', maxsplit=1) 29 | environ[key.strip()] = value.strip().strip('"') 30 | except IOError: 31 | msg = 'Could not load environment variables from "%s"' % envfile_path 32 | raise ImproperlyConfigured(msg) 33 | -------------------------------------------------------------------------------- /project_name/project_name/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for {{ project_name }} project. 3 | 4 | This module contains the WSGI application used by Django's development server 5 | and any production WSGI deployments. It should expose a module-level variable 6 | named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover 7 | this application via the ``WSGI_APPLICATION`` setting. 8 | 9 | Usually you will have the standard Django WSGI application here, but it also 10 | might make sense to replace the whole Django WSGI application with a custom one 11 | that later delegates to the Django one. For example, you could introduce WSGI 12 | middleware here, or combine a Django application with an application of another 13 | framework. 14 | 15 | """ 16 | import os 17 | from os.path import abspath, dirname 18 | from sys import path 19 | 20 | SITE_ROOT = dirname(dirname(abspath(__file__))) 21 | path.append(SITE_ROOT) 22 | 23 | # We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks 24 | # if running multiple sites in the same mod_wsgi process. To fix this, use 25 | # mod_wsgi daemon mode with each site in its own daemon process, or use 26 | # os.environ["DJANGO_SETTINGS_MODULE"] = "jajaja.settings" 27 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings.production") 28 | 29 | # This application object is used by any WSGI server configured to use this 30 | # file. This includes Django's development server, if the WSGI_APPLICATION 31 | # setting points here. 32 | from django.core.wsgi import get_wsgi_application 33 | application = get_wsgi_application() 34 | 35 | # Apply WSGI middleware here. 36 | # from helloworld.wsgi import HelloWorldApplication 37 | # application = HelloWorldApplication(application) 38 | -------------------------------------------------------------------------------- /project_name/project_name/settings/production.py: -------------------------------------------------------------------------------- 1 | """Production settings and globals.""" 2 | 3 | from os import environ 4 | 5 | import dj_database_url 6 | 7 | from .base import * 8 | 9 | 10 | ########## HOST CONFIGURATION 11 | # See: https://docs.djangoproject.com/en/1.5/releases/1.5/#allowed-hosts-required-in-production 12 | ALLOWED_HOSTS = [] 13 | ########## END HOST CONFIGURATION 14 | 15 | ########## EMAIL CONFIGURATION 16 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-backend 17 | EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' 18 | 19 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-host 20 | EMAIL_HOST = environ.get('EMAIL_HOST', 'smtp.gmail.com') 21 | 22 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-host-password 23 | EMAIL_HOST_PASSWORD = environ.get('EMAIL_HOST_PASSWORD', '') 24 | 25 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-host-user 26 | EMAIL_HOST_USER = environ.get('EMAIL_HOST_USER', 'your_email@example.com') 27 | 28 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-port 29 | EMAIL_PORT = environ.get('EMAIL_PORT', 587) 30 | 31 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-subject-prefix 32 | EMAIL_SUBJECT_PREFIX = '[%s] ' % SITE_NAME 33 | 34 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-use-tls 35 | EMAIL_USE_TLS = True 36 | 37 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#server-email 38 | SERVER_EMAIL = EMAIL_HOST_USER 39 | ########## END EMAIL CONFIGURATION 40 | 41 | ########## DATABASE CONFIGURATION 42 | DATABASES = { 43 | 'default': dj_database_url.config(), 44 | } 45 | ########## END DATABASE CONFIGURATION 46 | 47 | 48 | ########## CACHE CONFIGURATION 49 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#caches 50 | CACHES = { 51 | 'default': { 52 | 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 53 | } 54 | } 55 | ########## END CACHE CONFIGURATION 56 | -------------------------------------------------------------------------------- /project_name/project_name/settings/local.py: -------------------------------------------------------------------------------- 1 | """Development settings and globals.""" 2 | 3 | from getpass import getuser 4 | from os import environ 5 | from os.path import join, normpath 6 | 7 | from .base import * 8 | 9 | 10 | ########## DEBUG CONFIGURATION 11 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#debug 12 | DEBUG = True 13 | 14 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug 15 | TEMPLATE_DEBUG = DEBUG 16 | ########## END DEBUG CONFIGURATION 17 | 18 | 19 | ########## EMAIL CONFIGURATION 20 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-backend 21 | EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' 22 | ########## END EMAIL CONFIGURATION 23 | 24 | 25 | ########## DATABASE CONFIGURATION 26 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#databases 27 | DATABASES = { 28 | 'default': { 29 | 'ENGINE': 'django.db.backends.postgresql_psycopg2', 30 | 'NAME': '{{ project_name }}', 31 | 'USER': str(environ.get('DATABASE_USER', getuser())), 32 | 'PASSWORD': str(environ.get('DATABASE_PASSWORD', '')), 33 | 'HOST': 'localhost', 34 | 'PORT': '5432', 35 | } 36 | } 37 | ########## END DATABASE CONFIGURATION 38 | 39 | 40 | ########## CACHE CONFIGURATION 41 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#caches 42 | CACHES = { 43 | 'default': { 44 | 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 45 | } 46 | } 47 | ########## END CACHE CONFIGURATION 48 | 49 | 50 | ########## TOOLBAR CONFIGURATION 51 | # See: http://django-debug-toolbar.readthedocs.org/en/latest/installation.html#explicit-setup 52 | INSTALLED_APPS += ( 53 | 'debug_toolbar', 54 | ) 55 | 56 | MIDDLEWARE_CLASSES += ( 57 | 'debug_toolbar.middleware.DebugToolbarMiddleware', 58 | ) 59 | 60 | DEBUG_TOOLBAR_PATCH_SETTINGS = False 61 | 62 | # http://django-debug-toolbar.readthedocs.org/en/latest/installation.html 63 | INTERNAL_IPS = ('127.0.0.1',) 64 | ########## END TOOLBAR CONFIGURATION 65 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | minimum-viable-django 2 | ===================== 3 | 4 | The smallest possible (useful) Django project skeleton. Customised to my own 5 | taste. 6 | 7 | 8 | To use this project follow these steps: 9 | 10 | 1. Create your working environment 11 | 1. Install Django 12 | 1. Create the new project using the minimum-viable-django template 13 | 1. Set up the database 14 | 1. Install additional dependencies 15 | 1. Use the Django admin to create the project (`python {{ project_name}}/manage.py startapp`) 16 | 1. Run the Django server 17 | 18 | 19 | Working Environment 20 | =================== 21 | 22 | These are the dependencies which you need to have available in your global 23 | environment, before you set up the project: 24 | 25 | - `virtualenvwrapper` 26 | - `autoenv` 27 | - Postgres 28 | 29 | 30 | Set up a Virtualenv with `virtualenvwrapper` 31 | ---------------------------------------------- 32 | 33 | In Linux and Mac OSX, you can install virtualenvwrapper (http://virtualenvwrapper.readthedocs.org/en/latest/), 34 | which will take care of managing your virtual environments and adding the 35 | project path to the `site-directory` for you: 36 | 37 | $ mkdir PROJECT_NAME 38 | $ mkvirtualenv -a PROJECT_NAME -p $(which python3) ENVNAME 39 | $ pip install django 40 | $ django-admin.py startproject --template=https://github.com/jeffbr13/minimum-viable-django/archive/master.zip --extension=py,rst,html --name=.env,Procfile PROJECT_NAME ./ 41 | 42 | 43 | Installing Project Dependencies 44 | =============================== 45 | 46 | Depending on where you are installing dependencies: 47 | 48 | In development:: 49 | 50 | $ pip install -r requirements/local.txt 51 | 52 | For production:: 53 | 54 | $ pip install -r requirements.txt 55 | 56 | *note: We install production requirements this way because many Platforms as a 57 | Services expect a requirements.txt file in the root of projects.* 58 | 59 | 60 | Database Setup 61 | ============== 62 | 63 | Skip this step if you already have a database setup or preconfigured. 64 | 65 | $ createdb PROJECT_NAME 66 | 67 | 68 | Configure Django Settings 69 | ========================= 70 | 71 | 1. Set `DATABASE_USER` and `DATABASE_PASSWORD` in `.env` 72 | 1. Set `Admins` in `base.py` 73 | 1. Configure production settings 74 | 1. `ALLOWED_HOSTS` 75 | 1. Email SMTP settings 76 | 77 | 78 | Run Server 79 | ========== 80 | 81 | $ honcho start 82 | 83 | Acknowledgements 84 | ================ 85 | 86 | - This project follows best practices as espoused in [Two Scoops of Django: Best Practices for Django 1.6](http://twoscoopspress.org/products/two-scoops-of-django-1-6). 87 | -------------------------------------------------------------------------------- /project_name/templates/base.html: -------------------------------------------------------------------------------- 1 | {% templatetag openblock %} load staticfiles {% templatetag closeblock %} 2 | 3 | 4 | 5 | 6 | {% templatetag openblock %} block title {% templatetag closeblock %}{{ project_name }}{% templatetag openblock %} endblock title {% templatetag closeblock %} 7 | 8 | 9 | 10 | 11 | 12 | 13 | 18 | 19 | 20 | 23 | 24 | 25 | 26 | 27 | 29 | {% templatetag openblock %} block extra_css {% templatetag closeblock %}{% templatetag openblock %} endblock extra_css {% templatetag closeblock %} 30 | 31 | 32 | 33 | 34 | 41 | 42 |
43 | 44 |

{% templatetag openblock %} block page_title {% templatetag closeblock %}Example Base Template{% templatetag openblock %} endblock page_title {% templatetag closeblock %}

45 | 46 | {% templatetag openblock %} block content {% templatetag closeblock %} 47 |

Use this document as a way to quick start any new project.

48 | {% templatetag openblock %} endblock content {% templatetag closeblock %} 49 | 50 |
51 | 52 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | {% templatetag openblock %} block extra_js {% templatetag closeblock %}{% templatetag openblock %} endblock extra_js {% templatetag closeblock %} 62 | 63 | 64 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM Command file for Sphinx documentation 4 | 5 | if "%SPHINXBUILD%" == "" ( 6 | set SPHINXBUILD=sphinx-build 7 | ) 8 | set BUILDDIR=_build 9 | set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . 10 | set I18NSPHINXOPTS=%SPHINXOPTS% . 11 | if NOT "%PAPER%" == "" ( 12 | set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% 13 | set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% 14 | ) 15 | 16 | if "%1" == "" goto help 17 | 18 | if "%1" == "help" ( 19 | :help 20 | echo.Please use `make ^` where ^ is one of 21 | echo. html to make standalone HTML files 22 | echo. dirhtml to make HTML files named index.html in directories 23 | echo. singlehtml to make a single large HTML file 24 | echo. pickle to make pickle files 25 | echo. json to make JSON files 26 | echo. htmlhelp to make HTML files and a HTML help project 27 | echo. qthelp to make HTML files and a qthelp project 28 | echo. devhelp to make HTML files and a Devhelp project 29 | echo. epub to make an epub 30 | echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter 31 | echo. text to make text files 32 | echo. man to make manual pages 33 | echo. texinfo to make Texinfo files 34 | echo. gettext to make PO message catalogs 35 | echo. changes to make an overview over all changed/added/deprecated items 36 | echo. linkcheck to check all external links for integrity 37 | echo. doctest to run all doctests embedded in the documentation if enabled 38 | goto end 39 | ) 40 | 41 | if "%1" == "clean" ( 42 | for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i 43 | del /q /s %BUILDDIR%\* 44 | goto end 45 | ) 46 | 47 | if "%1" == "html" ( 48 | %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html 49 | if errorlevel 1 exit /b 1 50 | echo. 51 | echo.Build finished. The HTML pages are in %BUILDDIR%/html. 52 | goto end 53 | ) 54 | 55 | if "%1" == "dirhtml" ( 56 | %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml 57 | if errorlevel 1 exit /b 1 58 | echo. 59 | echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. 60 | goto end 61 | ) 62 | 63 | if "%1" == "singlehtml" ( 64 | %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml 65 | if errorlevel 1 exit /b 1 66 | echo. 67 | echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. 68 | goto end 69 | ) 70 | 71 | if "%1" == "pickle" ( 72 | %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle 73 | if errorlevel 1 exit /b 1 74 | echo. 75 | echo.Build finished; now you can process the pickle files. 76 | goto end 77 | ) 78 | 79 | if "%1" == "json" ( 80 | %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json 81 | if errorlevel 1 exit /b 1 82 | echo. 83 | echo.Build finished; now you can process the JSON files. 84 | goto end 85 | ) 86 | 87 | if "%1" == "htmlhelp" ( 88 | %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp 89 | if errorlevel 1 exit /b 1 90 | echo. 91 | echo.Build finished; now you can run HTML Help Workshop with the ^ 92 | .hhp project file in %BUILDDIR%/htmlhelp. 93 | goto end 94 | ) 95 | 96 | if "%1" == "qthelp" ( 97 | %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp 98 | if errorlevel 1 exit /b 1 99 | echo. 100 | echo.Build finished; now you can run "qcollectiongenerator" with the ^ 101 | .qhcp project file in %BUILDDIR%/qthelp, like this: 102 | echo.^> qcollectiongenerator %BUILDDIR%\qthelp\{{ project_name }}.qhcp 103 | echo.To view the help file: 104 | echo.^> assistant -collectionFile %BUILDDIR%\qthelp\{{ project_name }}.ghc 105 | goto end 106 | ) 107 | 108 | if "%1" == "devhelp" ( 109 | %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp 110 | if errorlevel 1 exit /b 1 111 | echo. 112 | echo.Build finished. 113 | goto end 114 | ) 115 | 116 | if "%1" == "epub" ( 117 | %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub 118 | if errorlevel 1 exit /b 1 119 | echo. 120 | echo.Build finished. The epub file is in %BUILDDIR%/epub. 121 | goto end 122 | ) 123 | 124 | if "%1" == "latex" ( 125 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 126 | if errorlevel 1 exit /b 1 127 | echo. 128 | echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. 129 | goto end 130 | ) 131 | 132 | if "%1" == "text" ( 133 | %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text 134 | if errorlevel 1 exit /b 1 135 | echo. 136 | echo.Build finished. The text files are in %BUILDDIR%/text. 137 | goto end 138 | ) 139 | 140 | if "%1" == "man" ( 141 | %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man 142 | if errorlevel 1 exit /b 1 143 | echo. 144 | echo.Build finished. The manual pages are in %BUILDDIR%/man. 145 | goto end 146 | ) 147 | 148 | if "%1" == "texinfo" ( 149 | %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo 150 | if errorlevel 1 exit /b 1 151 | echo. 152 | echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. 153 | goto end 154 | ) 155 | 156 | if "%1" == "gettext" ( 157 | %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale 158 | if errorlevel 1 exit /b 1 159 | echo. 160 | echo.Build finished. The message catalogs are in %BUILDDIR%/locale. 161 | goto end 162 | ) 163 | 164 | if "%1" == "changes" ( 165 | %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes 166 | if errorlevel 1 exit /b 1 167 | echo. 168 | echo.The overview file is in %BUILDDIR%/changes. 169 | goto end 170 | ) 171 | 172 | if "%1" == "linkcheck" ( 173 | %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck 174 | if errorlevel 1 exit /b 1 175 | echo. 176 | echo.Link check complete; look for any errors in the above output ^ 177 | or in %BUILDDIR%/linkcheck/output.txt. 178 | goto end 179 | ) 180 | 181 | if "%1" == "doctest" ( 182 | %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest 183 | if errorlevel 1 exit /b 1 184 | echo. 185 | echo.Testing of doctests in the sources finished, look at the ^ 186 | results in %BUILDDIR%/doctest/output.txt. 187 | goto end 188 | ) 189 | 190 | :end 191 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = _build 9 | 10 | # Internal variables. 11 | PAPEROPT_a4 = -D latex_paper_size=a4 12 | PAPEROPT_letter = -D latex_paper_size=letter 13 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 14 | # the i18n builder cannot share the environment and doctrees with the others 15 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 16 | 17 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext 18 | 19 | help: 20 | @echo "Please use \`make ' where is one of" 21 | @echo " html to make standalone HTML files" 22 | @echo " dirhtml to make HTML files named index.html in directories" 23 | @echo " singlehtml to make a single large HTML file" 24 | @echo " pickle to make pickle files" 25 | @echo " json to make JSON files" 26 | @echo " htmlhelp to make HTML files and a HTML help project" 27 | @echo " qthelp to make HTML files and a qthelp project" 28 | @echo " devhelp to make HTML files and a Devhelp project" 29 | @echo " epub to make an epub" 30 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 31 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 32 | @echo " text to make text files" 33 | @echo " man to make manual pages" 34 | @echo " texinfo to make Texinfo files" 35 | @echo " info to make Texinfo files and run them through makeinfo" 36 | @echo " gettext to make PO message catalogs" 37 | @echo " changes to make an overview of all changed/added/deprecated items" 38 | @echo " linkcheck to check all external links for integrity" 39 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 40 | 41 | clean: 42 | -rm -rf $(BUILDDIR)/* 43 | 44 | html: 45 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 46 | @echo 47 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 48 | 49 | dirhtml: 50 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 51 | @echo 52 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 53 | 54 | singlehtml: 55 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 56 | @echo 57 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 58 | 59 | pickle: 60 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 61 | @echo 62 | @echo "Build finished; now you can process the pickle files." 63 | 64 | json: 65 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 66 | @echo 67 | @echo "Build finished; now you can process the JSON files." 68 | 69 | htmlhelp: 70 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 71 | @echo 72 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 73 | ".hhp project file in $(BUILDDIR)/htmlhelp." 74 | 75 | qthelp: 76 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 77 | @echo 78 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 79 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 80 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/{{ project_name }}.qhcp" 81 | @echo "To view the help file:" 82 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/{{ project_name }}.qhc" 83 | 84 | devhelp: 85 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 86 | @echo 87 | @echo "Build finished." 88 | @echo "To view the help file:" 89 | @echo "# mkdir -p $$HOME/.local/share/devhelp/{{ project_name }}" 90 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/{{ project_name }}" 91 | @echo "# devhelp" 92 | 93 | epub: 94 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 95 | @echo 96 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 97 | 98 | latex: 99 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 100 | @echo 101 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 102 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 103 | "(use \`make latexpdf' here to do that automatically)." 104 | 105 | latexpdf: 106 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 107 | @echo "Running LaTeX files through pdflatex..." 108 | $(MAKE) -C $(BUILDDIR)/latex all-pdf 109 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 110 | 111 | text: 112 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 113 | @echo 114 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 115 | 116 | man: 117 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 118 | @echo 119 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 120 | 121 | texinfo: 122 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 123 | @echo 124 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 125 | @echo "Run \`make' in that directory to run these through makeinfo" \ 126 | "(use \`make info' here to do that automatically)." 127 | 128 | info: 129 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 130 | @echo "Running Texinfo files through makeinfo..." 131 | make -C $(BUILDDIR)/texinfo info 132 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 133 | 134 | gettext: 135 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 136 | @echo 137 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 138 | 139 | changes: 140 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 141 | @echo 142 | @echo "The overview file is in $(BUILDDIR)/changes." 143 | 144 | linkcheck: 145 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 146 | @echo 147 | @echo "Link check complete; look for any errors in the above output " \ 148 | "or in $(BUILDDIR)/linkcheck/output.txt." 149 | 150 | doctest: 151 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 152 | @echo "Testing of doctests in the sources finished, look at the " \ 153 | "results in $(BUILDDIR)/doctest/output.txt." 154 | -------------------------------------------------------------------------------- /project_name/project_name/settings/base.py: -------------------------------------------------------------------------------- 1 | """Common settings and globals.""" 2 | 3 | from os.path import abspath, basename, dirname, join, normpath 4 | from sys import path 5 | 6 | from . import get_env_setting, load_environment_variables 7 | 8 | 9 | ########## PATH CONFIGURATION 10 | # Absolute filesystem path to the Django project directory: 11 | DJANGO_ROOT = dirname(dirname(abspath(__file__))) 12 | 13 | # Absolute filesystem path to the top-level project folder: 14 | SITE_ROOT = dirname(DJANGO_ROOT) 15 | 16 | # Site name: 17 | SITE_NAME = basename(DJANGO_ROOT) 18 | 19 | # Add our project to our pythonpath, this way we don't need to type our project 20 | # name in our dotted import paths: 21 | path.append(DJANGO_ROOT) 22 | 23 | # Project root path: 24 | PROJECT_ROOT = dirname(SITE_ROOT) 25 | ########## END PATH CONFIGURATION 26 | 27 | 28 | ########## ENVIRONMENT VARIABLE CONFIGURATION 29 | # .env file path: 30 | ENV_PATH = join(PROJECT_ROOT, '.env') 31 | 32 | # Force-load .env environment variables: 33 | load_environment_variables(ENV_PATH) 34 | ########## END ENVIRONMENT VARIABLE CONFIGURATION 35 | 36 | 37 | ########## DEBUG CONFIGURATION 38 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#debug 39 | DEBUG = False 40 | 41 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug 42 | TEMPLATE_DEBUG = DEBUG 43 | ########## END DEBUG CONFIGURATION 44 | 45 | 46 | ########## MANAGER CONFIGURATION 47 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#admins 48 | ADMINS = ( 49 | ('Your Name', 'your_email@example.com'), 50 | ) 51 | 52 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#managers 53 | MANAGERS = ADMINS 54 | ########## END MANAGER CONFIGURATION 55 | 56 | 57 | ########## GENERAL CONFIGURATION 58 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#time-zone 59 | TIME_ZONE = 'Europe/London' 60 | 61 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#language-code 62 | LANGUAGE_CODE = 'en-gb' 63 | 64 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#site-id 65 | SITE_ID = 1 66 | 67 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n 68 | USE_I18N = True 69 | 70 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#use-l10n 71 | USE_L10N = True 72 | 73 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#use-tz 74 | USE_TZ = True 75 | ########## END GENERAL CONFIGURATION 76 | 77 | 78 | ########## MEDIA CONFIGURATION 79 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#media-root 80 | MEDIA_ROOT = normpath(join(SITE_ROOT, 'media')) 81 | 82 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#media-url 83 | MEDIA_URL = '/media/' 84 | ########## END MEDIA CONFIGURATION 85 | 86 | 87 | ########## STATIC FILE CONFIGURATION 88 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root 89 | STATIC_ROOT = normpath(join(SITE_ROOT, 'assets')) 90 | 91 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url 92 | STATIC_URL = '/static/' 93 | 94 | # See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS 95 | STATICFILES_DIRS = ( 96 | normpath(join(SITE_ROOT, 'static')), 97 | ) 98 | 99 | # See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders 100 | STATICFILES_FINDERS = ( 101 | 'django.contrib.staticfiles.finders.FileSystemFinder', 102 | 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 103 | ) 104 | ########## END STATIC FILE CONFIGURATION 105 | 106 | 107 | ########## SECRET CONFIGURATION 108 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#secret-key 109 | SECRET_KEY = get_env_setting('SECRET_KEY') 110 | ########## END SECRET CONFIGURATION 111 | 112 | 113 | ########## SITE CONFIGURATION 114 | # Hosts/domain names that are valid for this site 115 | # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts 116 | ALLOWED_HOSTS = ['localhost'] 117 | ########## END SITE CONFIGURATION 118 | 119 | 120 | ########## FIXTURE CONFIGURATION 121 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-FIXTURE_DIRS 122 | FIXTURE_DIRS = ( 123 | normpath(join(SITE_ROOT, 'fixtures')), 124 | ) 125 | ########## END FIXTURE CONFIGURATION 126 | 127 | 128 | ########## TESTRUNNER CONFIGURATION 129 | TEST_RUNNER = 'django.test.runner.DiscoverRunner' 130 | ########## END TESTRUNNER CONFIGURATION 131 | 132 | 133 | ########## TEMPLATE CONFIGURATION 134 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors 135 | TEMPLATE_CONTEXT_PROCESSORS = ( 136 | 'django.contrib.auth.context_processors.auth', 137 | 'django.core.context_processors.debug', 138 | 'django.core.context_processors.i18n', 139 | 'django.core.context_processors.media', 140 | 'django.core.context_processors.static', 141 | 'django.core.context_processors.tz', 142 | 'django.contrib.messages.context_processors.messages', 143 | 'django.core.context_processors.request', 144 | ) 145 | 146 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-loaders 147 | TEMPLATE_LOADERS = ( 148 | 'django.template.loaders.filesystem.Loader', 149 | 'django.template.loaders.app_directories.Loader', 150 | ) 151 | 152 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs 153 | TEMPLATE_DIRS = ( 154 | normpath(join(SITE_ROOT, 'templates')), 155 | ) 156 | ########## END TEMPLATE CONFIGURATION 157 | 158 | 159 | ########## MIDDLEWARE CONFIGURATION 160 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#middleware-classes 161 | MIDDLEWARE_CLASSES = ( 162 | # Default Django middleware. 163 | 'django.middleware.common.CommonMiddleware', 164 | 'django.contrib.sessions.middleware.SessionMiddleware', 165 | 'django.middleware.csrf.CsrfViewMiddleware', 166 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 167 | 'django.contrib.messages.middleware.MessageMiddleware', 168 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 169 | ) 170 | ########## END MIDDLEWARE CONFIGURATION 171 | 172 | 173 | ########## URL CONFIGURATION 174 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#root-urlconf 175 | ROOT_URLCONF = '%s.urls' % SITE_NAME 176 | ########## END URL CONFIGURATION 177 | 178 | 179 | ########## APP CONFIGURATION 180 | DJANGO_APPS = ( 181 | # Default Django apps: 182 | 'django.contrib.auth', 183 | 'django.contrib.contenttypes', 184 | 'django.contrib.sessions', 185 | 'django.contrib.sites', 186 | 'django.contrib.messages', 187 | 'django.contrib.staticfiles', 188 | 189 | # Useful template tags: 190 | # 'django.contrib.humanize', 191 | 192 | # Admin panel and documentation: 193 | 'django.contrib.admin', 194 | # 'django.contrib.admindocs', 195 | ) 196 | 197 | THIRD_PARTY_APPS = ( 198 | ) 199 | 200 | # Apps specific for this project go here. 201 | LOCAL_APPS = ( 202 | ) 203 | 204 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps 205 | INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS 206 | ########## END APP CONFIGURATION 207 | 208 | 209 | ########## LOGGING CONFIGURATION 210 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#logging 211 | # A sample logging configuration. The only tangible logging 212 | # performed by this configuration is to send an email to 213 | # the site admins on every HTTP 500 error when DEBUG=False. 214 | # See http://docs.djangoproject.com/en/dev/topics/logging for 215 | # more details on how to customize your logging configuration. 216 | LOGGING = { 217 | 'version': 1, 218 | 'disable_existing_loggers': False, 219 | 'filters': { 220 | 'require_debug_false': { 221 | '()': 'django.utils.log.RequireDebugFalse' 222 | } 223 | }, 224 | 'handlers': { 225 | 'mail_admins': { 226 | 'level': 'ERROR', 227 | 'filters': ['require_debug_false'], 228 | 'class': 'django.utils.log.AdminEmailHandler' 229 | } 230 | }, 231 | 'loggers': { 232 | 'django.request': { 233 | 'handlers': ['mail_admins'], 234 | 'level': 'ERROR', 235 | 'propagate': True, 236 | }, 237 | } 238 | } 239 | ########## END LOGGING CONFIGURATION 240 | 241 | 242 | ########## WSGI CONFIGURATION 243 | # See: https://docs.djangoproject.com/en/dev/ref/settings/#wsgi-application 244 | WSGI_APPLICATION = '%s.wsgi.application' % SITE_NAME 245 | ########## END WSGI CONFIGURATION 246 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # {{ project_name }} documentation build configuration file, created by 4 | # sphinx-quickstart on Sun Feb 17 11:46:20 2013. 5 | # 6 | # This file is execfile()d with the current directory set to its containing dir. 7 | # 8 | # Note that not all possible configuration values are present in this 9 | # autogenerated file. 10 | # 11 | # All configuration values have a default; values that are commented out 12 | # serve to show the default. 13 | 14 | import sys, os 15 | 16 | # If extensions (or modules to document with autodoc) are in another directory, 17 | # add these directories to sys.path here. If the directory is relative to the 18 | # documentation root, use os.path.abspath to make it absolute, like shown here. 19 | #sys.path.insert(0, os.path.abspath('.')) 20 | 21 | # -- General configuration ----------------------------------------------------- 22 | 23 | # If your documentation needs a minimal Sphinx version, state it here. 24 | #needs_sphinx = '1.0' 25 | 26 | # Add any Sphinx extension module names here, as strings. They can be extensions 27 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. 28 | extensions = [] 29 | 30 | # Add any paths that contain templates here, relative to this directory. 31 | templates_path = ['_templates'] 32 | 33 | # The suffix of source filenames. 34 | source_suffix = '.rst' 35 | 36 | # The encoding of source files. 37 | #source_encoding = 'utf-8-sig' 38 | 39 | # The master toctree document. 40 | master_doc = 'index' 41 | 42 | # General information about the project. 43 | project = u'{{ project_name }}' 44 | copyright = u'2014, ChangeMyName' 45 | 46 | # The version info for the project you're documenting, acts as replacement for 47 | # |version| and |release|, also used in various other places throughout the 48 | # built documents. 49 | # 50 | # The short X.Y version. 51 | version = '0.1' 52 | # The full version, including alpha/beta/rc tags. 53 | release = '0.1' 54 | 55 | # The language for content autogenerated by Sphinx. Refer to documentation 56 | # for a list of supported languages. 57 | #language = None 58 | 59 | # There are two options for replacing |today|: either, you set today to some 60 | # non-false value, then it is used: 61 | #today = '' 62 | # Else, today_fmt is used as the format for a strftime call. 63 | #today_fmt = '%B %d, %Y' 64 | 65 | # List of patterns, relative to source directory, that match files and 66 | # directories to ignore when looking for source files. 67 | exclude_patterns = ['_build'] 68 | 69 | # The reST default role (used for this markup: `text`) to use for all documents. 70 | #default_role = None 71 | 72 | # If true, '()' will be appended to :func: etc. cross-reference text. 73 | #add_function_parentheses = True 74 | 75 | # If true, the current module name will be prepended to all description 76 | # unit titles (such as .. function::). 77 | #add_module_names = True 78 | 79 | # If true, sectionauthor and moduleauthor directives will be shown in the 80 | # output. They are ignored by default. 81 | #show_authors = False 82 | 83 | # The name of the Pygments (syntax highlighting) style to use. 84 | pygments_style = 'sphinx' 85 | 86 | # A list of ignored prefixes for module index sorting. 87 | #modindex_common_prefix = [] 88 | 89 | 90 | # -- Options for HTML output --------------------------------------------------- 91 | 92 | # The theme to use for HTML and HTML Help pages. See the documentation for 93 | # a list of builtin themes. 94 | html_theme = 'default' 95 | 96 | # Theme options are theme-specific and customize the look and feel of a theme 97 | # further. For a list of options available for each theme, see the 98 | # documentation. 99 | #html_theme_options = {} 100 | 101 | # Add any paths that contain custom themes here, relative to this directory. 102 | #html_theme_path = [] 103 | 104 | # The name for this set of Sphinx documents. If None, it defaults to 105 | # " v documentation". 106 | #html_title = None 107 | 108 | # A shorter title for the navigation bar. Default is the same as html_title. 109 | #html_short_title = None 110 | 111 | # The name of an image file (relative to this directory) to place at the top 112 | # of the sidebar. 113 | #html_logo = None 114 | 115 | # The name of an image file (within the static path) to use as favicon of the 116 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 117 | # pixels large. 118 | #html_favicon = None 119 | 120 | # Add any paths that contain custom static files (such as style sheets) here, 121 | # relative to this directory. They are copied after the builtin static files, 122 | # so a file named "default.css" will overwrite the builtin "default.css". 123 | html_static_path = ['_static'] 124 | 125 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 126 | # using the given strftime format. 127 | #html_last_updated_fmt = '%b %d, %Y' 128 | 129 | # If true, SmartyPants will be used to convert quotes and dashes to 130 | # typographically correct entities. 131 | #html_use_smartypants = True 132 | 133 | # Custom sidebar templates, maps document names to template names. 134 | #html_sidebars = {} 135 | 136 | # Additional templates that should be rendered to pages, maps page names to 137 | # template names. 138 | #html_additional_pages = {} 139 | 140 | # If false, no module index is generated. 141 | #html_domain_indices = True 142 | 143 | # If false, no index is generated. 144 | #html_use_index = True 145 | 146 | # If true, the index is split into individual pages for each letter. 147 | #html_split_index = False 148 | 149 | # If true, links to the reST sources are added to the pages. 150 | #html_show_sourcelink = True 151 | 152 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 153 | #html_show_sphinx = True 154 | 155 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 156 | #html_show_copyright = True 157 | 158 | # If true, an OpenSearch description file will be output, and all pages will 159 | # contain a tag referring to it. The value of this option must be the 160 | # base URL from which the finished HTML is served. 161 | #html_use_opensearch = '' 162 | 163 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 164 | #html_file_suffix = None 165 | 166 | # Output file base name for HTML help builder. 167 | htmlhelp_basename = '{{ project_name }}doc' 168 | 169 | 170 | # -- Options for LaTeX output -------------------------------------------------- 171 | 172 | latex_elements = { 173 | # The paper size ('letterpaper' or 'a4paper'). 174 | #'papersize': 'letterpaper', 175 | 176 | # The font size ('10pt', '11pt' or '12pt'). 177 | #'pointsize': '10pt', 178 | 179 | # Additional stuff for the LaTeX preamble. 180 | #'preamble': '', 181 | } 182 | 183 | # Grouping the document tree into LaTeX files. List of tuples 184 | # (source start file, target name, title, author, documentclass [howto/manual]). 185 | latex_documents = [ 186 | ('index', '{{ project_name }}.tex', u'{{ project_name }} Documentation', 187 | u'ChangeToMyName', 'manual'), 188 | ] 189 | 190 | # The name of an image file (relative to this directory) to place at the top of 191 | # the title page. 192 | #latex_logo = None 193 | 194 | # For "manual" documents, if this is true, then toplevel headings are parts, 195 | # not chapters. 196 | #latex_use_parts = False 197 | 198 | # If true, show page references after internal links. 199 | #latex_show_pagerefs = False 200 | 201 | # If true, show URL addresses after external links. 202 | #latex_show_urls = False 203 | 204 | # Documents to append as an appendix to all manuals. 205 | #latex_appendices = [] 206 | 207 | # If false, no module index is generated. 208 | #latex_domain_indices = True 209 | 210 | 211 | # -- Options for manual page output -------------------------------------------- 212 | 213 | # One entry per manual page. List of tuples 214 | # (source start file, name, description, authors, manual section). 215 | man_pages = [ 216 | ('index', '{{ project_name }}', u'{{ project_name }} Documentation', 217 | [u'ChangeToMyName'], 1) 218 | ] 219 | 220 | # If true, show URL addresses after external links. 221 | #man_show_urls = False 222 | 223 | 224 | # -- Options for Texinfo output ------------------------------------------------ 225 | 226 | # Grouping the document tree into Texinfo files. List of tuples 227 | # (source start file, target name, title, author, 228 | # dir menu entry, description, category) 229 | texinfo_documents = [ 230 | ('index', '{{ project_name }}', u'{{ project_name }} Documentation', 231 | u'ChangeToMyName', '{{ project_name }}', 'One line description of project.', 232 | 'Miscellaneous'), 233 | ] 234 | 235 | # Documents to append as an appendix to all manuals. 236 | #texinfo_appendices = [] 237 | 238 | # If false, no module index is generated. 239 | #texinfo_domain_indices = True 240 | 241 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 242 | #texinfo_show_urls = 'footnote' 243 | -------------------------------------------------------------------------------- /project_name/static/js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.1.1 (http://getbootstrap.com) 3 | * Copyright 2011-2014 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); -------------------------------------------------------------------------------- /project_name/static/fonts/glyphicons-halflings-regular.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | --------------------------------------------------------------------------------