Merge pull request #1507 from normanjaeckel/DevDir

Changed development settings path.
This commit is contained in:
Oskar Hahn 2015-03-15 11:59:37 +01:00
commit c66c0c738b
3 changed files with 4 additions and 4 deletions

View File

@ -153,7 +153,7 @@ def createsettings(args):
if settings_path is None:
settings_path = get_development_settings_path()
context = {
'openslides_user_data_path': repr(os.path.join(os.getcwd(), 'development')),
'openslides_user_data_path': repr(os.path.join(os.getcwd(), 'development', 'var')),
'debug': 'True'}
settings_path = write_settings(settings_path, **context)

View File

@ -86,9 +86,9 @@ def get_development_settings_path():
"""
Returns the path to a local development settings.
On Unix systems: 'development/settings.py'
On Unix systems: 'development/var/settings.py'
"""
return os.path.join('development', 'settings.py')
return os.path.join('development', 'var', 'settings.py')
def setup_django_settings_module(settings_path=None, development=None):

View File

@ -56,7 +56,7 @@ class TestFunctions(TestCase):
'portable/openslides/settings.py')
def test_get_development_settings_path(self):
self.assertEqual(main.get_development_settings_path(), os.sep.join(('development', 'settings.py')))
self.assertEqual(main.get_development_settings_path(), os.sep.join(('development', 'var', 'settings.py')))
def test_setup_django_settings_module(self):
main.setup_django_settings_module('test_dir_dhvnghfjdh456fzheg2f/test_path_bngjdhc756dzwncshdfnx.py')