SyntaxError: Generator expression must be parenthesized

后端 未结 8 2045
情深已故
情深已故 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())
    

提交回复
热议问题