Limit a single record in model for django app?

django, django-admin, django-models, python, python-3.x

Solution

An easy way is to use the setting's name as the primary key in the settings table. There can't be more than one record with the same primary key, so that will allow both Django and the database to guarantee integrity.

Problem

I want to use a model to save the system setting for a django app. So, I want to limit the model so it can only have one record. How to do the limit?

Original source

Related problems