Hi Paul, Depending on your use cases django-modelcluster might be of some use:
https://github.com/wagtail/django-modelcluster It's primarly for dealing with a bunch of models that have foreign key relationships, but before they're written to a database (i.e before they have primary keys that allow the foreign keys to work). At some point they are typically committed to a database but they also could be ephemeral or serialised and handed off to something else. It only supports a subset of the QuerySet API (pragmatically that which allows it to serve the purpose it was created for). Cheers, Neal On Tuesday, March 7, 2017 at 2:57:57 PM UTC, [email protected] wrote: > > > It would be really convenient for me if there was an implementation of the > QuerySet API which instead of using a database as its data source, used > in-memory model instance that had not been persisted to the database at all. > > I looked around and found nothing like this. > > Is this because nothing like this exists? Is it because it's a terrible > idea for a reason that's not obvious to me? Would it not be awesome for the > API for interacting with collections of in-memory instances and with a > database-backed collection to be the same? > > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/e5749e59-167f-48fd-9563-7cb69b5e9f6b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
