The normal Django workflow, as it is described in the official Django tutorial starts a project with the command:
$ django-admin startproject [projectname]
Your project will look like this:
[projectname]/ âââ [projectname]/ â  âââ __init__.py â  âââ settings.py â  âââ urls.py â  âââ wsgi.py âââ manage.py
However, the startproject
-command takes an optional argument template
which can be used to specify a project template to be used for project (see official documentation)
The template
-argument works with paths on your local machine, but also supports URLs. So you can easily fetch this skeleton from GitHub using this command:
$ django-admin startproject --template=https://github.com/Mischback/django-project-skeleton/archive/master.zip [projectname]
Your project will look like this:
[projectname]/ <- project root âââ [projectname]/ <- Django root â  âââ __init__.py â  âââ settings/ â  â  âââ common.py â  â  âââ development.py â  â  âââ i18n.py â  â  âââ __init__.py â  â  âââ production.py â  âââ urls.py â  âââ wsgi.py âââ apps/ â  âââ __init__.py âââ configs/ â  âââ apache2_vhost.sample â  âââ README âââ doc/ â  âââ Makefile â  âââ source/ â  âââ *snap* âââ manage.py âââ README.rst âââ run/ â  âââ media/ â  â  âââ README â  âââ README â  âââ static/ â  âââ README âââ static/ â  âââ README âââ templates/   âââ base.html   âââ core   â  âââ login.html âââ READMEDjango Root¶
[projectname]/ <- project root âââ [projectname]/ <- Django root â  âââ __init__.py â  âââ settings/ â  â  âââ common.py â  â  âââ development.py â  â  âââ i18n.py â  â  âââ __init__.py â  â  âââ production.py â  âââ urls.py â  âââ wsgi.py âââ *snap*
The Django root directory will be named according to the project name you specified in django-admin startproject [projectname]
. This directory is the projectâs connection with Django.
[projectname]/settings/
[projectname]/urls.py
[projectname]/wsgi.py
settings
-module.
[projectname]/ <- project root âââ *snap* âââ apps/ â  âââ __init__.py âââ *snap*
This directory is used for custom applications. You can safely remove this directory, if you do not plan to develop custom applications. Most of a Django projectâs apps will be installed into the Python path and not be kept in your project root.
configs/¶This directory contains configuration files for deployment. A configuration file for deployment with Apache2 and mod_wsgi is provided.
[projectname]/ <- project root âââ *snap* âââ configs/ â  âââ apache2_vhost.sample â  âââ Makefile.sample â  âââ README âââ *snap*
Please note: It is strongly advised to keep your actual server configuration private. Therefore a .gitignore
-file is provided, which will only include files ending with the suffix .sample
into Git.
For a brief overview of the configs/apach2_vhost.sample
refer to Apache2 Virtual Host Configuration.
Additionally, a sample Makefile is stored here. This file can be used to ease the management of the project. Probably a future release will automatically exchange the Makefile in project_root
with this one.
[projectname]/ <- project root âââ *snap* âââ doc/ â  âââ Makefile â  âââ source/ â  âââ *snap* âââ *snap*
This directory contains the source files for this documentation.
You can safely remove this directory, if you just want to use the skeleton for your own project.
run/¶[projectname]/ <- project root âââ *snap* âââ run/ â  âââ media/ â  â  âââ README â  âââ README â  âââ static/ â  âââ README âââ *snap*
This directory contains necessary files for running Django. All these files may contain sensible or useless information, so you will not want to keep this files in version control. A .gitignore
-file is prepared.
This directory will contain the SQLite database file (if you keep the provided dev
-settings) and the SECRET_KEY of Django. For a detailled explanation see Settings.
run/media/
MEDIA_ROOT
.
run/static/
[projectname]/ <- project root âââ *snap* âââ static/ â  âââ README âââ templates/   âââ base.html   âââ core   â  âââ login.html âââ README
These directories are used for project wide files, meaning project wide static assets and templates.
static/
STATICFILES_DIRS
-setting.
templates/
TEMPLATE_DIRS
-setting. Please note, that there are two basic templates are already included. These are used to enable a very basic login functionality for the project.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4