Commit 97ed71ea authored by Alice's avatar Alice

update the readme

parent f60b4d6d
......@@ -7,54 +7,55 @@ This project is a Python module, compatible with Django REST Framework and Djang
Here is the detailed explaination of the preferred installation process.
Depending on your OS and your python installation, commands could have to be run using either `python` or `python3`.
### Using sib-manager
##### Manage many project at same time
If you'll have to work on many project at the same time, we recommande to use virtualenvwrapper.
https://virtualenvwrapper.readthedocs.io/en/latest/
This is the easier way to setup the server side of the project but it is known to have some issues, especially on Ubuntu.
If you're not using virtualenvwrapper, create the python virtual environnement dedicated to the project
```sh
pip install sib-manager
sib startproject coopstarter -m coopstarter_data -m django_countries -m djangoldp_account -m djangoldp_circle -m djangoldp_conversation -m oidc_provider@django-oidc-provider
sib initproject
```
### Alternate installation procedure using virtualenv
If you get some errors about the `--user` flag and `permission denied` then you should try to setup a virtualenv first.
Then the full procedure is:
```
```shell
mkdir coopstarter
cd coopstarter
pip install virtualenv
virtualenv venv
source venv/bin/activate
pip install -U sib-manager
sib startproject coopstarter -m coopstarter_data -m django_countries -m djangoldp_account -m djangoldp_circle -m djangoldp_conversation -m oidc_provider@django-oidc-provider
cd coopstarter
sib initproject
```
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.
For both of these installation procedure, you're ok if you can see the migrations being executed by the `initproject` command.
## Running the project
From your console, at the root of the coopstarter-server directories containing the manage.py file, please run the following commands:
```shell
# Install sib-manager
pip install sib-manager
# Create your server folder
sib startproject coopstarter
# Enter in your project
cd coopstarter
```
Open the folder "package.yml", and replace the content of 'ldppackages :' by :
```
cd coopstarter
python manage.py createsuperuser
python manage.py creatersakey
oidc_provider: 'git+https://github.com/jblemee/django-oidc-provider.git@develop'
django_countries: django_countries
djangoldp_account: djangoldp_account
djangoldp_circle: djangoldp_circle
djangoldp_conversation: djangoldp_conversation
coopstarter_data: coopstarter_data
djangoldp_like: djangoldp_like
djangoldp_uploader: djangoldp_uploader
```
This command will ask you for some information (username, email, password) to generate the initial administrator of your data server.
```shell
#Create your project
sib install coopstarter
```
## Running the project
```
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment