mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #27295 -- Added a system check to prohibit model names that start or end with an underscore or contain double underscores.
This commit is contained in:
committed by
Tim Graham
parent
41759c9082
commit
f62abfc03d
@@ -794,7 +794,7 @@ class RelativeFieldTests(SimpleTestCase):
|
||||
pass
|
||||
|
||||
for related_name in related_names:
|
||||
Child = type(str('Child_%s') % str(related_name), (models.Model,), {
|
||||
Child = type(str('Child%s') % str(related_name), (models.Model,), {
|
||||
'parent': models.ForeignKey('Parent', models.CASCADE, related_name=related_name),
|
||||
'__module__': Parent.__module__,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user