{% if False %}
This is a starting template for Django 1.4 projects using (a slightly modified version of) HTML5 Boilerplate.
- Global assets, web, templates and fixtures directory.
- Collects static and media into public/{static,media} respectively.
- Django admin activated by default.
- Django timezone setting changed to UTC for sanity.
- HTML 5 base template with simple 404 and 500 error templates.
- Discourages storing credentials and secrets in the repository.
- Encourages the use of developer/machine specific
settings.py
file. - Encourages the use of virtualenv and virtualenvwrapper.
- Encourages the use of pip and
requirements.txt
. - Encourages the use of git.
- Includes a .gitignore for the usual junk.
- Automatically builds a README with installation notes.
-
Install Django 1.4
-
Run the following one of the following commands, specifying your project name:
-
To use plain CSS:
django-admin.py startproject --template https://github.com/chrislawlor/django-project-skel/zipball/master --extension py,md,gitignore,dist yourprojectname
-
To use LESS:
django-admin.py startproject --template https://github.com/chrislawlor/django-project-skel/zipball/less --extension py,md,gitignore,dist yourprojectname
-
To use Twitter's Bootstrap
django-admin.py startproject --template https://github.com/chrislawlor/django-project-skel/zipball/bootstrap --extension py,md,gitignore,dist yourprojectname
-
{% endif %}
Describe {{ project_name }} here.
- Python >= 2.5
- pip
- virtualenv (virtualenvwrapper is recommended for use during development)
Create a virtual python environment for the project. If you're not using virtualenv or virtualenvwrapper you may skip this step.
mkvirtualenv --no-site-packages {{ project_name }}-env
virtualenv --no-site-packages {{ project_name }}-env
source {{ project_name }}-env/bin/activate
Obtain the url to your git repository.
git clone <URL_TO_GIT_RESPOSITORY> {{ project_name }}
cd {{ project_name }}
pip install -r requirements.txt
When you're finished installing requirements, you'll need to set up your local settings.py file:
cp {{ project_name }}/settings.py.dist {{ project_name }}/settings.py
vim {{ project_name }}/settings.py
After you configure your local settings (database, etc.) you're ready to run syncdb
:
python manage.py syncdb
Once that's completed you can boot up the dev server:
python manage.py runserver
Open browser to http://127.0.0.1:8000 -- if all went well you should see the "It works!" page.