1

I am following the Tutorial and everything else works fine. The only problem is that when I try to login using the Rest Framework browsable API, I get a 404 after the login:

Request URL:    http://localhost:7000/accounts/profile/
Using the URLconf defined in shelter.urls, Django tried these URL patterns, in this order:

    ^times/
    ^admin/
    ^api-auth/

The current URL, accounts/profile/, didn't match any of these.

Times is the name of the app. The API login is redirecting to accounts/profile, I haven't set that url up so of course the response is a 404. I'm probably missing a simple and obvious step.

Alejandro Veintimilla
  • 10,743
  • 23
  • 91
  • 180
  • add it to your shelter.urls or account.urls and then you'll get a different error! – Paul Collingwood Oct 15 '14 at 22:05
  • The `include('rest_framework.urls'` already is in my shelter.urls, that is, the project-level urls.py ... I guess the only problem is that the url accounts/profile isn't there yet. I believe the tutorial should write about that. Anyway if I logout and then login again using the url with a next parameter: `http://localhost:7000/api-auth/login/?next=/times/api/day_list/` it obviously works fine. – Alejandro Veintimilla Oct 15 '14 at 22:21
  • 1
    try this http://stackoverflow.com/a/13186794/924300 – Dimitris Kougioumtzis Jan 27 '17 at 10:04

0 Answers0