Get_absolute_url django admin session id missing

I'm using Django's "View on site" feature to navigate from the Django admin to a specific page in my application for a model instance. On this page, a GET request is made to retrieve data using a Django ModelViewSet.

The issue is that even though I'm logged into the Django admin, when I visit the application page via "View on site," it says I'm "unauthenticated." Upon inspecting the request headers, I noticed that the session ID is not being sent.

Here’s how I’ve implemented the get_absolute_url method:

        return (
            reverse("website:emi_calculator")
            + f"?snowflake={self.snowflake}"
        )

Any help or guidance would be greatly appreciated!

Back to Top