Skip to content
Snippets Groups Projects
Verified Commit b9e99fa0 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

WIP: ListOfReferencesField

parent b8a94313
Branches
Tags
No related merge requests found
...@@ -26,7 +26,10 @@ from django.db.models import ( ...@@ -26,7 +26,10 @@ from django.db.models import (
Manager, Model, Field, AutoField, Manager, Model, Field, AutoField,
ForeignKey, BigAutoField, ManyToManyField) ForeignKey, BigAutoField, ManyToManyField)
from django.utils import version from django.utils import version
from django.db.models.fields.related import RelatedField from django.db.models.fields.related import (
RelatedField, lazy_related_operation)
from django.db.models.fields.related_descriptors import (
ManyToManyDescriptor)
from django.forms import modelform_factory from django.forms import modelform_factory
from django.utils.functional import cached_property from django.utils.functional import cached_property
from django.utils.html import format_html_join, format_html from django.utils.html import format_html_join, format_html
...@@ -1209,4 +1212,4 @@ class ListOfReferencesField(ManyToManyField): ...@@ -1209,4 +1212,4 @@ class ListOfReferencesField(ManyToManyField):
setattr(cls, self.name, ManyToManyDescriptor(self.remote_field, reverse=False)) setattr(cls, self.name, ManyToManyDescriptor(self.remote_field, reverse=False))
# Set up the accessor for the m2m table name for the relation. # Set up the accessor for the m2m table name for the relation.
self.m2m_db_table = partial(self._get_m2m_db_table, cls._meta) self.m2m_db_table = functools.partial(self._get_m2m_db_table, cls._meta)
...@@ -12,6 +12,7 @@ from djaosdb.sql2mongo.query import (Query, InsertQuery, SelectQuery, ...@@ -12,6 +12,7 @@ from djaosdb.sql2mongo.query import (Query, InsertQuery, SelectQuery,
from djaosdb.sql2mongo.converters import (AggColumnSelectConverter, from djaosdb.sql2mongo.converters import (AggColumnSelectConverter,
InnerJoinConverter, InnerJoinConverter,
OuterJoinConverter) OuterJoinConverter)
from djaosdb.models import ListOfReferencesField
class _MockContainer(_Container): class _MockContainer(_Container):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment