postgresql by default
This commit is contained in:
parent
cf0ced6021
commit
978dc1de6c
14
README.md
14
README.md
|
@ -29,12 +29,20 @@ ainsi qu'un user med et un mot de passe associé.
|
||||||
Voici les étapes à éxecuter pour mysql :
|
Voici les étapes à éxecuter pour mysql :
|
||||||
|
|
||||||
```SQL
|
```SQL
|
||||||
CREATE DATABASE club-med;
|
CREATE DATABASE med;
|
||||||
CREATE USER 'club-med'@'localhost' IDENTIFIED BY 'password';
|
CREATE USER 'med'@'localhost' IDENTIFIED BY 'password';
|
||||||
GRANT ALL PRIVILEGES ON club-med.* TO 'club-med'@'localhost';
|
GRANT ALL PRIVILEGES ON med.* TO 'med'@'localhost';
|
||||||
FLUSH PRIVILEGES;
|
FLUSH PRIVILEGES;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Et pour postgresql :
|
||||||
|
|
||||||
|
```SQL
|
||||||
|
CREATE DATABASE med;
|
||||||
|
CREATE USER med WITH PASSWORD 'password';
|
||||||
|
GRANT ALL PRIVILEGES ON DATABASE med TO med;
|
||||||
|
```
|
||||||
|
|
||||||
## Exemple de groupes de droits
|
## Exemple de groupes de droits
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
# Copyright (C) 2017-2019 by BDE ENS Paris-Saclay
|
# Copyright (C) 2017-2019 by BDE ENS Paris-Saclay
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
# Needed to filter which host are trusted
|
# Needed to filter which host are trusted
|
||||||
ALLOWED_HOSTS = ['med.crans.org']
|
ALLOWED_HOSTS = ['med.crans.org']
|
||||||
|
|
||||||
|
@ -32,11 +30,14 @@ SECRET_KEY = 'CHANGE ME !!!'
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': {
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
'NAME': 'med',
|
||||||
|
'USER': 'med',
|
||||||
|
'PASSWORD': 'password_to_store_in_env',
|
||||||
|
'HOST': 'db',
|
||||||
|
'PORT': '',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,3 +9,4 @@ python-stdnum==1.10
|
||||||
djangorestframework==3.9.2
|
djangorestframework==3.9.2
|
||||||
pyyaml==3.13
|
pyyaml==3.13
|
||||||
coreapi==2.3.3
|
coreapi==2.3.3
|
||||||
|
psycopg2
|
||||||
|
|
Loading…
Reference in New Issue