Changed development settings path.
Settings and user data live now at development/var/. Move your existing directory or create new settings and database.
This commit is contained in:
parent
146548a309
commit
9b369e1afc
@ -153,7 +153,7 @@ def createsettings(args):
|
|||||||
if settings_path is None:
|
if settings_path is None:
|
||||||
settings_path = get_development_settings_path()
|
settings_path = get_development_settings_path()
|
||||||
context = {
|
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'}
|
'debug': 'True'}
|
||||||
|
|
||||||
settings_path = write_settings(settings_path, **context)
|
settings_path = write_settings(settings_path, **context)
|
||||||
|
@ -86,9 +86,9 @@ def get_development_settings_path():
|
|||||||
"""
|
"""
|
||||||
Returns the path to a local development settings.
|
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):
|
def setup_django_settings_module(settings_path=None, development=None):
|
||||||
|
@ -56,7 +56,7 @@ class TestFunctions(TestCase):
|
|||||||
'portable/openslides/settings.py')
|
'portable/openslides/settings.py')
|
||||||
|
|
||||||
def test_get_development_settings_path(self):
|
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):
|
def test_setup_django_settings_module(self):
|
||||||
main.setup_django_settings_module('test_dir_dhvnghfjdh456fzheg2f/test_path_bngjdhc756dzwncshdfnx.py')
|
main.setup_django_settings_module('test_dir_dhvnghfjdh456fzheg2f/test_path_bngjdhc756dzwncshdfnx.py')
|
||||||
|
Loading…
Reference in New Issue
Block a user