0

view_on_site works perfect on localhost, but when I tried in production return this: https://https//expample.com//accounts/details/9/ What can i do to fix it?

Ve g
  • 13
  • 4

1 Answers1

0

I don't know why but when I detele view_on_site = True and override view_on_site method to this:

def view_on_site(self, obj):
    return obj.get_absolute_url()

It fixed.

Ve g
  • 13
  • 4