return the autenticated user in django
def miview(request):
login_user = request.user
...
in case you have not logged in return None
2016-09-23 9:44 GMT-03:00 Tim Graham <timograham@gmail.com>:
Try a web search for "django passing request to a form".--
Here's the first result: http://stackoverflow.com/questions/6325681/passing-a- user-request-to-forms
On Friday, September 23, 2016 at 7:17:32 AM UTC-4, Naresh Kumar wrote:Hello,I need filter a queryset based on current user in Django forms.kindly help me if you find any.Thanks,Naresh
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+unsubscribe@googlegroups.com .
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users .
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f98a65ca- .57da-4ec7-a2f4-d2a79f3929d2% 40googlegroups.com
Ricardo Daniel Quiroga
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAO2-wHZSEK3YO9Tnj6vEetL0D19sSnd8OH5XOp6dZYj3rkDRvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment