开发者

TemplateSyntaxError at /admin/ Caught ImportError while rendering: No module named model.urls

Template error -

Caught ImportError while rendering: No module named model.urls
21      <!-- Header -->
22      <div id="header">
23          <div id="branding">
24          {% block branding %}{% endblock %}
25          </div>
26          {% if user.is_active and user.is_staff %}
27          <div id="user-tools">
28              {% trans 'Welcome,' %}
29              <strong>{% filter force_escape %}{% firstof user.first_name user.username %}{% endfilter %}</strong>.
30              {% block userlinks %}
31                  {% url django-admindocs-docroot as docsroot %}
32                  {% if docsroot %}
33                      <a href="{{ docsroot }}">{% trans 'Documentation' %}</a> /
34                  {% endif %}
35                  {% url admin:password_change as password_change_url %}
36                  {% if password_change_url %}
37                      <a href="{{ password_change_url }}">
38                  {% else %}
39                      <a href="{{ root_path }}password_change/">
40                  {% endif %}
41                  {% trans 'Change password' %}</a> /

What could be the problem?

The Answer 开发者_开发知识库[Edit] - If you get an error like this (I mean this un-django) then its probably a mis-type somewhere in your code....


Apparently, somewhere in your project you are importing model.urls, which is a very un-django place to put something related to urls and makes me think you just mis-typed a line. There are no urls inside of a models folder or models file in the django project.

While that specific error @ admin-docs is notorious for giving a useless traceback (the real error is too deep), can you post it anyways?

Either way, I would search your own source code for model.urls via grep to fix your problem. Navigate to your project root folder and type in grep -r "model.urls" .

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜