soniiic wrote:
Becouse I have other table with relation to clients I and these tables don't have relation with usersOn Mar 31, 10:31 pm, Mitko Masarliev <m.masarl...@gmail.com> wrote:I have application with table name clients. Clients has one to one relation with django users and in all app logic I check clients id by request.user.id, In some cases user_id is not same as clients_id. This is the problem, so I am trying to change request.user.id to be equal to clients_id and this will halp me rewriting many classes and methodsif you got a one to one relationship why can't you just do this: client = Clients.objects.filter(user=request.user)...where user is your relationship field in the Client model. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~--- --
Regards,
|
- Modifu request.user Masarliev
- Re: Modifu request.user Jeff FW
- Re: Modifu request.user Masarliev
- Re: Modifu request.user Dougal Matthews
- Re: Modifu request.user Mitko Masarliev
- Re: Modifu request.use... soniiic
- Re: Modifu request... Митко Масарлиев
- Re: Modifu req... soniiic