Search code examples
pythondjangopostgresqldjango-sessions

Unable to access User object in models.py of Post app: Django


I'm trying to access user object in models.py I have two apps (users & employees) under my Django project, I just want to know which user added employee in the employees model at the time of displaying the employees details


Solution

  • I think this will helps you.

    https://books.agiliq.com/projects/django-admin-cookbook/en/latest/current_user.html

    If you are using default admin panel