Merge branch 'smart_staging' into master_merge_test
Conflicts: apps/common/__init__.py requirements/development.txt requirements/production.txt
This commit is contained in:
@@ -8,9 +8,7 @@ from django.db.models import signals
|
||||
from navigation.api import register_links
|
||||
|
||||
from common.conf import settings as common_settings
|
||||
|
||||
TEMPORARY_DIRECTORY = common_settings.TEMPORARY_DIRECTORY \
|
||||
if common_settings.TEMPORARY_DIRECTORY else tempfile.mkdtemp()
|
||||
from common.utils import validate_path
|
||||
|
||||
|
||||
def has_usable_password(context):
|
||||
@@ -22,7 +20,6 @@ current_user_edit = {'text': _(u'edit details'), 'view': 'current_user_edit', 'f
|
||||
|
||||
register_links(['current_user_details', 'current_user_edit', 'password_change_view'], [current_user_details, current_user_edit, password_change_view], menu_name='secondary_menu')
|
||||
|
||||
|
||||
if common_settings.AUTO_CREATE_ADMIN:
|
||||
# From https://github.com/lambdalisue/django-qwert/blob/master/qwert/autoscript/__init__.py
|
||||
# From http://stackoverflow.com/questions/1466827/ --
|
||||
@@ -50,3 +47,6 @@ if common_settings.AUTO_CREATE_ADMIN:
|
||||
dispatch_uid='django.contrib.auth.management.create_superuser')
|
||||
signals.post_syncdb.connect(create_testuser,
|
||||
sender=auth_models, dispatch_uid='common.models.create_testuser')
|
||||
|
||||
if (validate_path(common_settings.TEMPORARY_DIRECTORY) == False) or (not common_settings.TEMPORARY_DIRECTORY):
|
||||
setattr(common_settings, 'TEMPORARY_DIRECTORY', tempfile.mkdtemp())
|
||||
|
||||
Reference in New Issue
Block a user