Issue
A couple days ago I was able to get to the django admin login page but today when I try to hit 127.0.0.1:8000/admin I get redirected to 127.0.0.1:8000/admin/login/?next=/admin/ which brings up the DRF view for JSON testing
Am I missing something? I am not sure what would have changed. I looked at the last few days of version control and dont see where anything changed.
Solution
Once it happened to me when I unintentionally included rest_framework.urls
and admin.site.urls
in the same url. Such as:
url(r'^admin/', include('rest_framework.urls')),
url(r'^admin/', include(admin.site.urls)),
So, make sure these are included in defferent urls such as:
url(r'^api-auth/', include('rest_framework.urls')),
url(r'^admin/', include(admin.site.urls)),
Answered By - mohammadjh
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.