0

manage.py テストを実行した後、これを何度も取得します。

    ERROR 4280 140735184636256 base: Internal Server Error: /add/error/
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/django/core/handlers/base.py", line 115, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/Library/Python/2.7/site-packages/django/views/decorators/cache.py", line 89, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/django/contrib/messages/tests/urls.py", line 30, in add
    getattr(messages, message_type)(request, msg)
  File "/Library/Python/2.7/site-packages/django/contrib/messages/api.py", line 102, in error
    fail_silently=fail_silently)
  File "/Library/Python/2.7/site-packages/django/contrib/messages/api.py", line 22, in add_message
    raise MessageFailure('You cannot add messages without installing '
MessageFailure: You cannot add messages without installing django.contrib.messages.middleware.MessageMiddleware

私のsettings.pyでMessageMiddlewareが有効になっているので、理由がわかりません。どんな手掛かり?

4

1 に答える 1

0

django 独自のテストを含む、すべての定義済みテストを実行しています。テストするモジュールを指定します。

python manage.py test my_app my_other_app
于 2013-07-28T08:06:53.717 に答える