Quick steps to having a django site on OS X, here are the terminal commands:
Assumptions -
- You have git installed
- Current python release is 2.6
- cd ~/Downloads
- git clone https://github.com/django/django.git
- mv ~/Downloads/django/django /Library/Python/2.6/site-packages/
(at this point you can test the installation by opening a python terminal and attempting to import django)
- sudo ln -s /Library/Python/2.6/site-packages/django/bin/django-admin.py /usr/bin/django-admin.py
You can now make a first project:
- cd ~/
- mkdir Django
- cd Django
- django-admin.py startproject djangoFirst
Project and Web Applications are different things, you can add a web application to a project with the following command(from within your ~/Django/djangoFirst:
That's all it takes for the basics. You can test the python project with the built in server (for dev/test purposes only, not production) with this command:
- python manage.py runserver
If you're just getting started with django I'd recommend reading up on the design patterns behind it a bit. The purpose of this post was just to get it running in OS X, anything beyond that will wait until I spend a bit more time with the environment.