Skip to content

Instantly share code, notes, and snippets.

@wbotelhos
Created June 2, 2012 21:07
Show Gist options
  • Select an option

  • Save wbotelhos/2859958 to your computer and use it in GitHub Desktop.

Select an option

Save wbotelhos/2859958 to your computer and use it in GitHub Desktop.
Creating a Django project on Mac
cd workspace
# distribute and pip / uncompressed packages
virtualenv --distribute --unzip-setuptools my_app
cd my_app
# activate an isolated environment to the project (my_app)
source bin/activate
# install the django only on project's python
pip install django==1.4
# creates the skeleton
django-admin.py startproject src
# adjust the src mess
mv src/manage.py .
mv src/src/* src
rmdir src/src
# to use relative paths on code
pip install unipath
# creates the database
manage syncdb
cd src
# creates the core skeleton
python ../manage.py startapp core
# alias to avoid calculate the path (manage runserver)
alias manage='python $VIRTUAL_ENV/manage.py'
# run the server
manage runserver
http://localhost:8000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment