How about having a SingletonModel in Django?

前端 未结 5 1847
一个人的身影
一个人的身影 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:56

    I think having a "singleton" model is ugly; it's dumb use of the relational database and it's bad UI, because the admin UI is built around working with lists of objects.

    Instead I prefer to use a generic solution like django-chunks or django-flatblocks for this.

提交回复
热议问题