mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Refs #23919 -- Removed six.PY2/PY3 usage
Thanks Tim Graham for the review.
This commit is contained in:
parent
e63d98b7be
commit
c716fe8782
111 changed files with 305 additions and 1296 deletions
|
@ -13,12 +13,3 @@ class CustomBaseModel(models.base.ModelBase):
|
|||
|
||||
class MyModel(six.with_metaclass(CustomBaseModel, models.Model)):
|
||||
"""Model subclass with a custom base using six.with_metaclass."""
|
||||
|
||||
|
||||
# This is done to ensure that for Python2 only, defining metaclasses
|
||||
# still does not fail to create the model.
|
||||
|
||||
if six.PY2:
|
||||
class MyPython2Model(models.Model):
|
||||
"""Model subclass with a custom base using __metaclass__."""
|
||||
__metaclass__ = CustomBaseModel
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue