This is a work in progress…
litdjango startproject <projectname>
The default project template mostly resembles the default django project template.
A regular Django project created with
django-admin startproject <project-name>
will have the following
directory structure:
<project-name>
├── manage.py
└── <project-name>
├── __init__.py
├── asgi.py
├── settings.py
├── urls.py
└── wsgi.py
By default manage.py
, asgi.py
, wsgi.py
and settings.py
files all
hardcode the path of the settings module which is dependent on the
<project-name>
.
This is unfortunate because if you decide to change the name of your project (which might not be set in stone at the beginning of a project), and you want the name change to reflected in the code then you have to update each of these references.
For this reason we have removed this reference to the project name by
renaming the inner directory to config
, and updated the
path to the settings file in each file accordingly:
testproject/
├── nbs
│ ├── config
│ │ ├── asgi.ipynb
│ │ ├── settings.ipynb
│ │ ├── urls.ipynb
│ │ └── wsgi.ipynb
│ └── manage.ipynb
└── <project-name>
# build your django project by editing nbs
# a build command will output regular python modules in this directory