On 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 methods
if 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
-~----------~----~----~----~------~----~------~--~---