generator-vars-django v3.0.6
generator-vars-django

Yeoman generator for a raw Django web app.
Requirements
- Python 3
- Node >= 5.6.0
Features
- Django 1.9.6
- Gulp setup for compression/minification of static files (i.e. images, CSS, JavaScripts) and templates (i.e. HTML), dev/prod deployment and various handy manage.py shortcuts
- BrowserSync for rapid development
- Browserify
- Babel for coding in ES6 standards
- Watchify for quick Browserify rebundling
- Sass/Stylus
- Choice from 3 database types: SQLite/MySQL/PostgreSQL
- uWSGI and Nginx configurations
- H5BP favicon and app icon template
Structure
.
+-- .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
Tasks
$ 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.
Usage
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.
Release Notes
3.0.0
- Upgraded Django to 1.9.6
- Upgraded Python to v3
- Upgraded Node to minimum v5.6.0
- Simplified Gulp pipeline
- Added H5BP favicon and app icon template
2.0.0
- Updated version numbers of NPM package dependencies.
- Gulp tasks are now compressed into fewer files. As a result
require-dir
dependency is no longer necessary and is removed frompackage.json
. - Task configurations are now stored in
./tasks/.taskconfig
. favicon.png
, Apple touch and Open Graph specific icons are now moved toapp/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.- Removed
mocha
. It was never intended as a default test framework for a Django project. - Minor syntactic sugar changes.
- Lots of optimizations, particularly boosting the efficiency of automated rebuilds during development.
License
This software is released under the MIT License.
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago