forked from opendataphilly/Open-Data-Catalog
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.txt
67 lines (51 loc) · 1.68 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Recommended stack:
Apache2
mod-wsgi
Python 2.6+
PostgreSQL 8.4
Django 1.3
Dependancies from aptitide:
git libapache2-mod-wsgi sendmail postgresql-8.4
Python dependencies:
Dependencies are best installed in a virtualenv, so as to not conflict
with other local development.
Install dependencies via pip:
pip install -r requirements.txt
There's a problem with the dbfpy package at the time of this writing;
download at:
http://sourceforge.net/projects/dbfpy/files/
then install:
pip install dbfpy-2.2.5.tar.gz
Update apache2 conf
/etc/apache2/sites-available/default add >
WSGIScriptAlias /hidden /<project location>/odp.wsgi
Alias /media /<project location>/media
Alias /static /<project location>/static
create /<project location>/odp.wsgi >
import os, sys
sys.path.insert(0, '/home/azavea/NPower_OpenDataPhilly')
import settings
import django.core.management
django.core.management.setup_environ(settings)
utility = django.core.management.ManagementUtility()
command = utility.fetch_command('runserver')
command.validate()
import django.conf
import django.utils
django.utils.translation.activate(jangod.conf.settings.LANGUAGE_CODE)
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
Setup source
Clone project
Make media directory:
mkdir media
chmod 775 media
Make static directory:
mkdir static
chmod 775 static
Create a symbolic link to admin media:
ln -s /usr/local/lib/python2.7/dist-packages/django/contrib/admin admin_media
Sync database:
pythong manage.py syncdb
Collect static files:
python manage.py collectstatic