added script to create a local settings
This commit is contained in:
parent
ddd251a742
commit
a7c13e3285
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,6 +12,7 @@ docs/_build/*
|
||||
build/*
|
||||
dist/*
|
||||
.DS_Store
|
||||
settings.py
|
||||
|
||||
# Unit test / coverage reports
|
||||
.coverage
|
||||
|
@ -6,4 +6,5 @@ python:
|
||||
install:
|
||||
- pip install -r requirements.txt --use-mirrors
|
||||
- pip install coverage django-discover-runner
|
||||
- python extras/scripts/create_local_settings.py
|
||||
script: coverage run ./manage.py test tests && coverage report -m
|
||||
|
15
extras/scripts/create_local_settings.py
Normal file
15
extras/scripts/create_local_settings.py
Normal file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
script_path = os.path.realpath(os.path.dirname(__file__))
|
||||
sys.path.append(os.path.join(script_path, '..', '..'))
|
||||
|
||||
from openslides.main import create_settings
|
||||
|
||||
if __name__ == "__main__":
|
||||
cwd = os.getcwd()
|
||||
create_settings(os.path.join(cwd, 'settings.py'),
|
||||
os.path.join(cwd, 'database.sqlite'))
|
Loading…
Reference in New Issue
Block a user