Hi,
I want to know if its possible to convert a string object into class
object.
Basically Im trying to make some generic methods for changing the data
in the models
For your convinience, Im providing you the link to the code where Im
facing the problem
http://dpaste.com/117323/
at line no
Thanks Bruno for the tip.
On Feb 5, 2:15 pm, bruno desthuilliers
wrote:
> On 5 fév, 09:20, Saurav wrote:
>
> > Is there any way to retrieve all the model names in an app ??
>
> from django.core.db.loading import get_models
> import myapp
> for
On 5 fév, 09:20, Saurav wrote:
> Is there any way to retrieve all the model names in an app ??
from django.core.db.loading import get_models
import myapp
for model in get_models(myapp.models):
print model.__name__
--~--~-~--~~~---~--~~
Is there any way to retrieve all the model names in an app ??
-Saurav
--~--~-~--~~~---~--~~
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
4 matches
Mail list logo