Django
1647
Comment: fixed broken link and a typo
|
← Revision 18 as of 2012-04-26 13:38:07 ⇥
793
mod_python is deprecated, and the examples.setting is not in the ubuntu django or django-doc deb. Related: http://stackoverflow.com/questions/4699824/django-on-ubuntu
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
Also see http://www.djangobook.com/ If you are interested in lighttpd you can have a watch to this: http://www.djangoproject.com/documentation/fastcgi/ |
Also see http://docs.djangoproject.com/ |
Line 9: | Line 8: |
== Django on Apache using mod_python == | == Django on Ubuntu == |
Line 11: | Line 10: |
Install Ubuntu-Server {{{ sudo apt-get install libapache2-mod-python python-django python-django-doc sudo vim /etc/apache2/sites-available/django-example }}} {{{ <Location "/"> SetHandler python-program PythonHandler django.core.handlers.modpython PythonDebug On PythonPath "['/usr/share/doc/python-django-doc'] + sys.path" SetEnv DJANGO_SETTINGS_MODULE examples.settings </Location> }}} {{{ sudo a2dissite default sudo a2ensite django-example sudo /etc/init.d/apache2 reload}}} Hit the box with a browser, and you should see "Django examples" and some links. == Django on Apache using mod_wsgi == Deploying Django with Apache and mod_wsgi is the recommended way to get Django into production. More information [[https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/|here]]. |
In Ubuntu the package is called [[http://packages.ubuntu.com/search?keywords=python-django|python-django]] |
Django is a python based web-framework. It can be found at http://www.djangoproject.com/.
In Django, first you define your database models as Python classes, to allow Django to understand the data and generate SQL for the database. This is essential for the DRY concept. Next, the views are written; this is where any business logic, interactions with the database and the like go. Then, regular expressions are defined to map requested URLs to the views previously written. Finally, templates are written, which are HTML(or anything composed of text) with data and simple data control sprinkled throughout.
Also see http://docs.djangoproject.com/
Django on Ubuntu
In Ubuntu the package is called python-django
Django (last edited 2012-04-26 13:38:07 by ww2)