| 51 | |
| 52 | === Get the development version if you wish === |
| 53 | |
| 54 | If you want to keep up with the latest Django developments, you will need to download and install a subversion client for Windows. (e.g. [http://tortoisesvn.tigris.org/ Tortoise SVN], install it, then create a new folder somewhere. Right click on it, and choose to SVN Checkout. Give the URL of the repository as: http://code.djangoproject.com/svn/django/trunk/ and click OK.) |
| 55 | |
| 56 | === Or get the normal version === |
| 57 | Otherwise, just download Django from the main site, and extract the archive to a folder. |
| 58 | |
| 59 | === Install of Django === |
| 60 | Drop to a command prompt (start -> run -> cmd -> OK), change to your Python folder and install Django. Example: |
| 61 | {{{ |
| 62 | c:\> cd python24\django |
| 63 | c:\python24\django> python setup.py install |
| 64 | }}} |
| 65 | |
| 66 | NB: You will probably need to do some messing around with paths and such to make this work neatly. I'm afraid I'm leaving that to you for now. Without doing that you can still test the Django install, but will need a full path to django-admin.py: |
| 67 | |
| 68 | {{{ |
| 69 | E:\> md test |
| 70 | e:\> cd test |
| 71 | E:\test>d:\Python24\django\django\bin\django-admin.py startproject proj |
| 72 | |
| 73 | E:\test>cd proj |
| 74 | |
| 75 | E:\test\proj>python manage.py runserver |
| 76 | Validating models... |
| 77 | 0 errors found. |
| 78 | |
| 79 | Django version 0.95 (post-magic-removal), using settings 'proj.settings' |
| 80 | Development server is running at http://127.0.0.1:8000/ |
| 81 | Quit the server with CTRL-BREAK. |
| 82 | }}} |
| 83 | |
| 84 | Now open a web browser, and visit the site. It should serve a neat page to you. |
| 85 | |
| 86 | === Linking Django to PyISAPI === |
| 87 | Next, you must follow the readme in the PyISAPI examples\django folder (it explains where to copy two files). Then edit the isapi.py file you just copied. See where it says you should change a line? If applicable, edit it for your django.settings.module settings. |
| 88 | |
| 89 | === Serving Django with IIS === |
| 90 | You have created a new virtual folder in IIS, and added the PyISAPI extension, and tweaked it to drive django sites. |
| 91 | There is also an addition to Django so it can be driven by PyISAPIe. |
| 92 | And, you can now use django-admin.py to create a site inside the virtual folder. |
| 93 | |
| 94 | You have everything you need to have Django running from IIS. |
| 95 | |
| 96 | ... |
| 97 | |
| 98 | I'll update this page when I get it working. ;) |