Import the entire post_init.py file removing the need to seprate init_ prefixed functions
This commit is contained in:
@@ -5,7 +5,7 @@ import tempfile
|
||||
from .utils import validate_path
|
||||
import common.settings as common_settings
|
||||
|
||||
from .settings import TEMPORARY_DIRECTORY
|
||||
|
||||
def init_validate_temp_path():
|
||||
if (validate_path(common_settings.TEMPORARY_DIRECTORY) == False) or (not common_settings.TEMPORARY_DIRECTORY):
|
||||
setattr(common_settings, 'TEMPORARY_DIRECTORY', tempfile.mkdtemp())
|
||||
if (validate_path(getattr(common_settings, 'TEMPORARY_DIRECTORY')) == False) or (not getattr(common_settings, 'TEMPORARY_DIRECTORY')):
|
||||
setattr(common_settings, 'TEMPORARY_DIRECTORY', tempfile.mkdtemp())
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
from django.template import Library
|
||||
|
||||
from common.models import AutoAdminSingleton
|
||||
|
||||
register = Library()
|
||||
|
||||
|
||||
@register.simple_tag(takes_context=True)
|
||||
def auto_admin_properties(context):
|
||||
context['auto_admin_properties'] = AutoAdminSingleton.singleton.get()
|
||||
return u''
|
||||
Reference in New Issue
Block a user