README.md 1.56 KB
Newer Older
1
2
Debian NM Front Desk web application
====================================
Enrico Zini's avatar
Enrico Zini committed
3

4
5
6
7
## Running this code on your own machine
### Dependencies
    
    apt-get install python-django python-ldap python-psycopg2 python-xapian python-debian
Enrico Zini's avatar
Enrico Zini committed
8

9
### Configuration
Enrico Zini's avatar
Enrico Zini committed
10

11
12
13
    mkdir data # required by default settings
    ln -s settings.py.devel settings.py
    edit settings.py as needed
Enrico Zini's avatar
Enrico Zini committed
14

15
16
17
### First setup
    
    ./manage.py syncdb
Enrico Zini's avatar
Enrico Zini committed
18

19
### Fill in data
20
Visit https://nm.debian.org/am/db-export to download nm-mock.json; for privacy,
Enrico Zini's avatar
Enrico Zini committed
21
22
23
24
25
sensitive information are replaced with mock strings.

If you cannot login to the site, you can ask any DD to download it for you.
There is nothing secret in the file, but I am afraid of giving out convenient
email databases to anyone.
Enrico Zini's avatar
Enrico Zini committed
26

27
    ./manage.py import nm-mock.json
Enrico Zini's avatar
Enrico Zini committed
28

29
30
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
31

32
33
### Sync keyrings
    rsync -az --progress keyring.debian.org::keyrings/keyrings/  ./data/keyrings/
34

35
36
37
### Run database maintenance
    
    ./manage.py maintenance
Enrico Zini's avatar
Enrico Zini committed
38

39
40
41
### Run the web server
    
    ./manage.py runserver
Enrico Zini's avatar
Enrico Zini committed
42
43


44
## Periodic updates
Enrico Zini's avatar
Enrico Zini committed
45
46
47
You need to run periodic maintenance to check/regenerate the denormalised
fields:

48
    ./manage.py maintenance
Enrico Zini's avatar
Enrico Zini committed
49
50


51
## Development
Enrico Zini's avatar
Enrico Zini committed
52
53
54
55
56
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.