mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +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:
parent
41759c9082
commit
f62abfc03d
4 changed files with 73 additions and 2 deletions
|
@ -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__,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue