Skip to content

Instantly share code, notes, and snippets.

View CrazyMath's full-sized avatar

Konstantin Moiseenko CrazyMath

View GitHub Profile
@CrazyMath
CrazyMath / models.py
Last active June 27, 2020 21:06
Singleton Model
from django.db import models
from django.core.cache import cache
class SingletonModel(models.Model):
class Meta:
abstract = True
def delete(self, *args, **kwargs):
pass