Thank you Andre for your quick answer :-)

I think the second option is a good choice.

>From your expertise, does it make sense to follow this approach?
1. Add models.py to the first app added to the project
2. Use [db_table = 'users'] -- without model prefix
3. When new apps are added, refer to the first model

Thank you once again,
-igor

On Sep 29, 2:23 pm, Andre Terra <andrete...@gmail.com> wrote:
> Perhapshttps://docs.djangoproject.com/en/dev/ref/models/options/#db-table?
>
> But you really shouldn't describe the same table twice, if it's exactly the
> same thing. Move the models.py to a standalone "app" and have your two apps
> refer to that instead.
>
> Cheers,
> AT
>
>
>
>
>
>
>
> On Thu, Sep 29, 2011 at 2:28 PM, IgorS <igor.shm...@gmail.com> wrote:
> > I am new to Django. It might be a very easy question but i could not
> > google it...
>
> > If i have two django apps in the same project and both apps need to
> > use the same table in the same database, how should i describe this
> > table in two different models.py files.
>
> > Thank you,
> > -igor
>
> > --
> > 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.

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

Reply via email to