Is it possible to retrieve a list of attributes valid for a given
model object, without actually having an instance of that object? I
want to be able to check if a given attribute is present on a model.

Currently, I'm doing this:
dummy = MyModelObject()
if attributeName in dir(dummy):
    # do something

But I would like to do it without referencing any model instance.

-- 
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.

Reply via email to