This is an awesome Django Project Boilerplate!!
With this code you can start a complex Django Project very quickly, with just a few steps!
Updated for Django 1.8 and Python 3!
Some of the TaskBuster Django Project Boilerplate functionalities are:
Moreover, you can learn how to create this boilerplate step by step in http://marinamele.com/taskbuster-django-tutorial. There you can learn, step by step, how TaskBuster has been done, and even do it yourself if you want to!!
To start using the Boilerplate, check out the requirements and the quick start guide!
The requirements necessary to use this Django Project Boilerplate are:
If you don't have the first two requirements, you may find this post useful: http://www.marinamele.com/2014/07/install-python3-on-mac-os-x-and-use-virtualenv-and-virtualenvwrapper.html
You can download Firefox from the official web page: https://www.mozilla.org
And if you don't have GNU gettext, check this http://marinamele.com/taskbuster-django-tutorial/internationalization-localization-languages-time-zones
This Boilerplate comes with a script, tbsteup.sh, to configure the Django Project Template. See https://github.com/webanz/taskbuster-setup for more information about how to use it.
Here are the details of the manual installation and configuration:
First, you need to download the BoilerPlate from GitHub, as a zip file or using your terminal::
$ git clone git://github.com/mineta/taskbuster-boilerplate.git
This will download the repository in your current direcotry.
This boilerplate has the DJANGO_KEY setting variable hidden.
You can generate your DJANGO_KEY http://www.miniwebtool.com/django-secret-key-generator
Keep reading to include your new Django key into your project.
This project is named TaskBuster, so if you are using this Boilerplate to create your own project, you'll have to change the name in a few places:
First, you must know your Python 3 path::
$ which python3
which is something similar to /usr/local/bin/python3.
Next, create a Development virtual environment with Python 3 installed::
$ mkvirtualenv --python=/usr/local/bin/python3 tb_dev
where you might need to change it with your python path.
Go to the virtual environment folder with::
$ cd $VIRTUAL_ENV/bin
and edit the postactivate file::
$ vi postactivate
You must add the lines: ::
export DJANGO_SETTINGS_MODULE="taskbuster.settings.development"
export SECRET_KEY="your_secret_django_key"
with your project name and your own secret key.
Next, edit the predeactivate file and add the line::
unset SECRET_KEY
Repeat the last steps for your testing environment::
$ mkvirtualenv --python=/usr/local/bin/python3 tb_test
$ cd $VIRTUAL_ENV/bin
$ vi postactivate
where you have to add the lines::
export DJANGO_SETTINGS_MODULE="taskbuster.settings.testing"
export SECRET_KEY="your_secret_django_key"
and in the predeactivate file::
unset SECRET_KEY
Next, install the packages in each environment::
$ workon tb_dev
$ pip install -r requirements/development.txt
$ workon tb_test
$ pip install -r requirements/testing.txt
Next, apply the basic migrations::
$ python manage.py validate
$ python manage.py migrate
And check that everything works by starting the server::
$ python manage.py runserver
Settings
The default language for this Project is English, and we use internatinalization to translate the text into Catalan.
If you want to change the translation language, or include a new one, you just need to modify the LANGUAGES variable in the file settings/base.py. The language codes that define each language can be found href="http://msdn.microsoft.com/en-us/library/ms533052(v=vs.85).aspx
For example, if you want to use German you should include::
LANGUAGES = (
...
'de', _("German"),
...
)
You can also specify a dialect, like Luxembourg's German with::
LANGUAGES = (
...
'de-lu', _("Luxemburg's German"),
...
)
Note: the name inside the translation function _("") is the language name in the default language (English).
More information in the http://marinamele.com/taskbuster-django-tutorial/internationalization-localization-languages-time-zones
Translation
Go to the terminal, inside the taskbuster_project folder and create the files to translate with::
$ python manage.py makemessages -l ca
change the language "ca" for your selected language.
Next, go to the locale folder of your language::
$ cd taskbuster/locale/ca/LC_MESSAGES
where taskbuster is your project folder. You have to edit the file django.po and translate the strings. You can find more information about how to translate the strings href="http://marinamele.com/taskbuster-django-tutorial/internationalization-localization-languages-time-zones#inter-translation
Once the translation is done, compile your messages with::
$ python manage.py compilemessages -l ca
Tests
If you changed the default languages (English and Catalan), you need to update your Tests to make sure the translation works correctly. Open the file functional_tests/test_all_users.py:
A list of all the commands used to run this template::
$ workon tb_dev
$ workon tb_test
$ python manage.py makemessages -l ca
$ python manage.py compilemessages -l ca
tbsetup.sh can be used to rename and adjsut the template. The script is documented at https://github.com/webanz/taskbuster-setup