just-work / django-denormalized Goto Github PK
View Code? Open in Web Editor NEWUtils for maintaining denormalized aggregates for Django models
Utils for maintaining denormalized aggregates for Django models
The bot created this issue to inform you that pyup.io has been set up on this repo.
Once you have closed it, the bot will open pull requests for updates as soon as they are available.
If same model has two or more DenormalizedForeignKey, only first one counted correctly, because of initial state reset multiple times in post_save signal handlers.
Add support for Max/Min denormalization.
KeyError: 'episode_season'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tumbler/PycharmProjects/acms/src/tools/tests.py", line 218, in assertValidationPassed
type(obj).objects.filter(pk=obj.pk).delete()
File "/data/acms/virtualenv/lib/python3.6/site-packages/django/db/models/query.py", line 663, in delete
deleted, _rows_count = collector.delete()
File "/data/acms/virtualenv/lib/python3.6/site-packages/django/db/models/deletion.py", line 306, in delete
sender=model, instance=obj, using=self.using
File "/data/acms/virtualenv/lib/python3.6/site-packages/django/dispatch/dispatcher.py", line 175, in send
for receiver in self._live_receivers(sender)
File "/data/acms/virtualenv/lib/python3.6/site-packages/django/dispatch/dispatcher.py", line 175, in <listcomp>
for receiver in self._live_receivers(sender)
File "/data/acms/virtualenv/lib/python3.6/site-packages/denormalized/models.py", line 84, in _track_changes
foreign_objects = tracker.track_changes(instance, created, deleted)
File "/data/acms/virtualenv/lib/python3.6/site-packages/denormalized/tracker.py", line 35, in track_changes
old_foreign_object = getattr(old_instance, self.foreign_key)
When generating full aggregate for Min/Max, queryset is not filtered against self.query
in tracker.
Sometimes there is need to perform denormalization for all objects in db table (migrations, recompute after bugfixes).
Need denormalize(queryset, ...)
method to perform such bulk denormalization.
This could be done with [update from select with aggregates] (https://docs.djangoproject.com/en/2.1/ref/models/expressions/#using-aggregates-within-a-subquery-expression).
Since public interface for this app appears to have more than single class definition, documentation should be written and published to RTD.
When using refresh_from_db()
, initial version should be updated, respecting fields
arg.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.