1

I have a project that is connected to an external database and just have view access to it. So I created my models with managed=False flag.

I was wondering how can I find out in django that any change in that database is happened. Is there any solution in django or I should find a method to communicate between that database and my django app. like socket, database triggers and ...?

More details:

Image my models is like this:

class Alert(models.Model):
    key = models.CharField(max_length=20)

class Meta:
    managed = False

Now i want to be notified in django each time the database is updated. I want a signal to capture database updates and do something in django?

Reza Torkaman Ahmadi
  • 2,958
  • 2
  • 20
  • 43
  • [This question](https://stackoverflow.com/questions/37215104/calling-an-url-from-a-trigger-in-mysql) seems related. Or, to clarify, you could set up a view in django that, upon request, will get "the new stuff" from db. Then in your DB set up a trigger to call that view... just an idea. – ivissani Dec 07 '18 at 01:54
  • Thanks. I saw that before. But I read it again. maybe find a way to solve my problem from it. – Reza Torkaman Ahmadi Dec 07 '18 at 06:13

0 Answers0