W wc On Dec 1, 2014 9:00 PM, "Anju SB" <anjusb...@gmail.com> 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. > > > > > > On Saturday, 29 November 2014 23:00:11 UTC+5:30, Cal Leeming wrote: >> >> I'm not sure if this was one of your requirements, but as you raised the >> concern of performance I thought it was worth mentioning. >> >> Object level permissions in Django will create an additional row for >> every object you set a permission on, this can have a devastating impact on >> performance depending on how many users/objects you are storing. You can >> implement inherited permissions (e.g. explicitly define a parent model for >> each child) and have it traverse up the tree until it finds a relevant >> permission. So this allows you to make bulk changes without having to write >> a row for every related object, E.g. 1mil children belonging to a single >> parent object, you set the permissions on parent object, perm changes then >> only have to be applied once, rather than 1mil repeated. If this is >> something you need, let me know and I'll rip out the code we did for it (I >> haven't done a clean OSS release for it yet, so YMMV). It has zero admin >> panel support. >> >> Scot replied just as I was writing this, and I second his request for >> some sort of sketch up of what you are asking for, as I'm not quite sure I >> understand your original question >> >> Cal >> >> On Sat, Nov 29, 2014 at 4:49 PM, Anju SB <anju...@gmail.com> wrote: >> >>> >>> 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> 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%40googlegroups.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. >>>>> 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/a47d856c-3fc4-4f14-b629-1c2287249545%40goog >>>>> legroups.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...@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/cc35830e-471f-45f6-8011-90dbde2abb7d% >>> 40googlegroups.com >>> <https://groups.google.com/d/msgid/django-users/cc35830e-471f-45f6-8011-90dbde2abb7d%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > 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/7a86fcaf-0043-4a48-b3d4-401ba2adb8b8%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/7a86fcaf-0043-4a48-b3d4-401ba2adb8b8%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CA%2Be%2BciUYYH8xSqvFfX%2BFy2S6TFfqTaHdAC5wHus7bMhiVWigZA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.