On Sun, 2009-01-11 at 13:06 -0800, issya wrote:
> Would it be possible to get a feature added that is like
> django.db.models.get_model? With the get_model function you can use it
> in a template tag and get a model out of it. I am sure you already
> know this though. :) But it would be great to be able to do the same
> thing with a form.

get_model() only works because all models are "registered" with Django
(which is primarily required to implement backwards-relations, but can
also be exploited by something like the admin to get a list of models).
There's no concept of forms being registered. That is, Django has
precisely no idea what forms exist in your Python files. So get_form()
wouldn't work without adding extra requirements.

Even registering the forms automatically (if we only restricted things
to python files in installed apps, which would be a restriction on what
is possible now) would be quite painful.

So I don't think this is a very practical idea.

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to