SyntaxError: Generator expression must be parenthesized

后端 未结 8 2009
情深已故
情深已故 2020-12-29 18:52

I just installed django and after installing that I created a django project and was trying to run django server by command:

python manage.py runserver


        
相关标签:
8条回答
  • 2020-12-29 19:32

    Just open file: venv/lib/python3.7/site-packages/django/contrib/admin/widgets.py and replace the lines

    related_url += '?' + '&'.join(
        '%s=%s' % (k, v) for k, v in params.items(),)
    

    with

    related_url += '?' + '&'.join('%s=%s' % (k, v) for k, v in params.items())
    
    0 讨论(0)
  • 2020-12-29 19:38

    Had same issue. This is how I changed to django version 2.0 and used python3

    • $pip3 install django==2.0
    • $python3 manage.py runserver
    0 讨论(0)
提交回复
热议问题