diff options
author | Andrea Crotti <andrea.crotti.0@gmail.com> | 2013-05-19 10:36:04 +0200 |
---|---|---|
committer | Andrea Crotti <andrea.crotti.0@gmail.com> | 2013-05-19 10:36:04 +0200 |
commit | 5124ab7620a2cb448a8edec7eb6cfa69c60bcc8c (patch) | |
tree | ba6fda69948b2ffaed8e0249c53b0951f7f3f9fe /tests/base | |
parent | c70ca4879ee33fc4b70ad9a17d74b649f8f75487 (diff) | |
download | django-5124ab7620a2cb448a8edec7eb6cfa69c60bcc8c.tar.gz |
add comment to explain why it's necessary to do an explicit check for
Python2 and how metaclasses are defined
Diffstat (limited to 'tests/base')
-rw-r--r-- | tests/base/models.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/base/models.py b/tests/base/models.py index bddb406820..d47ddcfd66 100644 --- a/tests/base/models.py +++ b/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): |