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

@@ -8,6 +8,5 @@ from .models import MetadataType
available_models_string = (_(u' Available models: %s') % u','.join([name for name, model in AVAILABLE_MODELS.items()])) if AVAILABLE_MODELS else u''
available_functions_string = (_(u' Available functions: %s') % u','.join([u'%s()' % name for name, function in AVAILABLE_FUNCTIONS.items()])) if AVAILABLE_FUNCTIONS else u''
def init_set_metadata_type_help_texts():
MetadataType._meta.get_field('default').help_text=_(u'Enter a string to be evaluated.%s') % available_functions_string
MetadataType._meta.get_field('lookup').help_text=_(u'Enter a string to be evaluated. Example: [user.get_full_name() for user in User.objects.all()].%s') % available_models_string
MetadataType._meta.get_field('default').help_text=_(u'Enter a string to be evaluated.%s') % available_functions_string
MetadataType._meta.get_field('lookup').help_text=_(u'Enter a string to be evaluated. Example: [user.get_full_name() for user in User.objects.all()].%s') % available_models_string