-
Notifications
You must be signed in to change notification settings - Fork 4
convert new signal #105
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from django.apps import AppConfig | ||
from django.db.models.signals import post_migrate | ||
from fluff.signals import catch_signal | ||
|
||
|
||
class FluffAppConfig(AppConfig): | ||
name = 'fluff' | ||
|
||
def ready(self): | ||
post_migrate.connect(catch_signal, sender=self) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doing this means the signal only gets fired once (for this app) instead of for every app. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Curious if you think we need to worry about this:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think so but could be good practice to do it anyway. On 19 October 2015 at 19:46, Ethan Soergel notifications@github.com wrote:
Simon Kelly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neat (had to go read the docs to figure out what this was doing)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
global magic!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea, I didn't really want to go this route but also didn't want to have to coordinate with an update to settings.py