报错: SyntaxError Generator expression must be parenthesized

问题原因:

由于django 1.11版本和python3.7版本不兼容, 2.0版本以后的Django修复了这个问题

解决方法:

方法1.找到对应路径下的widgets.py,将逗号删除即可

方法2.升级Django版本

pip install -U Django

You have 13 unapplied migration(s). Your project may not work properly until you apply ...报错

解决方法:

执行一下这个:python manage.py migrate

它可以让我们在修改Model后可以在不影响现有数据的前提下重建表结构。

django报错的更多相关文章

  1. Django报错:OSError: raw write() returned invalid length 4 (should have been between 0 and 2)

    在使用Django时Django报错:Django报错:OSError: raw write() returned invalid length 4 (should have been between ...

  2. Django报错:提交表单报错---RuntimeError: You called this URL via POST, but the URL doesn’t end in a slash and you have APPEND_SLASH set.

    Django报错:提交表单报错---RuntimeError: You called this URL via POST, but the URL doesn’t end in a slash and ...

  3. django 报错Reverse for 'detail' with keyword arguments '{'pk': '2'}' not found. 1 pattern(s) tried: ['$post/(?P<pk>[0-9]+)/$']

    Django报错:Reverse for 'detail' with keyword arguments '{'pk': '2'}' not found. 1 pattern(s) tried: [' ...

  4. Django 报错 Reverse for 'content' not found. 'content' is not a valid view function or pattern name.

    Django 报错 Reverse for 'content' not found. 'content' is not a valid view function or pattern name. 我 ...

  5. ubuntu pip 安装django报错解决

    系统版本 ubuntu  Kylin 16.04 LTS       安装pip3 安装 Django 总是提示time out,无法安装. 逛了好多论坛终于遭到了解决办法,分享保存: sudo pi ...

  6. 关于Django报错django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG, but settings are not configure

    报错代码:django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE, but se ...

  7. 记一次Django报错Reverse for 'indextwo' with no arguments not found. 1 pattern(s) tried: ['$index/$']

    启动python manage.py runserver 打开127.0.0.1:8000,报错信息如下: Reverse for 'indextwo' with no arguments not f ...

  8. django报错解决:view must be a callable or a list/tuple in the case of include().

    django版本:1.11.15 django应用,修改urls.py后,访问报错:TypeError at /view must be a callable or a list/tuple in t ...

  9. django报错解决:Invalid HTTP_HOST header: 'xxx.com'. You may need to add u'xxx.com' to ALLOWED_HOSTS.

    django版本:1.11.15 使用uwsgi+nginx运行django程序,出现报错,报错为:Invalid HTTP_HOST header: 'xxx.com:82'. You may ne ...

  10. django报错:django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module. Did you install mysqlclient?

    django 迁移数据库报错 django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.Did you ins ...

随机推荐

  1. OSI参考模型与TCP/IP参考模型与TCP/IP协议栈

    原创转载请注明出处:https://www.cnblogs.com/agilestyle/p/11484126.html OSI参考模型与TCP/IP参考模型与TCP/IP协议栈 TCP/IP分层模型 ...

  2. python其他篇(1)

    1.跳过anaconda直接打开spyder或qtconsole: 打开终端,输入spyder或者jupyter-qtconsole 2.conda安装jpype1和pyhanlp: 参考:http: ...

  3. OC中SEL,类别,继承,协议的使用

    1.SEL SEL是selector的缩写,selector在OC中作用是定义一个方法变量,通过该方法变量来调用方法.我们在后面的UI中会经常用selector来调用事件方法.下面我将举两个例子来说明 ...

  4. [CF1166C]A Tale of Two Lands题解

    比赛的时候lowerbound用错了 现场WA on test4(好吧我承认我那份代码确实有除了lowerbound以外的问题) 于是只能手动二分 (我好菜啊QAQ 经过一波数学推算,我们发现,设序列 ...

  5. hdu 5511 Minimum Cut-Cut——分类讨论思想+线段树合并

    题目:http://acm.hdu.edu.cn/showproblem.php?pid=5511 题意:割一些边使得无向图变成不连通的,并且恰好割了两条给定生成树上的边.满足非树边两段一定在给定生成 ...

  6. linux发版

    使用MobaXterm_v8.5 1.upload需要更换的文件 2.关闭Tomcat    cd /usr/local/tomcat/apache-tomcat-6.0.30-pcitcaly/  ...

  7. Python网络爬虫-爬取微博热搜

    微博热搜的爬取较为简单,我只是用了lxml和requests两个库 url=https://s.weibo.com/top/summary?Refer=top_hot&topnav=1& ...

  8. File upload with cropping support using Cropper --jquery file upload

    File upload with cropping support using Cropper demo https://tkvw.github.io/jQuery-File-Upload/basic ...

  9. 用maven给SpringBoot项目打包

    注意要点: 1.注意某个moule有依赖需要在对应的pom.xml里填写有关的信息,如: <dependencies> <dependency> <artifactId& ...

  10. SPOJ AEROLITE

    题目链接: http://www.spoj.com/problems/AEROLITE/en/ ---------------------------------------------------- ...