2👍
Your problem is that your url pattern is passing an argument user, but your view method is defining the argument as id.
url(r'^profile/(?P<user>\d+)$', views.profile, name="profile"),
^^^^
Your view method, however:
@verified_email_required()
def profile(request, id):
^^
0👍
It’s just a name issue. In the URL for profile you are capturing a “user” variable. But the view itself is expecting an “id” argument. Make these consistent.
- [Django]-How to get checkbox value in django?
- [Django]-How to mock API request used inside function in a Django test?
- [Django]-Django iterate on static files in template
- [Django]-Read_only field in django rest serializer with unique_together contraint
- [Django]-Adding permissions to django-allauth's OAuth token
Source:stackexchange.com