django-yourlabs
django-yourlabs is composed of a project template and a helper command which
does what I usually do manually.
It is aimed at users who already know django and linux very well or want to
learn it. Also, it helps you provide documentation and vagrant stuff for your
collaborators who might know nothing of linux and django (the designer/CSS
integrator working on Windows ?).
Get started right away on your linux box:
virtualenv your_project_env
source your_project_env/bin/activate
pip install -e git+https://github.com/jpic/django-yourlabs.git#egg=yourlabs
yl startproject your_project
Your project is now runnable and ready to hack on and vagrant-ready (ready to
be hacked on using broken OSes).
Project template
The project template has:
- Vagrant,
- lessCSS & bootstrap, allows to code in lessCSS using bootstrap API in less
- jQuery, coffeescript,
- relevant settings which work out of the box, organnised in accordance with
best practices
- internationalization out of the box,
- my favorite apps out of the box:
- django-responsive-admin,
- sphinx for project and app documentation,
- django-debug-toolbar with plugins,
- django-extensions,
- ipdb,
- django-easy-thumbnails,
- django-haystack with whoosh,
- django-reversion,
- django-modeltranslation,
- south,
- django-compressor (support for less and coffee),
- django-autocomplete-light,
yourlabs package
As a python package, it provides a command yl which barely
decorates django-admin.py startproject to add the –template
argument automatically.
As a django app, it provides the following commands:
- yl_jquery will download the latest jquery.js in
STATIC_ROO/jquery/jquery-X.Y.Z.js and symlink it to
STATIC_ROOT/jquery/jquery.js,
- yl_commands <app> <command-name> will create
app/management/commands/<command-name>.py,
- yl_urls <app> adds app/urls.py,
- yl_views <app> parses app/urls.py and creates app/views.py,
- yl_templates <app> adds app/templates/app/base.html, which all templates
in app/templates/app/ should extend (best practice). Also, it parses
app/urls.py and app/views.py to find template names to create if
necessary.
- yl_locale <app> <language-code> will prepare/update
app/locale/<language-code>/LC_MESSAGES/django.po for translation.
- yl_haystack <app> will parse app/models.py and create
app/search_indexes.py,
- yl_autocomplete_light <app> will parse app/models.py and create
app/autocomplete_light_registry.py,
Except for startproject, all commands must be run from project root.
As an app, it provides:
- yourlabs.context_processors.expose_settings which would add {{
settings.DEBUG }} for example if settings.EXPOSE_SETTINGS=[‘DEBUG’],
Contents: