Can’t be done. The current user is only available via the request, which is not available when using purely model functionality. Access the user in the view somehow.
More Related Contents:
- Django: signal when user logs in?
- How do I prevent fixtures from conflicting with django post_save signal code?
- Django -> queryset[index] Index out of range
- Check if a dictionary contain data true of false, then send a response back
- django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. plz help me out plz
- How to set environment variables in PyCharm?
- How do I access the request object or any other variable in a form’s clean() method?
- Best way to make Django’s login_required the default
- django template system, calling a function inside a model
- django-rest-framework 3.0 create or update in nested serializer
- Django model inheritance: create sub-instance of existing instance (downcast)?
- django change default runserver port
- Access django models inside of Scrapy
- Django, template context processors
- ‘collectstatic’ command fails when WhiteNoise is enabled
- Using Django database layer outside of Django?
- Django post_save preventing recursion without overriding model save()
- error: can’t start new thread
- Django – form.save() is not creating ModelForm
- Override a form in Django admin
- How to get python-dev for windows?
- How can I set a default value for a field in a Django model?
- django filter on the basis of text length
- Detect whether Celery is Available/Running
- Django vs other Python web frameworks?
- How to use csrf_token in Django RESTful API and React?
- Why is my static CSS not working in Django?
- Django: Serving Media Behind Custom URL
- Writable nested serializer in django-rest-framework?
- How to annotate Count with a condition in a Django queryset