Commit e3e87393 authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion
Browse files

make usage of settings more modulable

parent b03b4026
# Metagenedb
Django based project to build metagenomics genes catalog and tools
to play with it and contact external services.
\ No newline at end of file
to play with it and contact external services.
## Run the services on your local machine
### First usage
#### Settings for Django server
As you can see, there is not a single `settings.py` file for the Django project but instead
several settings files that are located in the `settings` directory which is supposed to be a module.
Therefore, you need to add an `__init__.py` to this module and specify which settings you want to import.
For instance, if you want to have the development settings, configure the `__init__.py`:
```python
from .development import *
```
This is to allow different settings depending your environment. You can also keep all your credentials
in this `__init__.py` file.
\ No newline at end of file
......@@ -43,13 +43,10 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_extensions',
'rest_framework',
'corsheaders',
]
MIDDLEWARE = [
'corsheaders.middleware.CorsMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
......@@ -143,10 +140,3 @@ USE_TZ = True
STATIC_URL = '/static/'
# CORS
CORS_ORIGIN_ALLOW_ALL = False
CORS_ORIGIN_WHITELIST = (
'http://localhost:8080',
)
from .base import *
INSTALLED_APPS = INSTALLED_APPS + [
'django_extensions',
'corsheaders',
]
MIDDLEWARE = MIDDLEWARE + [
'corsheaders.middleware.CorsMiddleware',
]
# CORS
CORS_ORIGIN_ALLOW_ALL = False
CORS_ORIGIN_WHITELIST = (
'http://localhost:8080',
)
Supports Markdown
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