Generator for Django web app + Gulp, Browserify, Sass/Stylus and more.
Yeoman generator for a raw Django web app.
.
+-- .buildpacks
+-- .editorconfig
+-- .jshintrc
+-- .gitignore
+-- .secrets
+-- app
| +-- project
| | +-- apps // Django apps go here
| | +-- settings
| | | +-- base.py
| | | +-- dev.py
| | | +-- prod.py
| | +-- urls.py
| | +-- views.py
| | +-- wsgi.py
| +-- static
| | +-- fonts
| | +-- images
| | +-- javascripts
| | | +-- application.js
| | +-- stylesheets
| | | +-- application.{scss/styl}
| | +-- videos
| | +-- apple-touch-icon-180x180-precomposed.png
| | +-- apple-touch-icon-152x152-precomposed.png
| | +-- apple-touch-icon-144x144-precomposed.png
| | +-- apple-touch-icon-120x120-precomposed.png
| | +-- apple-touch-icon-114x114-precomposed.png
| | +-- apple-touch-icon-76x76-precomposed.png
| | +-- apple-touch-icon-72x72-precomposed.png
| | +-- apple-touch-icon-60x60-precomposed.png
| | +-- apple-touch-icon-57x57-precomposed.png
| | +-- apple-touch-icon-precomposed.png
| | +-- browserconfig.xml
| | +-- favicon.ico
| | +-- favicon.png
| | +-- large.png
| | +-- launcher-icon-0-75x.png
| | +-- launcher-icon-1-5x.png
| | +-- launcher-icon-1x.png
| | +-- launcher-icon-2x.png
| | +-- launcher-icon-3x.png
| | +-- launcher-icon-4x.png
| | +-- manifest.json
| | +-- og-image.png
| | +-- robots.txt
| | +-- square.png
| | +-- tiny.png
| | +-- wide.png
| +-- templates
| | +-- base.html
| | +-- index.html
| | +-- robots.txt
| +-- manage.py
+-- build // runtime files go here
+-- node_modules
+-- tasks
| +-- .taskconfig
| +-- build.js
| +-- clean.js
| +-- serve.js
+-- gulpfile.js
+-- package.json
+-- project_name_nginx.conf
+-- project_name_uwsgi.ini
+-- README.md
+-- requirements.txt
+-- uwsgi_params
$ npm run dev
: Compiles all source files, serves the site and watches for file changes. Best used during development.
$ npm run prod
: Builds the entire project in production.
All tasks are broken into micro Gulp tasks, check out the tasks
folder for more details. Also see tasks/.taskconfig
for more custom flags such as --skip-js-min
, --skip-css-min
, etc.
Install yo
:
npm install -g yo
Install generator-vars-django
:
npm install -g generator-vars-django
Create a new directory for your project and cd
into it:
mkdir new-project-name && cd $_
Create virtualenv
and activate it:
virtualenv {path} && source {virtualenv_path}/bin/activate
Generate the project:
yo vars-django [app-name]
For details on initial setup procedures of the project, see its generated README.md
file.
require-dir
dependency is no longer necessary and is removed from package.json
../tasks/.taskconfig
.favicon.png
, Apple touch and Open Graph specific icons are now moved to app/static/img
. favicon.ico
remains in the static directory root.gulp-imagemin
is removed because it is the most taxing task in the Gulp pipeline. Images should be optimized outside of the Gulp pipeline instead.mocha
. It was never intended as a default test framework for a Django project.