Re: Where to put generic Database Tables?

2011-03-23 Thread shacker
On Mar 22, 10:44 am, Andre Lopes  wrote:
> Hi,
>
> I'm trying to start with Django.
>
> I'm developing an App. This App is called "Directory" and will store
> info about websites.
>
> I must to create a database table called "Genders", but this is a
> generic database table and could be used in other App.
>
> My question... how to deal with this kind of situation in Django? And
> in wich model I shuld put this database table?

The Genders table will have to live in *some* app's models file -
either in the Directory app or in a new, separate app. But if Genders
is just male and female, you should probably use CHOICES for that
rather than a table.

./s

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Where to put generic Database Tables?

2011-03-22 Thread Andre Lopes
Hi,

I'm trying to start with Django.

I'm developing an App. This App is called "Directory" and will store
info about websites.

I must to create a database table called "Genders", but this is a
generic database table and could be used in other App.

My question... how to deal with this kind of situation in Django? And
in wich model I shuld put this database table?


Best Regards,

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.