File "managers.py", line 2, in <module> from django.contrib.sites.models import Site
File "/usr/lib/python2.7/dist-packages/django/contrib/sites/models.py", line 7, in <module> from django.db import models
File "/usr/lib/python2.7/dist-packages/django/db/models/__init__.py", line 6, in <module> from django.db.models.query import Q, QuerySet, Prefetch # NOQA
File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 16, in <module> from django.db.models import sql
File "/usr/lib/python2.7/dist-packages/django/db/models/sql/__init__.py", line 2, in <module> from django.db.models.sql.subqueries import * # NOQA
File "/usr/lib/python2.7/dist-packages/django/db/models/sql/subqueries.py", line 9, in <module> from django.db.models.sql.query import Query
File "/usr/lib/python2.7/dist-packages/django/db/models/sql/query.py", line 17, in <module> from django.db.models.aggregates import Count
File "/usr/lib/python2.7/dist-packages/django/db/models/aggregates.py", line 5, in <module> from django.db.models.expressions import Func, Star File "/usr/lib/python2.7/dist-packages/django/db/models/expressions.py", line 7, in <module> from django.db.models import fields
File "/usr/lib/python2.7/dist-packages/django/db/models/fields/__init__.py", line 19, in <module> from django import forms
File "/usr/lib/python2.7/dist-packages/django/forms/__init__.py", line 6, in <module> from django.forms.fields import * # NOQA
File "/usr/lib/python2.7/dist-packages/django/forms/fields.py", line 21, in <module> from django.forms.utils import from_current_timezone, to_current_timezone
File "/usr/lib/python2.7/dist-packages/django/forms/utils.py", line 12, in <module> from django.utils.html import escape, format_html, format_html_join, html_safe
File "/usr/lib/python2.7/dist-packages/django/utils/html.py", line 13, in <module> from django.utils.http import RFC3986_GENDELIMS, RFC3986_SUBDELIMS
File "/usr/lib/python2.7/dist-packages/django/utils/http.py", line 4, in <module> import calendar
File "/home/homa/Desktop/zinnia/calendar.py", line 4, in <module> from calendar import HTMLCalendar ImportError: cannot import name HTMLCalendar
下面是進口:導入錯誤:無法導入名稱HTMLCalendar
from calendar import HTMLCalendar
class Calendar(HTMLCalendar):
"""
Extension of the HTMLCalendar.
"""
哪裏定義了「HTMLCalendar」? –
我瞭解您面臨的問題,但總的來說,您應該提供儘可能多的信息。你能刪除與你的問題不直接相關的代碼嗎? (即巨大的錯誤信息)。 – mknull
輸入終端「pip freeze」並檢查是否有模塊可用 –