-
Make, enter and activate a virtualenv:
$ mkvirtualenv mysite -p python2.7 --no-site-packages New python executable in mysite/bin/python Installing setuptools............done. $ workon mysite
-
Clone this repo into a sub-directory of the new virtualenv:
$ git clone 'git://github.com/stephanpoetschner/django-skeleton-project.git' myproject $ cd myproject/ # Remove .empty files, used to make Hg track otherwise-empty dirs. $ find . -name '.empty' -exec rm {} \; # edit or clear .gitignore $ vi .gitignore $ echo > .gitignore
-
Remove the pointer to the GitHub project:
$ git config --unset remote.origin.url
Later you’ll probably want to re-add this configuration with a pointer to your upstream repo. You can do that with the following command:
$ git config remote.origin.url '[email protected]:USERNAME/PROJECT.git'
-
Ensure current (working) version numbers are documented
pip freeze > requirements/base.txt
-
Go through the following files, editing as necessary:
settings.py
- Update SECRET_KEY (call
./manage.py generate_secret_key
)
- Update SECRET_KEY (call
urls.py
requirements/project.txt
-
Install the basic project requirements:
$ easy_install pip $ pip install -r requirements/project.txt
As you edit your
requirements/project.txt
file, you can run that last command again;pip
will realise which packages you’ve added and will ignore those already installed. -
Commit changes
git commit -a
$ ./manage.py syncdb
$ ./manage.py runserver
$ ./manage.py test myapp