Created
June 2, 2012 21:07
-
-
Save wbotelhos/2859958 to your computer and use it in GitHub Desktop.
Creating a Django project on Mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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