Skip to content
Snippets Groups Projects
Commit a02908c0 authored by Valentin Groues's avatar Valentin Groues :eyes:
Browse files

add local settings template file

parent 7d59df2f
No related branches found
No related tags found
1 merge request!11add local settings template file
...@@ -16,3 +16,5 @@ local_settings.py ...@@ -16,3 +16,5 @@ local_settings.py
#tmp files #tmp files
appointment-import/testFiles/~* appointment-import/testFiles/~*
appointment-import/tmp.sql appointment-import/tmp.sql
.idea
*.iml
...@@ -14,39 +14,8 @@ ...@@ -14,39 +14,8 @@
- `virtualenv env` to create new virtualenv (contains clean python working environment) - `virtualenv env` to create new virtualenv (contains clean python working environment)
- `. env/bin/activate` (to start using virtualenv) - `. env/bin/activate` (to start using virtualenv)
- `pip install -r requirements.txt` to install project's dependencies - `pip install -r requirements.txt` to install project's dependencies
- Create `local_settings.py` file in `(./scheduling-system)/smash/smash` directory (see template below), and change your database connection data: - Create `local_settings.py` file in `(./scheduling-system)/smash/smash` directory by copying the template in `(./scheduling-system)/smash/smash/local_settings.template` and edit your local_setttings.py file to change your database connection data.
```
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'Paste long random string here' # Insert long random string
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
WSGI_APPLICATION = 'smash.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'smashdb', # Insert your database's name
'USER': 'postgresmashuser', # Insert your database's user
'PASSWORD': 'thePOSTGRESpassword', # Insert your user's password
'HOST': 'localhost',
'PORT': '' # '' === default one # Empty string is OK
# If to use sqlite
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
STATIC_ROOT = '/tmp/static' # Warning! `/tmp` directory can be flushed in any moment; use a persistent one; e.g. ~/tmp/static
MEDIA_ROOT = '/tmp/media' # Warning! `/tmp` directory can be flushed in any moment; use a persistent one, e.g. ~/tmp/media
```
- Update migration db scrpit from file structure (`./scheduling-system/smash/manage.py makemigrations`) - Update migration db scrpit from file structure (`./scheduling-system/smash/manage.py makemigrations`)
- Create the database by applying migrations (`./scheduling-system/smash/manage.py migrate`) - Create the database by applying migrations (`./scheduling-system/smash/manage.py migrate`)
- Create the first, administrative, user- (`./scheduling-system/smash/manage.py createsuperuser`) - Create the first, administrative, user- (`./scheduling-system/smash/manage.py createsuperuser`)
......
Django==1.10.3 Django==1.10.3
gunicorn==19.6.0 gunicorn==19.6.0
Pillow==3.4.2 Pillow==3.4.2
pkg-resources==0.0.0
psycopg2==2.6.2 psycopg2==2.6.2
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'Paste long random string here' # Insert long random string
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
WSGI_APPLICATION = 'smash.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'smashdb', # Insert your database's name
'USER': 'postgresmashuser', # Insert your database's user
'PASSWORD': 'thePOSTGRESpassword', # Insert your user's password
'HOST': 'localhost',
'PORT': '' # '' === default one # Empty string is OK
# If to use sqlite
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
STATIC_ROOT = '/tmp/static' # Warning! `/tmp` directory can be flushed in any moment; use a persistent one; e.g. ~/tmp/static
MEDIA_ROOT = '/tmp/media' # Warning! `/tmp` directory can be flushed in any moment; use a persistent one, e.g. ~/tmp/media
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment