Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[soc2010/query-refactor] Added a forgotten file from r13441.

  • Loading branch information...
commit 9b263c61f805947a06473fd5ca170e8b970aae32 1 parent 9944d8d
Alex Gaynor alex authored
Showing with 21 additions and 0 deletions.
  1. +21 −0 django/db/models/fields/structures.py
21 django/db/models/fields/structures.py
View
@@ -0,0 +1,21 @@
+from django.db.models.fields import Field
+
+
+class ListField(Field):
+ def __init__(self, field_type):
+ self.field_type = field_type
+ super(ListField, self).__init__()
+
+ def get_prep_lookup(self, lookup_type, value):
+ return self.field_type.get_prep_lookup(lookup_type, value)
+
+ def get_db_prep_save(self, value, connection):
+ return [
+ self.field_type.get_db_prep_save(o, connection=connection)
+ for o in value
+ ]
+
+ def get_db_prep_lookup(self, lookup_type, value, connection, prepared=False):
+ return self.field_type.get_db_prep_lookup(
+ lookup_type, value, connection=connection, prepared=prepared
+ )
Please sign in to comment.
Something went wrong with that request. Please try again.