S
S
sergiofollan2018-03-06 22:27:09
Django
sergiofollan, 2018-03-06 22:27:09

Why are they not displayed immediately when changing the code in django on the site?

Hello. I started working with Python, and immediately the following problem arose:
I edit the admin panel (blog/models.py), added the function

def notify_admin(sender, instance, created, **kwargs):
    if created:
        print("Yes")
        
signals.post_save.connect(notify_admin, sender=Post)

In theory, it should display text, but in reality nothing happens.
What could be the problem? And I deleted the compiled script, and nothing helps.
But not only in this code, but everywhere I change or add something - changes do not occur immediately, but after some incomprehensible time, and if I had errors in the code, they are shown only after a while.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
iQQator, 2018-03-07
@iDevPro

How do you start a project?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question