Hi,

On Sat, 2008-05-17 at 00:44 -0700, mwebs wrote:
> Hi,
> 
> is there any possibility to get the db table name of a model instance
> at runtime
>  (news.get_table_name())?

Yes:
News._meta.db_table and news_object._meta.db_table both work.

I think that _meta is an implementation detail however, therefore I
don't know if you can rely on the _meta attribute. I don't see a reason
why it should go away or be renamed however, so you are probably safe
using it.

-- 
http://spinlock.ch/blog/

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