@@ -7,6 +7,10 @@ higher. Python dependencies are listed in `requirements.txt`.
...
@@ -7,6 +7,10 @@ higher. Python dependencies are listed in `requirements.txt`.
## Getting started
## Getting started
### Database
Make sure that Postgres is installed and running, and that a database and user are set up for it. A
good guide how to do this can be found [here](https://djangogirls.gitbooks.io/django-girls-tutorial-extensions/content/optional_postgresql_installation/)(NOTE: stop before the 'Update settings' part).
### Python version
### Python version
Make sure you're using Python 3.5. If you need to use multiple versions of Python, use [pyenv](https://github.com/yyuu/pyenv).
Make sure you're using Python 3.5. If you need to use multiple versions of Python, use [pyenv](https://github.com/yyuu/pyenv).
...
@@ -24,10 +28,6 @@ Now install dependencies:
...
@@ -24,10 +28,6 @@ Now install dependencies:
(scipostenv)$ pip install-r requirements.txt
(scipostenv)$ pip install-r requirements.txt
```
```
### Database
Make sure that Postgres is installed and running, and that a database and user are set up for it. A
good guide how to do this can be found [here](https://djangogirls.gitbooks.io/django-girls-tutorial-extensions/content/optional_postgresql_installation/)(NOTE: stop before the 'Update settings' part).
### Host-specific settings
### Host-specific settings
In this project, host-specific settings are defined in the `scipost-host-settings.json` file in the directory *above* the project root. The structure is as follows:
In this project, host-specific settings are defined in the `scipost-host-settings.json` file in the directory *above* the project root. The structure is as follows:
...
@@ -67,6 +67,12 @@ To make sure everything is setup and configured well, run:
...
@@ -67,6 +67,12 @@ To make sure everything is setup and configured well, run:
(scipostenv)$ ./manage.py check
(scipostenv)$ ./manage.py check
```
```
### Create and run migrations
Now that everything is setup, we can setup the datastructures.
```shell
(scipostenv)$ ./manage.py migrate
```
### Create a superuser
### Create a superuser
In order to use the admin site, you'll need a superuser.
In order to use the admin site, you'll need a superuser.
```shell
```shell
...
@@ -74,16 +80,10 @@ In order to use the admin site, you'll need a superuser.
...
@@ -74,16 +80,10 @@ In order to use the admin site, you'll need a superuser.
```
```
### Create groups and permissions
### Create groups and permissions
Groups and their respective permissions are created using the management command
Groups and their respective permissions are created using the management command. Since users depend on the *Contributor* object to work properly, setup the first (admin) user using the `-u` and `-a` arguments.