|
|
# How to setup Linux
|
|
|
|
|
|
## Requirements
|
|
|
# Requirements
|
|
|
|
|
|
In order to create the virtual environment, you need python 3 installed. This wiki page is done using the following version: `Python 3.5.2`.
|
|
|
|
|
|
|
|
|
## Virtual Environment
|
|
|
# Virtual Environment
|
|
|
|
|
|
To create the virtual environment, you need to execute the following command:
|
|
|
```bash
|
... | ... | @@ -29,7 +27,7 @@ pip install --upgrade --requirement requirements.txt |
|
|
```
|
|
|
|
|
|
|
|
|
## Setup the Django application
|
|
|
# Setup the Django application
|
|
|
|
|
|
First, you need to create the settings file:
|
|
|
```bash
|
... | ... | @@ -63,7 +61,7 @@ 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](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
|
|
|
# Migrations
|
|
|
In order to create migrations file, you need to use the following command:
|
|
|
```bash
|
|
|
make makemigrations
|
... | ... | @@ -79,7 +77,7 @@ If you need to flush the database, you can use this command: |
|
|
make flush
|
|
|
```
|
|
|
|
|
|
## Messages
|
|
|
# Messages
|
|
|
Django supports i18n, it can automatically generates translations file (*.po) using this command:
|
|
|
```bash
|
|
|
make makemessages locale=your_locale
|
... | ... | @@ -100,7 +98,7 @@ Example: |
|
|
make compilemessages locale=fr
|
|
|
```
|
|
|
|
|
|
## Run
|
|
|
# Run
|
|
|
To run your server, you can use this command:
|
|
|
```bash
|
|
|
make run
|
... | ... | |