0

I am developing my site locally and I was getting an error like this

 File "/app/.heroku/python/lib/python3.5/site-packages/djcelery/schedulers.py", line 98, in save
 obj = self.model._default_manager.get(pk=self.model.pk)
 AttributeError: 'PeriodicTask' object has no attribute '_default_manager'

so I changed it to this

    Model = type(self.model)
    obj = Model._default_manager.get(pk=self.model.pk)

I thought that when i did a git heroku push it would change accordingly. But it did not, it only affects the local environment. which makes sense, because heroku uses requirements.txt for the dependencies it downloads into itself. But how can I fix this because it won't work in deployment. I thought I figured it out but that was just locally where it was rectified remotely on heroku is another issue.

bcmcfc
  • 25,966
  • 29
  • 109
  • 181
losee
  • 2,190
  • 3
  • 29
  • 55

1 Answers1

1

I solved this problem by modifying original app on git. Making clone, modifying it and then adding to requirements.txt this line: git+git://github.com/user/appname@branch_name (you have to use your modified apps url @ branch_name) This installs your modified app.

JSalys
  • 159
  • 2
  • 3