On 5/14/07, Jimmy <[EMAIL PROTECTED]> wrote:
> I have a templatetag that basically fetches archive information for a
> specific model, the only thing is I cannot figure out how to convert the
> model parameter which is passed in as a string to an actual django Model

You want the function 'get_model' in django.db.models, which takes an
application name and a model name (as strings) and returns the model
class of the given name from the given application.

An example of its use, similar to what you're trying to do, is here:

http://django-template-utils.googlecode.com/svn/trunk/template_utils/templatetags/generic_content.py

-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to