Python中文
首页
教程
问答
标签
搜索
登录
注册
Django管理错误-“字段列表”中的未知列“Django_content_type.name”
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我的django项目有一个工作管理页面,但突然间我收到了: <code>"Unknown column 'django_content_type.name' in 'field list'"</code>每当我试图访问管理页时。我仍然可以访问管理员的某些部分,只是不能访问主页。</p> <p>我对django和python还不太熟悉,所以我不知道去哪里找。</p> <p>下面是完整的错误:</p> <pre><code>InternalError at /admin/ (1054, u"Unknown column 'django_content_type.name' in 'field list'") Request Method: GET Request URL: http://127.0.0.1:8000/admin/ Django Version: 1.7.7 Exception Type: InternalError Exception Value: (1054, u"Unknown column 'django_content_type.name' in 'field list'") Exception Location: c:\Python27\lib\site-packages\pymysql\err.py in _check_mysql_exception, line 115 Python Executable: c:\Python27\python.exe Python Version: 2.7.9 Python Path: ['c:\\users\\dhysong\\Documents\\School\\CS6310\\Project4\\CS6310', 'C:\\Windows\\system32\\python27.zip', 'c:\\Python27\\DLLs', 'c:\\Python27\\lib', 'c:\\Python27\\lib\\plat-win', 'c:\\Python27\\lib\\lib-tk', 'c:\\Python27', 'c:\\Python27\\lib\\site-packages'] Server time: Thu, 9 Apr 2015 08:17:05 -0400 </code></pre> <p>第63行出现html错误:</p> <pre><code>In template c:\Python27\lib\site-packages\django\contrib\admin\templates\admin\index.html, error at line 63 1054 53 <div id="content-related"> 54 <div class="module" id="recent-actions-module"> 55 <h2>{% trans 'Recent Actions' %}</h2> 56 <h3>{% trans 'My Actions' %}</h3> 57 {% load log %} 58 {% get_admin_log 10 as admin_log for_user user %} 59 {% if not admin_log %} 60 <p>{% trans 'None available' %}</p> 61 {% else %} 62 <ul class="actionlist"> 63 {% for entry in admin_log %} 64 <li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}"> 65 {% if entry.is_deletion or not entry.get_admin_url %} 66 {{ entry.object_repr }} 67 {% else %} 68 <a href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a> 69 {% endif %} 70 <br/> 71 {% if entry.content_type %} 72 <span class="mini quiet">{% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %}</span> 73 {% else %} </code></pre>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>这不是django错误,而是MySQL。我刚刚开始了一个项目,但是将django版本从1.8改为1.7,得到了这个错误。所以,我删除了所有表并运行migrate。但你不需要放下所有的桌子,只是一部分,可能只是一张。</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
Python中是否有类似Clojure的线程宏?
4 回答
Python中是否有类似JPanel的组件?
10 回答
Python中是否有类似MATLAB的vpasolve的等价解算器
4 回答
python中是否有类似NLTK的东西不需要安装?
2 回答
python中是否有类似osgi在java中试图解决的需求?
1 回答
python中是否有类似PAM的模块?
1 回答
Python中是否有类似Perl的Data::Dumper的工具用来检查数据结构?
1 回答
python中是否有类似robocy的函数,带有重试选项?
2 回答
Python中是否有类似Rstudio的帮助部分?
8 回答
python中是否有类似ruby的索引方法?
6 回答
python中是否有类似于“perlpe”选项的内容?
5 回答
Python中是否有类似于C++ STL映射的结构?
5 回答
python中是否有类似于C中预处理器行为的工具?
1 回答
Python中是否有类似于Harmony的let关键字的内容?
7 回答
python中是否有类似于matlab中fzero的函数?
7 回答
python中是否有类似于MATLAB中peaks(N)的函数/实现?
10 回答
Python中是否有类似于Matlab的deconvblind的函数?
2 回答
Python中是否有类似于Perl中“想要”的东西
10 回答
Python中是否有类似于Perl正则表达式中的"local"变量?
10 回答
python中是否有类似于php的$$变量的语法
6 回答