Python中文
首页
教程
问答
标签
搜索
登录
注册
/admin/learning_logs/example处的操作错误/
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我是<code>django</code>以及模块和web应用程序的初学者。在</p> <p>以下是回溯和数据:</p> <pre><code>OperationalError at /admin/learning_logs/example/ no such column: learning_logs_example.entry_id Request Method: GET Request URL: http://localhost:8000/admin/learning_logs/example/ Django Version: 1.11.7 Exception Type: OperationalError Exception Value: no such column: learning_logs_example.entry_id Exception Location: C:\Users\Bryan\Desktop\LEARNI~1\ll_env\lib\site- packages\django\db\backends\sqlite3\base.py in execute, line 328 Python Executable: C:\Users\Bryan\Desktop\LEARNI~1\ll_env\Scripts\python.exe Python Version: 3.6.2 Python Path: ['C:\\Users\\Bryan\\Desktop\\learning log', 'C:\\Users\\Bryan\\Desktop\\LEARNI~1\\ll_env\\Scripts\\python36.zip', 'C:\\Users\\Bryan\\AppData\\Local\\Programs\\Python\\Python36-32\\DLLs', 'C:\\Users\\Bryan\\AppData\\Local\\Programs\\Python\\Python36-32\\lib', 'C:\\Users\\Bryan\\AppData\\Local\\Programs\\Python\\Python36-32', 'C:\\Users\\Bryan\\Desktop\\LEARNI~1\\ll_env', 'C:\\Users\\Bryan\\Desktop\\LEARNI~1\\ll_env\\lib\\site-packages'] Server time: Sat, 18 Nov 2017 18:36:14 +0000 </code></pre> <p>出于某种原因,当我点击下面的“示例”链接时</p> <p><a href="https://i.stack.imgur.com/M6VVx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M6VVx.png" alt="enter image description here"/></a></p> <p>上面写着这个</p> <p><a href="https://i.stack.imgur.com/R85vI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R85vI.png" alt="enter image description here"/></a></p> <p>我试过迁移,但上面写着</p> ^{pr2}$ <p>我是怎么做到的?</strong></p> <p>首先我添加了<code>example</code>条目/表单和<code>TextField</code>,然后添加了一个“example”。我添加了一个<code>ForeignKey</code>对象,参数为<code>Entry</code>。在</p> <p>我回去编辑我的“示例”,但是异常出现了。在</p> <p><strong>编辑:</strong> 当我运行<code>python manage.py showmigrations learning_logs</code>时,janos想要输出结果,所以这里是:</p> <pre><code>admin [X] 0001_initial [X] 0002_logentry_remove_auto_add auth [X] 001_initial [X] 0001_initial [X] 0002_alter_permission_name_max_length [X] 0003_alter_user_email_max_length [X] 0004_alter_user_username_opts [X] 0005_alter_user_last_login_null [X] 0006_require_contenttypes_0002 [X] 0007_alter_validators_add_error_messages [X] 0008_alter_user_username_max_length contenttypes [X] 0001_initial [X] 0002_remove_content_type_name learning_logs [X] 0001_initial sessions [X] 0001_initial </code></pre> <p>我希望这能帮上忙。在</p> <p>我重新创建了异常页右<a href="https://thimbleprojects.org/HTTP/bbz/377342/" rel="nofollow noreferrer">here</a></p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>这是您第一次为应用程序创建迁移吗?如果是,则需要指定应用程序名称以进行迁移:</p> <pre><code>python manage.py makemigrations my-app </code></pre>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
如何替换子字符串,但前提是它正好出现在两个单词之间
4 回答
如何替换字典中所有出现的指定字符
8 回答
如何替换字典中所有键的第一个字符?
3 回答
如何替换字典所有键中的子字符串
5 回答
如何替换字符串python中的变量值?
3 回答
如何替换字符串Python中的第二次迭代
1 回答
如何替换字符串y Python中不等于字符串x的所有内容?
5 回答
如何替换字符串中出现的第n个单词?
7 回答
如何替换字符串中单词的一部分
5 回答
如何替换字符串中同时出现的2个或更多特殊字符或下划线
1 回答
如何替换字符串中指定位置(索引)的字符?
2 回答
如何替换字符串中某个字符的所有匹配项?
1 回答
如何替换字符串中的
8 回答
如何替换字符串中的一个字符
6 回答
如何替换字符串中的主题(固定位置)
8 回答
如何替换字符串中的分隔逗号?
5 回答
如何替换字符串中的列名(python)?
9 回答
如何替换字符串中的制表符?
2 回答
如何替换字符串中的单个单词而不是用相同的字符替换其他单词
1 回答
如何替换字符串中的单个字符?
4 回答