You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added the path('friendship/', include('friendship.urls')), in my app's url and then when I go to the url friendship/users/
it gives me this error NoReverseMatch at /account/friendship/users/ Reverse for 'friendship_add_friend' not found. 'friendship_add_friend' is not a valid view function or pattern name.
I didn't write any views just an add path inurls.pyin my app
The text was updated successfully, but these errors were encountered:
I think this happens because your username probably has characters other than a-z or A-Z. I hit this same problem because my username contains a period/full stop (e.g. "."). It's definitely a bug in this module.
I think this happens because your username probably has characters other than a-z or A-Z. I hit this same problem because my username contains a period/full stop (e.g. "."). It's definitely a bug in this module.
Yeah it looks to be from the slugification of the username.
The easiest thing to do would be to write your own views that used the PK of your User model rather than the username. Would just be a matter of duplicating the included views and adjusting just a little bit. (i.e. User.objects.get(pk=pk) vs User.objects.get(username=username)`
I added the
path('friendship/', include('friendship.urls')),
in my app's url and then when I go to the urlfriendship/users/
it gives me this error
NoReverseMatch at /account/friendship/users/ Reverse for 'friendship_add_friend' not found. 'friendship_add_friend' is not a valid view function or pattern name.
I didn't write any views just an add path in
urls.py
in my appThe text was updated successfully, but these errors were encountered: