-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Django Admin exception when saving a multi-table model #96
Comments
Hi! See at this patch. It rejected, but working in my production. |
First, sorry for slow response, I'm on vacation right now. Second, multi-table inheritance is not supported right now. README states that it's waiting champion to implement it. I suggest you guys team up on this if you are interested enough. Regarding #94, I closed it cause it doesn't correspond to stated goal (more robust m2m invalidation) nor does it enables multi-table inheritance support. I will reopen it as solving "Multi-table inheritance exploding" problem. However, it should be complemented with with real support for multi-table models, as silently leaving something hanging up not invalidated would cause grief, see #31. @4randd, you can try if #94 patch solves your problem. Please come back with a feedback. |
Thanks @ttyS15 @Suor . Yes, the patch solves my problem. Saving models from Admin interface doesn't throw an exception any more. As @ttyS15 mentioned that he has been using this in production so I think I am gonna keep it, until I see any problem related to this. @Suor I understand that multi-table inheritance doesn't work in cacheops but I read your comment somewhere that by 'doesn't work' it just means that cacheops won't invalidate child model when parent model is updated and vice-versa, so I thought that I check with you about my problem. |
@4randd, you are welcome. You don't really need to understand the whole django to contribute to cacheops. There is also a post explaining how cacheops works - http://hackflow.com/blog/2014/03/09/on-orm-cache-invalidation/. |
Thank @Suor for the very informative post. I will try and do some hacking with cacheops/django. |
Yes, #94 being merged and released in 2.1 closes this. Thanks everyone. |
I am using cacheops in my Django project with multiple apps. Whenever I try to save a multi-table model it gives a FieldError. In my models the hierarchy is like this:
Item -> Issue -> Suggestion
Save operation for Item class works fine but not for Issue or Suggestion. Error comes only when saving through Admin interface and not through API or django shell. I am using Django 1.6.2 with django-cacheops version 2 installed using pip. Please let know if any more information is needed.
Here's class Issue:
Here's class Suggestion:
The text was updated successfully, but these errors were encountered: