summaryrefslogtreecommitdiff
path: root/tests/admin_widgets/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/admin_widgets/models.py')
-rw-r--r--tests/admin_widgets/models.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/admin_widgets/models.py b/tests/admin_widgets/models.py
index b5025fdfd7..88bf2b8fca 100644
--- a/tests/admin_widgets/models.py
+++ b/tests/admin_widgets/models.py
@@ -27,6 +27,14 @@ class Band(models.Model):
return self.name
+class UnsafeLimitChoicesTo(models.Model):
+ band = models.ForeignKey(
+ Band,
+ models.CASCADE,
+ limit_choices_to={'name': '"&><escapeme'},
+ )
+
+
class Album(models.Model):
band = models.ForeignKey(Band, models.CASCADE)
featuring = models.ManyToManyField(Band, related_name='featured')