Lost "View on Site" button with change to course.absolute_url
Closed this issue · 1 comments
ssciolla commented
Thank you for contributing to this project!
- Make sure to search the issues for duplicates first!
Expected behavior (A clear and concise description of what you expected to happen) :
The admin page used to have a "View on Site" button, which is automatically generated when a model has a get_absolute_url
method.
Describe the bug (Tell us what happens instead of the expected behavior) :
It looks like in PR #915 when we changed to using a property (i.e. course.absolute_url
), we lost this button, meaning a link is no longer available from the edit page, only from the course list.
Screenshots/Video (If possible, add media to help explain your problem) :
The course referenced above is fabricated.
Additional context (Add any other context about the problem here) :
I think we can keep the property implementation and just add back a get_absolute_url
method that uses the property. Something like this:
def get_absolute_url(self):
return self.absolute_url
jennlove-um commented
Testing passes: The button displays and works as expected.