How about having a SingletonModel in Django?

前端 未结 5 1835
一个人的身影
一个人的身影 2020-12-16 13:29

I\'m making a very simple website in Django. On one of the pages there is a vertical ticker box. I need to give the client a way to edit the contents of the ticker box as an

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-16 13:57

    rewrite your save method so that every time a Ticker object gets saved it overwrites the existing one (if one exists).

提交回复
热议问题