Commit 98bd0bab authored by Douchin Nicolas's avatar Douchin Nicolas
Browse files

StockManager: add readme


Signed-off-by: Douchin Nicolas's avatarNicolas Douchin <nicolas.douchin@insa-rouen.fr>
parent b2f4c0bd
# Stock Manager
## Virtual Environment
To create the virtual environment, you need to execute the following command:
```bash
python3 -m venv venv
```
In order to activate your virtual environment, you need to execute the following command:
```bash
source venv/bin/activate
```
In order to execute the other commands, you will need your virtual environment activated
To execute the virtual environment:
```bash
deactivate
```
If you want to install requirements, execute the following command:
```bash
pip install --upgrade --requirement requirements.txt
```
## Setup
First, you need to create the settings file:
```bash
make init_settings
```
This command will create the file conf/settings.py
You'll need to define your SECRET_KEY in it, you can generate one using this command:
```bash
make secret_key
```
Copy/paste the output of this command in your settings file for the variable SECRET_KEY.
You now need to create a superuser:
```bash
make createsuperuser
```
Read the Migrations part and also the Messages part.
Once you have done the migrations part, you can add initial data to your application:
```bash
make init_data
```
You'll also need to assign group(s) to user(s). Go into the admin (usually it's http://127.0.0.1:8000/admin). If you have use initial data, groups should already be created. You'll just need to add group(s) to user(s) going in users part.
## Migrations
In order to create migrations file, you need to use the following command:
```bash
make makemigrations
```
And to apply those changes, this command:
```bash
make migrate
```
If you need to flush the database, you can use this command:
```bash
make flush
```
## Messages
Django supports i18n, it can automatically generates translations file (*.po) using this command:
```bash
make makemessages locale=your_locale
```
Example:
```bash
make makemessages locale=fr
```
Once you have completed this file, you can compile the messages:
```bash
make compilemessages locale=your_locale
```
Example:
```bash
make compilemessages locale=fr
```
## Run
To run your server, you can use this command:
```bash
make run
```
## Documentation
See the related README in docs
\ No newline at end of file
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