TypeError at /admin/ 'set' object is not reversible and argument( ) to reverse must be a sequence

前端 未结 6 1722
囚心锁ツ
囚心锁ツ 2021-01-16 05:57

My app was working perfectly but when I tried the admin url, this error occurred.I can access every page of the website except for the admin page. My project is min

相关标签:
6条回答
  • 2021-01-16 06:39

    Just change {} to [] in project.urls.py :

    urlpatterns = [
         url(r'^admin/', admin.site.urls),
         url(r'^', include('main.urls')),
         url(r'^', include('signup.urls',namespace='signup'))
    ]
    
    0 讨论(0)
  • 2021-01-16 06:48

    i found solution here, and its work for me

    urlpatterns = [
         url(r'^admin/', admin.site.urls),
         url(r'^', include('main.urls')),
         url(r'^', include('signup.urls',namespace='signup')),
    ]
    

    remove "," from the last line of urlpatterns array

    urlpatterns = [
         url(r'^admin/', admin.site.urls),
         url(r'^', include('main.urls')),
         url(r'^', include('signup.urls',namespace='signup'))
    ]
    

    from http://stackoverflaw.com/question/set-project-is-not-revertable-in-_populate-line-416/

    0 讨论(0)
  • 2021-01-16 06:49

    Check the file urls.py in that file check the Square brackets in the urlpatterns = [] because its in the Curly bracket it will show the 'set' object is not reversible and argument( ) error...Try this it is working...

    0 讨论(0)
  • 2021-01-16 06:51

    in signup.urls.py change the brackets from these { } to [ ] these this will work

    0 讨论(0)
  • 2021-01-16 06:53

    change {} to [] in main.urls.py

    0 讨论(0)
  • 2021-01-16 06:55

    I had same problem with my project, changed the curly brackets {} to box brackets [] and problem solved.

    0 讨论(0)
提交回复
热议问题