开发者

Issue with connecting django signals

开发者 https://www.devze.com 2023-03-01 07:06 出处:网络
I am trying to set up a History table that uses django signals in it in order to build a dashboard. Inside my history models.py I have:

I am trying to set up a History table that uses django signals in it in order to build a dashboard.

Inside my history models.py I have:

from django.dispatch import dispatcher
from django.db.mod开发者_StackOverflow社区els import signals
from project.models import Project

...

dispatcher.connect(update_dash, signal=signals.post_save, sender=Project)

However, .connect keeps coming up as a unresolved reference.

Oh by the way, I've used this site for a reference to start using signals. MercuryTide

Has anyone had this issue before or am I missing something?

Thanks,

Steve


That article is ancient as far as Django is concerned. Consult the latest documentation to see how we do things today.

0

精彩评论

暂无评论...
验证码 换一张
取 消