tl-its-umich-edu/my-learning-analytics

"View on Site" not working in Django Admin

Closed this issue · 2 comments

Thank you for contributing to this project!

  • Make sure to search the issues for duplicates first!

Expected behavior (A description of what you expected to happen) :

Clicking "View on Site" in the top right of the course editing admin page should take you to the course's landing page.

Describe the bug (Tell us what happens instead of the expected behavior) :

The URL of this button is now something like this /admin/r/5/17700000000XXXXXX/, and doesn't seem to use get_absolute_url as the docs would suggest. https://docs.djangoproject.com/en/3.2/ref/models/instances/#get-absolute-url

Additional context (Add any other context about the problem here) :

Related issue: #936

Seems like we may need to add something like this, though I'm not sure why:
https://docs.djangoproject.com/en/3.2/ref/contrib/admin/#django.contrib.admin.ModelAdmin.view_on_site

Possibly related:
https://code.djangoproject.com/ticket/27757

The View on Site button is working as expected in MyLA beta.

The View on Site button is working as expected in MyLA test.