Django Admin's “view on site” points to example.com instead of my domain

后端 未结 6 931
一生所求
一生所求 2020-12-15 04:37

I added a get_absolute_url function to one of my models.

def get_absolute_url(self):
    return \'/foo/bar\' 

The admin site p

6条回答
  •  南方客
    南方客 (楼主)
    2020-12-15 04:59

    When you have edited a Site instance thought the admin, you need to restart your web server for the change to take effect. I guess this must mean that the database is only read when the web server first starts.

提交回复
热议问题