point should be fine. If your distribution provides a sufficiently
recent version of django, you can use that; if not, do a:
- cd lib/python
- svn checkout http://code.djangoproject.com/svn/django/trunk .
-
- You'll need to customise apps/settings.py to suit your database, and
- change the SECRET_KEY variable too. While you're there, change the
- following to suit your installation:
-
- SECRET_KEY
- ADMINS,
+ cd lib/packages
+ svn checkout http://code.djangoproject.com/svn/django/trunk django
+ cd ../python
+ ln -s ../packages/django/django ./django
+
+ We also use the django-registration infrastructure from
+ http://code.google.com/p/django-registration/
+
+ cd lib/packages/
+ svn checkout \
+ http://django-registration.googlecode.com/svn/trunk/registration/ \
+ django-registration
+ cd ../../apps
+ ln -s ../lib/packages/django-registration ./registration
+
+ (OPTIONAL) If you want to enable the Patchwork XML-RPC interface,
+ which is required for pwclient to work, you'll need to set up the
+ django_xmlrpc package:
+
+ cd lib/packages/
+ wget \
+ http://django-xmlrpc.googlecode.com/files/django_xmlrpc-0.1.tar.gz
+ tar -zxf django_xmlrpc-0.1.tar.gz
+ cd ../../apps
+ ln -s ../lib/packages/django_xmlrpc ./django_xmlrpc
+
+ The settings.py file contains default settings for patchwork, you'll
+ need to configure settings for your own setup.
+
+ Rather than edit settings.py, create a file 'local_settings.py', and
+ override or add settings as necessary. You'll need to define the
+ following:
+
+ SECRET_KEY
+ ADMINS
TIME_ZONE
LANGUAGE_CODE
- MEDIA_ROOT
You can generate the SECRET_KEY with the following python code:
chars = string.letters + string.digits + string.punctuation
print repr("".join([random.choice(chars) for i in range(0,50)]))
+ If you have patchwork installed in somewhere other than /srv/patchwork,
+ you'll also need to define:
+
+ MEDIA_ROOT
+ TEMPLATE_DIRS
+
+ If you wish to enable the XML-RPC interface, add the following to
+ your local_settings.py file:
+
+ ENABLE_XMLRPC = True
+
Then, get patchwork to create its tables in your configured database:
cd apps/
- ./manage.py syncdb
+ PYTHONPATH=../lib/python ./manage.py syncdb
And add privileges for your mail and web users:
psql -f lib/sql/grant-all.sql patchwork
+
3. Apache setup
Example apache configuration files are in lib/apache/.