Russell Keith-Magee wrote:
> > 1. In the Python code, how can I access various Meta properties of a
> > model (e.g. verbose_name, etc). At the moment, I do it via
> > model._meta.verbose_name, but I always get chills down my spine when I
> > access properties beginning with a single underscore. Is
Hi,
1. In the Python code, how can I access various Meta properties of a
model (e.g. verbose_name, etc). At the moment, I do it via
model._meta.verbose_name, but I always get chills down my spine when I
access properties beginning with a single underscore. Is there a
"proper" way?
2. Can someone
Hi,
If I do some_object.users.add(user), it won't complain if the user was
already in some_object.
Likewise, if I do some_object.users.remove(user), it won't complain if
the user was never there.
Can I rely on this behavior in the future?
I currently do explicit checks: I create a list of all
Thanks for all the replies.
Wonder why they didn't add it to the documentation...seems like a
useful function.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
Hi,
I needed a way to get a list of all models in a Django project.
I was told in IRC that I can use get_models from django.db.models.
I'm not sure this is documented in the docs. Is it "safe" to use (as
in this method and its behavior is not expected to change in the
future)?
Thanks.
--~--~-
5 matches
Mail list logo