Thank your for your reply.  Actually I created another model that 
aggregates all the values from each group table.  but after analyzing I 
feel its a worst method and performance is also very low.So model re-design 
is the only way to sort out this issue and need  help for redesigning the 
models.  Because I want to add users and map these users to group details 
from the admin page.  I am very confused state and I don't know how to 
re-design and optimize the queries.   





On Saturday, 29 November 2014 18:12:09 UTC+5:30, Timothy W. Cook wrote:
>
> You may need to re-think your model design or add a model that aggregates 
> the others and use it to link to the group model?  There are many options 
> but only you know the best one. 
>
> On Sat, Nov 29, 2014 at 9:33 AM, Anju SB <anju...@gmail.com <javascript:>> 
> wrote:
>
>> But the user's details are in different models , Groups may have 
>> different fields....
>>
>>
>>
>> On Saturday, 29 November 2014 16:49:35 UTC+5:30, Timothy W. Cook wrote:
>>>
>>>
>>>
>>> On Sat, Nov 29, 2014 at 6:49 AM, Anju SB <anju...@gmail.com> wrote:
>>>
>>>> Actually my application needs to store different information about 
>>>>  each group of users and needs to map these data with the auth_user table. 
>>>>
>>>>
>>> ​Yes.  You can create a model for that information and then use the 
>>> group as a key.  ​
>>> ​There are similar examples you​ find with a search engine.  The mailing 
>>> list and stackoverflow are good places to look. 
>>>
>>>
>>>
>>>  
>>>
>>>>
>>>> On Saturday, 29 November 2014 13:34:49 UTC+5:30, Timothy W. Cook wrote:
>>>>>
>>>>>
>>>>>
>>>>> On Sat, Nov 29, 2014 at 3:51 AM, Anju SB <anju...@gmail.com> wrote:
>>>>>
>>>>>> Thank you Scot Hacker.   
>>>>>>      But my application needs more than one user from the same group. 
>>>>>>
>>>>>>
>>>>> ​You can have multiple users in a group. That is kind of the 
>>>>> definition of a group.  :-)
>>>>>
>>>>> See here: https://docs.djangoproject.com/en/1.7/topics/auth/default/ 
>>>>>
>>>>> HTH,
>>>>> Tim
>>>>> ​
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>  
>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Friday, 28 November 2014 23:24:34 UTC+5:30, Scot Hacker wrote:
>>>>>>>
>>>>>>>
>>>>>>> On Friday, November 28, 2014 3:16:41 AM UTC-8, Anju SB wrote:
>>>>>>>>
>>>>>>>> Dear Friends,
>>>>>>>>
>>>>>>>> I want to develop a django based GIS web application.  In my 
>>>>>>>> application there are different levels of users namely station level 
>>>>>>>> user, 
>>>>>>>> circle level user etc.  Each user details are provided in different 
>>>>>>>> table, 
>>>>>>>>  How can I map/ relate the user with these tables.  Pleas help me to 
>>>>>>>> solve 
>>>>>>>> this issue.  
>>>>>>>>
>>>>>>>
>>>>>>> I think of situations like this as having two prongs:
>>>>>>>
>>>>>>> 1) Various groups have various permission levels in portions of the 
>>>>>>> project
>>>>>>> 2) Group members may have additional data/fields associated with 
>>>>>>> their profiles.
>>>>>>>
>>>>>>> For #1, use Django's Groups system to assign group memberships and 
>>>>>>>  permissions as needed. You can start using those permissions 
>>>>>>> throughout 
>>>>>>> your project immediately.
>>>>>>>
>>>>>>> For #2, you can create additional profile sub-types, keyed to a base 
>>>>>>> profile. e.g. maybe everyone gets a UserProfile, while instructors also 
>>>>>>> get 
>>>>>>> an InstructorProfile that's FK'd to UserProfile. You can use post-save 
>>>>>>> signals or other mechanisms to make sure that everyone has the right 
>>>>>>> additional profile fields. Now let's say a user is looking at their 
>>>>>>> profile 
>>>>>>> editor - you could say "If user in group Instructors, also let them 
>>>>>>> edit 
>>>>>>> their associated InstructorProfile."
>>>>>>>
>>>>>>> There are many ways to skin this cat...
>>>>>>>
>>>>>>> ./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...@googlegroups.com.
>>>>>> To post to this group, send email to django...@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/5750f591-276b-49da-bfc5-61c4d0a51f07%40goog
>>>>>> legroups.com 
>>>>>> <https://groups.google.com/d/msgid/django-users/5750f591-276b-49da-bfc5-61c4d0a51f07%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> -- 
>>>>>
>>>>> ============================================
>>>>> Timothy Cook
>>>>> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
>>>>> MLHIM http://www.mlhim.org
>>>>>
>>>>>   -- 
>>>> 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...@googlegroups.com.
>>>> To post to this group, send email to django...@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/a5cb2cdb-3064-48ff-bebd-88ac90bce602%
>>>> 40googlegroups.com 
>>>> <https://groups.google.com/d/msgid/django-users/a5cb2cdb-3064-48ff-bebd-88ac90bce602%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> -- 
>>>
>>> ============================================
>>> Timothy Cook
>>> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
>>> MLHIM http://www.mlhim.org
>>>
>>>   -- 
>> 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...@googlegroups.com <javascript:>.
>> To post to this group, send email to django...@googlegroups.com 
>> <javascript:>.
>> 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/a47d856c-3fc4-4f14-b629-1c2287249545%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/a47d856c-3fc4-4f14-b629-1c2287249545%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
>
> ============================================
> Timothy Cook
> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
> MLHIM http://www.mlhim.org
>
> 

-- 
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/cc35830e-471f-45f6-8011-90dbde2abb7d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to