Set up Development Environment
We need spend some time to set up the development environment for this project. The following servers/applications should be ready when we start the development work:
- Python, Zope, Plone
- Plone Site
at lease a Plone site is running to provide a testing intranet Plone site. - Intranet rewrite HTTPD server
this suppose to provide the Intranet site based on back-end Plone site, it should have both mod_proxy and mod_rewrite compiled. - Internet proxy HTTPD server
This server will provide the Internet access for Intranet sites. mod_proxy
we will use ProxyPass and ProxyPreserveHost - mod_wsgi in the proxy server: http://code.google.com/p/modwsgi/
this is required to run django application on httpd server! we decided to use mod_python finally!
- Maybe use both is good idea!! - django framework version 1.1.1: sqlite3 and pysqlite2
Summary of Dependences
Leocornus.django.ploneproxy is depending on the following 3rd party products/modules:
- setuptools
- Django Framework 1.1.1
- SQLite3
- pysqlite2
- mod_python
- httplib2
More about django set up
The easy database for django is SQLite 3. It is included in Python 2.5, so there is no installation required for Python 2.5
For Python 2.4, we need a bit installation and setup:
# for ubuntu $ apt-get install sqlite3 # for CentOS $ yum install sqlite3
pysqlite
SQLite3 is the default database backend for Trac, it has a details document about how to install and setup PySqlite: http://trac.edgewall.org/wiki/PySqlite
SQLite setting in Django
SQLite using a file as its database. The setting in django ti quite simple:
- create an empty sqlite3 database file: "touch /path/to/db/file.db"
- set the django application's settings.py
DATABASE_ENGIN = 'sqlite3' DATABASE_NAME = '/path/to/db/file.db'
- Now run "python manage.py syncdb" to generate the system tables for the django project.
- NOTE: If you have different user doing different work, make sure the user doing db working has write permission on the directory of the db file. SQLite will write some temp journey files within the same directory with the db file.
Tracking History
When | Who | What Done |
---|---|---|
2010-05-25 08:04 | Sean Chen |
The dev environment is working pretty good now. story is done now. -- 1.0 Hours, 100.0% Done |
2010-05-10 05:36 | Sean Chen |
set up the dev environment on Django 1.1, SQLite3, pysqlite, httplib2, and mod_python -- 2.0 Hours, 70.0% Done |