README.md 1.57 KB
Newer Older
Anze Vavpetic's avatar
Anze Vavpetic committed
1
# Local installation of the Mothra project #
2 3 4 5 6
## Prerequisites ##

- python >= 2.5
- pip
- virtualenv/wrapper (optional)
Anze Vavpetic's avatar
Anze Vavpetic committed
7
- python headers if you're compiling Pillow from source: you need the `python-dev` package on debian systems
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

## Installation ##
### Creating the environment ###
Create a virtual python environment for the project.
If you're not using virtualenv or virtualenvwrapper you may skip this step.

#### For virtualenvwrapper ####
```bash
mkvirtualenv --no-site-packages mothra-env
```

#### For virtualenv ####
```bash
virtualenv --no-site-packages mothra-env
cd mothra-env
source bin/activate
```

### Clone the code ###
Obtain the url to your git repository.

```bash
Anze Vavpetic's avatar
Anze Vavpetic committed
30
git clone git@source.ijs.si:kt/mothra.git
31 32 33 34 35 36 37 38 39 40 41 42 43 44
```

### Install requirements ###
```bash
cd mothra
pip install -r requirements.txt
```

### Configure project ###
```bash
cp mothra/__local_settings.py mothra/local_settings.py
vi mothra/local_settings.py
```

Anze Vavpetic's avatar
Anze Vavpetic committed
45 46 47
### Enable workflow packages ###
Uncomment the packages that you need in `mothra/local_settings.py` in the `INSTALLED_APPS_WORKFLOWS_SUB` tuple.

48
### Sync database ###
Anze Vavpetic's avatar
Anze Vavpetic committed
49 50
Say "no" to creating a super-user when prompted. You'll create the user after migrations.

51
```bash
Janez K's avatar
Janez K committed
52
python manage.py syncdb --noinput
53 54
```

Janez K's avatar
Janez K committed
55 56 57 58 59
### Migrate database ###
```bash
python manage.py migrate
```

Anze Vavpetic's avatar
Anze Vavpetic committed
60 61 62 63 64 65 66
### Create super-user ###
```bash
python manage.py createsuperuser
```

### Import packages ###
```bash
Janez K's avatar
Janez K committed
67
python manage.py import_all
Anze Vavpetic's avatar
Anze Vavpetic committed
68 69
```

70 71 72 73 74
## Running ##
```bash
python manage.py runserver
```

Janez K's avatar
Janez K committed
75 76 77 78 79
## Running with debugger ##
```bash
python manage.py runserver_plus
```

Anze Vavpetic's avatar
Anze Vavpetic committed
80
Open browser to http://127.0.0.1:8000