3
我收到上述錯誤的完整追溯如下:無模塊命名視圖: -我得到異常值:在Django
ImportError at /login/
No module named views
Request Method: GET
Request URL: abc.com
Django Version: 1.6
Exception Type: ImportError
Exception Value:
No module named views
Exception Location: /usr/local/lib/python2.7/dist-packages/django/utils/importlib.py in import_module, line 40
Python Executable: /usr/bin/python
Python Version: 2.7.3
Python Path:
['/home/prajakta/.virtualenvs/cptm_venv/lib/python2.7/site-packages',
'/var/www/cptm/libs',
'/var/www/cptm/apps',
'/var/www/cptm',
'/usr/local/lib/python2.7/dist-packages/setuptools-5.4.1-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/django_ajax_search-1.5.1-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/goose_extractor-1.0.19-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/jieba-0.32-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/cssselect-0.9.1-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/Pillow-2.5.1-py2.7-linux-i686.egg',
'/usr/local/lib/python2.7/dist-packages/oauth2client-1.2-py2.7.egg',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages/PIL',
'/usr/lib/python2.7/dist-packages/gst-0.10',
'/usr/lib/python2.7/dist-packages/gtk-2.0',
'/usr/lib/pymodules/python2.7',
'/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
'/usr/lib/python2.7/dist-packages/ubuntuone-client',
'/usr/lib/python2.7/dist-packages/ubuntuone-control-panel',
'/usr/lib/python2.7/dist-packages/ubuntuone-couch',
'/usr/lib/python2.7/dist-packages/ubuntuone-installer',
'/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol',
'/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode',
'/var/www/cptm/~/.virtualenvs/cptm_venv/local/lib/python2.7/site-packages',
'/var/www/cptm',
'/var/www/cptm/cptm',
'/var/www/cptm/apps',
'~/virtualenv/cptm_venv/local/lib/python2.7/django',
'/var/www/cptm/',
'/var/www/',
'/var/www/cptm/',
'/var/www/']
Server time: Mon, 21 Jul 2014 23:29:42 +0530
Error during template rendering
In template /var/www/cptm/templates/user_management/sign_in.html, error at line 64
No module named views
54
55 <body>
56
57 <div id="backgroundPopup"></div>
58 <div class="container">
59
60 {% if form.errors %}
61 <p>Your username and password didn`t match. Please try again.</p>
62 {% endif %}
63
64 <form class="form-signin" method="post" action="{%url 'django.contrib.auth.views.login' %}">
65 {% csrf_token %}
66 <h2 class="form-signin-heading">Please sign in</h2>
67 <input type="text" name="username" class="input-block-level" placeholder="Username">
68 <input type="password" name="password" class="input-block-level" placeholder="Password">
69
70 <input type="hidden" name="next" value="{{next}}"/>
71 <button class="btn btn-large btn-primary" type="submit">Sign in</button>
72 <a href="#" class="forgotpass pull-right" id="forgotpass">Forgot Your Password?</a>
73 </form>
74