Import the entire post_init.py file removing the need to seprate init_ prefixed functions

This commit is contained in:
Roberto Rosario
2012-09-26 22:32:34 -04:00
parent 11aa9e64f1
commit 7cebb82e1c
12 changed files with 160 additions and 108 deletions

View File

@@ -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())

View File

@@ -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''