Why do you define this model in app1 and in app2? Define it only in app1
and import it in app2 where you need (models, views, etc)

2012/7/13 Burhan <its.burha...@gmail.com>

> Hi,
>
> Thanks for the relpy, i set db_name under as meta information, now i am
> getting this error
>
> django.db.utils.DatabaseError: table "mytable_author" already exists
>
> this is because, for the app1 python syncdb has already created this
> table, now it attempts to create the same tables for app2.
>
> is it possible to use the same model class for both app, at the moment
> models.py is placed in both app1 and app2.
>
>
>
> regards
> Burhan
>
> On Friday, July 13, 2012 12:33:30 AM UTC+2, Burhan wrote:
>>
>> Hi,
>>
>> I have a project which has two applications, app_1 and app_2, when I run
>> "python manage.py syncdb" it creates tables defined in model.py (same for
>> both apps), but it creates tables like app_1_table1, app_1_table1,
>> app_2_table1, app_2_table2, however, i want both applications use the same
>> table prefix rather two different prefix.
>>
>> more precisely I want my both apps use same model and one single database.
>>
>> any help in this regard would be appreciated.
>>
>> Thanks,
>> Burhan
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/-HSSLSfEuwoJ.
>
> 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