mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Marked bytestrings with b prefix. Refs #18269
This is a preparation for unicode literals general usage in Django (Python 3 compatibility).
This commit is contained in:
@@ -388,10 +388,10 @@ def modelform_factory(model, form=ModelForm, fields=None, exclude=None,
|
||||
parent = (object,)
|
||||
if hasattr(form, 'Meta'):
|
||||
parent = (form.Meta, object)
|
||||
Meta = type('Meta', parent, attrs)
|
||||
Meta = type(b'Meta', parent, attrs)
|
||||
|
||||
# Give this new form class a reasonable name.
|
||||
class_name = model.__name__ + 'Form'
|
||||
class_name = model.__name__ + b'Form'
|
||||
|
||||
# Class attributes for the new form class.
|
||||
form_class_attrs = {
|
||||
|
||||
Reference in New Issue
Block a user