README.md (1755B)
1 # Django Base 2 A project template to bootstrap common projects. 3 4 ## Getting Started 5 Chose one of the stage you want to bootstrap and run the commands. 6 7 **development** 8 ``` 9 make dev-deps 10 cp .ex/dev.py base/settings/ 11 # edit base/settings/dev.py 12 make migrate 13 make 14 ``` 15 16 **production** 17 ``` 18 make prod-deps 19 cp .ex/prod.py base/settings/ 20 # edit base/settings/prod.py 21 make migrate 22 make static 23 # set up a wsgi daemon and a fcgi daemon 24 ``` 25 26 27 ## Project Structure 28 Important project files: 29 30 <dl> 31 <dt>/base/</dt> 32 <dd>Contains the entrypoint of the project. It has the settings, route definitions, and list of enabled apps.</dd> 33 34 <dt>/page/</dt> 35 <dd>This is a demo app that contains possible common pages across projects.</dd> 36 37 <dt>/templ/</dt> 38 <dd>Contains all the template files.</dd> 39 40 <dt>/static/</dt> 41 <dd>Contains all the static files.</dd> 42 43 <dt>/.ex/</dt> 44 <dd>Contains all the example files needed to bootstrap development or production stage.</dt> 45 46 <dt>/pyproject.toml, /poetry.lock 47 <dd>Dependency management files.</dd> 48 49 <dt>/manage.py</dt> 50 <dd>Contains the Django-specific commands.</dd> 51 52 <dt>/.editorconfig</dt> 53 <dd>You know what to do!</dd> 54 55 <dt>/Makefile</dt> 56 <dd>It has common shortcuts to manage the project. Checkout the «Make Targets» section.</dd> 57 </dl> 58 59 60 ## Make Targets 61 Here is a list of make(1) targets: 62 63 <dl> 64 <dt>all, or the default target</dt> 65 <dd>It just runs the project.</dd> 66 67 <dt>dev-deps</dt> 68 <dd>Installs all the development dependencies.</dd> 69 70 <dt>prod-deps</dt> 71 <dd>Installs all the production dependencies.</dd> 72 73 <dt>sh</dt> 74 <dd>A shortcut for the «shell» command in manage.py.</dd> 75 76 <dt>migrate</dt> 77 <dd>Runs the «migrate» command in manage.py.</dd> 78 79 <dt>static</dt> 80 <dd>Runs the «collectstatic» command in manage.py.</dd> 81 </dl>