Skip to content

Django ~1.11+ project template layout, biased for django-cms. Originally based on lincolnloop/django-layout

License

Notifications You must be signed in to change notification settings

benzkji/django-layout

Repository files navigation

{% comment %}

Django Layout

django-layout provides sane defaults for new Django projects based on http://www.revsys.com/blog/2014/nov/21/recommended-django-project-layout/ (more and more) and (initial version) established best practices <http://lincolnloop.com/django-best-practices/>__.

To use django-layout run the following command::

 django-admin startproject --template=https://github.com/benzkji/django-layout/zipball/master --extension=py,rst,md,sh,txt,js,json,gitignore,conf your_project_name

Things to adapt right after:

  • create .env file, from project/env-dev-example
  • check fabfile deployment settings
  • check nginx site config: server_listen port

When making changes to this (django-layout) repository, make sure at least to check the following:

  • startproject with above command line
  • manage.py check, manage.py migrate, ./run-local.sh and open the /admin
  • fab bootstrap and fab deploy still work
  • gunicorn/nginx configs and scripts still work

.. note:: The text following this comment block will become the README.rst of the new project.


..

{% endcomment %}

{{ project_name }}

Python [version], PostgreSQL [version]

TOC

Changelog

2025-01-09

  • project initiated

Docs & Specials

Uses API XY.

Quickstart

To bootstrap the project on your machine::

git clone
cd {{ project_name }}
mkvirtualenv {{ project_name }}
# install node things, install basics like pip-tools and pre-commit
npm install
npm run init-dev  # installs/upgrades pip wheel setuptools pip-tools fab-classic fabric-bnzk
# run fabric for local dependency resolution/calculation
fab pip_compile  # fab pip_compile:true  # for upgrade mode 
# not first time users can install deps directly:
pip install -r requirements/dev.txt
# django works?
manage.py check
manage.py migrate
manage.py createsuperuser
manage.py runserver

To bootstrap/deploy on remote server::

fab bootstrap
fab deploy

have a look at fabfile.py

Tests

If available: run tox command, or ./manage.py test.

About

Django ~1.11+ project template layout, biased for django-cms. Originally based on lincolnloop/django-layout

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published