caarmen / iou

MIT License
0 stars 0 forks source link

Fix the access to the admin area of the app. #24

Closed caarmen closed 9 months ago

caarmen commented 9 months ago

The app showed an error when trying to access http://localhost:8000/admin/iou/:

Page not found (404)
Request Method: GET
Request URL:    http://localhost:8000/admin/iou/
Raised by:  django.contrib.admin.sites.catch_all_view
Using the URLconf defined in iouproject.urls, Django tried these URL patterns, in this order:

iou/
admin/ [name='index']
admin/ login/ [name='login']
admin/ logout/ [name='logout']
admin/ password_change/ [name='password_change']
admin/ password_change/done/ [name='password_change_done']
admin/ autocomplete/ [name='autocomplete']
admin/ jsi18n/ [name='jsi18n']
admin/ r/<int:content_type_id>/<path:object_id>/ [name='view_on_site']
admin/ (?P<url>.*)$
The current path, admin/iou/, matched the last one.

To avoid this, use reverse_lazy instead of reverse, to resolve the login url.