We can't modify the 5 user details tables, because the other applications
are associated with that table. It is required to map these table with user
table. But using the foreign key relationship we can only relate to one
table. How can I design models without affecting the 5 tables mentioned.
<https://lh4.googleusercontent.com/-sGRpI5-S3SE/VH2K6tCQxJI/AAAAAAAAB9A/0neUmjoNqO4/s1600/Screenshot%2Bfrom%2B2014-12-01%2B10%3A22%3A25.png>
On Tuesday, 2 December 2014 12:25:48 UTC+5:30, Scot Hacker wrote:
>
>
>
> On Monday, December 1, 2014 9:00:51 PM UTC-8, Anju SB wrote:
>>
>> Actually I can't change the models of the different user details
>> (state_data,district_data,dub-division_data,circle_data,station_data)
>> because these tables are used for other GIS activities.
>> I need to map user with these tables.
>>
>>
> Looks like you deleted the message that contained the schema for the other
> tables, but I would probably give each of them a ForeignKey connection to
> your UserProfile model. Then you can do something like
>
> profile = UserProfile.objects.get(user__username='joe')
>
> if profile.StateData:
> ....
>
> It's hard to say more without being closer to the code or having a better
> sense of your goals.
>
> ./s
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/94785055-7cea-4df2-be23-476b66094d96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.