Django :: setup for the form examples

I normally develop on Windows and deploy on Linux which has so far worked without a single problem. On my development system I followed the effbot receipe to get Django up and running in five minutes. That receipe was written before Django 0.95 was released, and we’re not going to be using the database, so you can simplify the process by downloading and installing version 0.95 from the Django download page. I’m using Python 2.4.3, but this should work with Python 2.5 also. The Django 0.95 release doesn’t support the sqlite3 that comes bundled with Python 2.5, so you’d have to use the current development version until a new official release is cut if this is going to be important to you (as I was saying, for these examples it won’t be).

I did use the effbot’s exemakerutility to turn django-admin.py into an executable. Exemaker is very cute, I highly recommend it. If you elect to not use exemaker, you’ll have to change the first line below to something that will find django-admin.py (it will normally be in c:\python24\scripts).

c:\> django-admin startproject mysite
c:\> cd mysite
c:\mysite> mkdir templates
c:\mysite> python manage.py startapp myapp

Change settings.py, adding “/mysite/templates” to TEMPLATE_DIRS, and adding “mysite.myapp” to INSTALLED_APPS. Then start the server:

c:\mysite> python manage.py runserver

That’s it, click here to check that it worked — you should be seeing a page that says “It worked!” 😉

This entry was posted in django. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *