Created on Nov. 9, 2012, 7:07 a.m. by Hevok & updated by Hevok on May 2, 2013, 5:05 p.m.
Denigma structural layout is optimized to be most logical (laying-out-an-application). It has been curated over years (Django/How-do-you-organize-the-code-in-your-Django-project">organize-code-in-your-django-project):
. # Project (everything here gets under version control) ├── ./gitignore # Besides what is defined in the ignore list ├── __init__.py # Project initialization ├── requirements # Requirements files (split up for def/prod), and chef/puppet/salt recopies | ├── pre.txt # Pre-stage requirements | ├── base.txt # Basic requirements | └── project.txt # Project-specific requirements ├── docs # Documentations to built with Sphinx | ├── main.rst # Main development │ ├── TODO.rst # DEP (Denigma Enhancement Proposals) │ └── upgrade.rst # Upgrading issues ├── scripts # Bootstrap dev/CI sys, manage.py, etc. ├── utils # Utility modules ├── manage.py # Manager └── denigma # Site ├── __init__.py # Site initialization ├── settings.py # Main Configuration ├── static # Static assets │ ├── css # Cascade Style Sheets │ ├── img # Images │ └── js # Javascripts ├── media # User uploaded files ├── templates # HTML templates ├── documents # Data entries rendered as documents ├── urls.py # Main URLconf ├── wsgi.py # Deployment └── apps # Applications (get injected into sys.path, makes inner apps have cleaner import) ├── __init__.py # Application initialization └── app # Application like the data app ├── __init__.py # Application initialization ├── models.py # Database models ├── views.py # Function and classes ├── admin.py # Administration (optional) ├── forms.py # Custom manipulators (optional) ├── managers.py # Custom model managers (optional) ├── tables.py # Table classes for table views (optional) ├── filters.py # Filtering classes for views (optional) ├── signals.py # Custom dispatcher signals (optional) ├── handlers.py # Signal handlers (optional) ├── feeds.py # Syndication feeds (optional) ├── search_indexes.py # Haystack search index directives (optional) ├── middleware.py # Middleware classes (optional) ├── context_processors.py # Custom context processors (optional) ├── utils.py # Any miscellaneous code which does not clearly go anywhere else (optional) ├── tests.py # Testing functions and suits ├── static # App-specific static assets │ └── app # Allows project-level templates dir to overwrite/extend these easier │ ├── css # Cascade Style Sheets │ ├── img # Images │ └── js # Javascripts └── templates # App-specific templates... └── app # ...go into here
The most important concept is that of the distinction between Project and Applications as well as Sites.
Comment on This Data Unit