Hi, I am trying to understand an other magic thing about django: it
can convert strings to modules. In settings.py, INSTALLED_APPS is
declared like that:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
)
All it contains is strings. But django will convert those strings to
modules and import them later.
I want to do be able to do the same thing. but i don't know how. I
have a dictionnary of rederer dispatcher in settings.py:
RESOUCE_RENDERER = {
'video': 'video_player',
'audio': 'audio_player',
}
I want to use it later like this: RESOURCE_RENDERER'video' I cannot
assign directly the function name(eg video_player) because it lives in
a module that needs settings.py
Any idea?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.