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

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

Enrico Zini's avatar
Enrico Zini committed
10
11
    # https://github.com/spanezz/django-housekeeping
    git clone https://github.com/spanezz/django-housekeeping
Enrico Zini's avatar
Enrico Zini committed
12
      (you can either build the package from it or symlink the module directory
Enrico Zini's avatar
Enrico Zini committed
13
      into the contributors.debian.org sources)
14

15
16
17
18
19
20
21
22
    # https://github.com/jsocol/django-ratelimit
    git clone https://github.com/jsocol/django-ratelimit.git
      (you can either build the package from it or symlink the module directory
      into the nm.debian.org sources)
      Since I do not trust random stuff pulled via github, I performed a code
      review of commit d58c489797405db348b30dec6103dcfff73160ec and it looks
      safe to me (Enrico)

23
### Configuration
Enrico Zini's avatar
Enrico Zini committed
24

25
    mkdir data # required by default settings
Enrico Zini's avatar
Enrico Zini committed
26
27
    ln -s local_settings.py.devel local_settings.py
    edit local_settings.py as needed
Enrico Zini's avatar
Enrico Zini committed
28

29
30
### First setup
    
31
    ./manage.py syncdb --migrate
Enrico Zini's avatar
Enrico Zini committed
32

33
### Fill in data
34
Visit https://nm.debian.org/am/db-export to download nm-mock.json; for privacy,
Enrico Zini's avatar
Enrico Zini committed
35
36
37
38
39
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
40

41
    ./manage.py import nm-mock.json
Enrico Zini's avatar
Enrico Zini committed
42

43
44
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
45

46
47
### Sync keyrings
    rsync -az --progress keyring.debian.org::keyrings/keyrings/  ./data/keyrings/
48

49
50
### Run database maintenance
    
51
    ./manage.py housekeeping
Enrico Zini's avatar
Enrico Zini committed
52

53
54
55
### Run the web server
    
    ./manage.py runserver
Enrico Zini's avatar
Enrico Zini committed
56
57


58
## Periodic updates
Enrico Zini's avatar
Enrico Zini committed
59
60
61
You need to run periodic maintenance to check/regenerate the denormalised
fields:

62
    ./manage.py housekeeping
Enrico Zini's avatar
Enrico Zini committed
63
64


65
## Development
Enrico Zini's avatar
Enrico Zini committed
66
67
Development targets Django 1.5, although the codebase has been created with
Django 1.2 and it still shows in some places. Feel free to cleanup.