If you get some issues about missing packages at the last step `sib initproject`, then install all thoses packages one by one, such as `pip install Pillow` and so on... Then, run this command again.
Open the file "packages.yml", and replace the content of 'ldppackages :' by :
For both of these installation procedure, you're ok if you can see the migrations being executed by the `initproject` command.
```shell
#Create your project
sib install coopstarter
```
## Running the project
From your console, at the root of the coopstarter-server directories containing the manage.py file, please run the following commands:
```
cd coopstarter
```shell
python manage.py createsuperuser
python manage.py creatersakey
```
This command will ask you for some information (username, email, password) to generate the initial administrator of your data server.
```
```shell
python manage.py runserver
```
If successful, this command will make available on `127.0.0.1:8000/admin/` the administrator backend. You will then be able to log-in using the credentials you set at the previous step.
If successful, this command will make available on `127.0.0.1:8000/admin/` the administrator backend. You will then be able to log-in with 'admin' as identifier and as password.
## Initialising the database
Warning! At this step, you should can Balessan or Alice
Nota Bene : If you using virtualenvwrapper, replace "../venv" by "path/to/your/virtualenv"
As some fixtures are provided to enrich the application database easily, the following command will allow you to properly load them.
```
...
...
@@ -79,34 +89,8 @@ python manage.py migrate
And run the loaddata command once more.
If you get a error message like : `django.db.utils.OperationalError: no such table: coopstarter_data_mymissingtable, please run :
`
```
python3 manage.py migrate --run-syncdb
```
## OpenIDConnect configuration
This server uses the [Django OIDC provider](https://django-oidc-provider.readthedocs.io/en/latest/sections/installation.html) library to allow distributed authentication.
This needs to be configured. You first need to login as an administrator, and then go to the OpenIdConnect Provider section of the backend.
Please select:
- Public as *Client Type*
- id_token **token** (implicit flow) as *Response Type*
```
http://localhost:3000
http://localhost:9000
http://127.0.0.1:3000
http://127.0.0.1:9000
http://0.0.0.0:3000
http://0.0.0.0:9000
http://localhost:8001
https://staging-app.happy-dev.fr
http://localhost?goto=http://some.url
```
as *Redirect URIs*
- Then check the generated client ID and keep it somewhere.