Removed unused arguments and variables
parent
66b0172195
commit
37bb3ce0df
|
|
@ -13,19 +13,18 @@ from colorfield.fields import ColorField
|
||||||
class Theme(models.Model):
|
class Theme(models.Model):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def post_migrate_handler(sender, **kwargs):
|
def post_migrate_handler(**kwargs):
|
||||||
theme = Theme.get_active_theme()
|
Theme.get_active_theme()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def post_delete_handler(instance, **kwargs):
|
def post_delete_handler(**kwargs):
|
||||||
theme = Theme.get_active_theme()
|
Theme.get_active_theme()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def post_save_handler(instance, created, **kwargs):
|
def post_save_handler(instance, **kwargs):
|
||||||
theme = instance
|
if instance.active:
|
||||||
if theme.active:
|
Theme.objects.exclude(pk=instance.pk).update(active=False)
|
||||||
Theme.objects.exclude(pk=theme.pk).update(active=False)
|
Theme.get_active_theme()
|
||||||
theme = Theme.get_active_theme()
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_active_theme():
|
def get_active_theme():
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue