GETTING-STARTED 1.14 KB
Newer Older
Enrico Zini's avatar
Enrico Zini committed
1
2
3
4

 * Running this code on your own machine

# Dependencies
5
apt-get install python-django python-ldap
Enrico Zini's avatar
Enrico Zini committed
6
7
8

# Configuration
ln -s settings.py.devel settings.py
9
edit settings.py as needed
Enrico Zini's avatar
Enrico Zini committed
10
11
12
13
14

# First setup
./manage.py syncdb

# Fill in data
15
Visit https://nm.debian.org/am/db-export to download nm-mock.json; for privacy,
16
17
sensitive information are replaced with mock strings. If you cannot login to
the site, you can ask any DD to download it for you.
Enrico Zini's avatar
Enrico Zini committed
18

19
./manage.py import nm-mock.json
Enrico Zini's avatar
Enrico Zini committed
20

21
22
If you are a Front Desk member or a DAM, you can use
https://nm.debian.org/am/db-export?full for a full database export.
Enrico Zini's avatar
Enrico Zini committed
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

# Run database maintenance
./manage.py maintenance

# Run the web server
./manage.py runserver


 * Periodic updates

You need to run periodic maintenance to check/regenerate the denormalised
fields:

   ./manage.py maintenance


 * Development

Development targets Django 1.2, as it is the version available on Debian
servers. Luckily django provides excellent backwards compatibility, so the only
thing you have to pay attention to is the version of the Django documentation
that you are reading. Check the version boxes in the bottom right of Diango
documentation pages.