Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add comment to explain why it's necessary to do an explicit check for

Python2 and how metaclasses are defined
  • Loading branch information...
commit 5124ab7620a2cb448a8edec7eb6cfa69c60bcc8c 1 parent c70ca48
@AndreaCrotti AndreaCrotti authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 tests/base/models.py
View
4 tests/base/models.py
@@ -14,8 +14,10 @@ class CustomBaseModel(models.base.ModelBase):
class MyModel(six.with_metaclass(CustomBaseModel, models.Model)):
- """Model subclass with a custom base using six.with_metaclass."""
+ """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 not six.PY3:
class MyModel(models.Model):
Please sign in to comment.
Something went wrong with that request. Please try again.