README.md 787 Bytes
Newer Older
Julien Palard's avatar
Julien Palard committed
1
2
# How to contribute

Antoine Angot's avatar
Antoine Angot committed
3
4
5

## Requirements

6
This project requires Python 3.6 at least.
Antoine Angot's avatar
Antoine Angot committed
7

8
9

## Install
Antoine Angot's avatar
Antoine Angot committed
10

Julien Palard's avatar
Julien Palard committed
11
12
13
```
pip install -r requirements.txt
./manage.py migrate
Julien Palard's avatar
Julien Palard committed
14
15
./manage.py loaddata initial  # To get some users and exercises
# (Initial data can be updated using: ./manage.py dumpdata > website/fixtures/initial.json)
Julien Palard's avatar
Julien Palard committed
16
./manage.py createsuperuser
Jérôme's avatar
Jérôme committed
17
./manage.py runserver
Julien Palard's avatar
Julien Palard committed
18
19
```

20
To also run the moulinette, you'll need to install `firejail` and `redis` then run:
Julien Palard's avatar
Julien Palard committed
21

22
23
24
```
celery -A hkis worker
```
Julien Palard's avatar
Julien Palard committed
25

Julien Palard's avatar
Julien Palard committed
26

Julien Palard's avatar
Julien Palard committed
27
28
## Translations

Julien Palard's avatar
Julien Palard committed
29
30
Templates are translated using django `makemessages` and `compilemessages` commands:

Julien Palard's avatar
Julien Palard committed
31
```
Julien Palard's avatar
Julien Palard committed
32
$ ./manage.py makemessages --locale fr
Julien Palard's avatar
Julien Palard committed
33
# Edit the .po files
Julien Palard's avatar
Julien Palard committed
34
$ ./manage.py compilemessages
Julien Palard's avatar
Julien Palard committed
35
36
```

Julien Palard's avatar
Julien Palard committed
37
38
Exercises (title and wording) are translated via the admin (or the
API), we use django-modeltranslation.