Changes between Version 1 and Version 2 of Ticket #21719, comment 15


Ignore:
Timestamp:
Mar 9, 2014, 2:01:16 PM (11 years ago)
Author:
Aymeric Augustin

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #21719, comment 15

    v1 v2  
    11Postponing most of `ModelBase.__new__` doesn't work because class decorators are executed as soon as the class is defined and they may depend on arbitrary bits of the class definition.
     2
     3{{{
     4  File "/Users/myk/Documents/dev/django/django/__init__.py", line 21, in setup
     5    apps.populate(settings.INSTALLED_APPS)
     6  File "/Users/myk/Documents/dev/django/django/apps/registry.py", line 88, in populate
     7    app_config = AppConfig.create(entry)
     8  File "/Users/myk/Documents/dev/django/django/apps/config.py", line 87, in create
     9    module = import_module(entry)
     10  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
     11    __import__(name)
     12  File "/Users/myk/Documents/dev/django/django/contrib/comments/__init__.py", line 8, in <module>
     13    from django.contrib.comments.models import Comment
     14  File "/Users/myk/Documents/dev/django/django/contrib/comments/models.py", line 45, in <module>
     15    class Comment(BaseCommentAbstractModel):
     16  File "/Users/myk/Documents/dev/django/django/utils/encoding.py", line 36, in python_2_unicode_compatible
     17    klass.__name__)
     18ValueError: @python_2_unicode_compatible cannot be applied to Comment because it doesn't define __str__().
     19}}}
Back to Top