00af109e2f
* add flake8 to pre-commit config, and fixup many things to make flake8 happy * add isort and sort all imports, add to pre-commit and requirements
21 lines
545 B
Python
21 lines
545 B
Python
import logging
|
|
|
|
from django.apps import AppConfig
|
|
from django.db.models.signals import post_save
|
|
|
|
from .signals import ticket_changed
|
|
|
|
logger = logging.getLogger("bornhack.%s" % __name__)
|
|
|
|
|
|
class TicketsConfig(AppConfig):
|
|
name = "tickets"
|
|
|
|
def ready(self):
|
|
# connect the post_save signal, including a dispatch_uid to prevent it being called multiple times in corner cases
|
|
post_save.connect(
|
|
ticket_changed,
|
|
sender="tickets.ShopTicket",
|
|
dispatch_uid="shopticket_save_signal",
|
|
)
|