These are chat archives for django/django

8th
Apr 2017
cs89gr
@cs89gr
Apr 08 2017 17:37
how can i create a function to take automate user id for any user request to avoid ask user id in the views ?
Ismael Venegas Castelló
@SalchiPapa
Apr 08 2017 19:06
@cs89gr
def foo(request):
    # ...
    user_id = request.user.id
    # ...
cs89gr
@cs89gr
Apr 08 2017 19:35
how put foo in user ?for example user = models.ForeignKey(settings.AUTH_USER_MODEL) or other