1👍
✅
I just fixed it now, in my profile.html, i am using {{request.user.profile.first_name}}
to display the informations. I was supposed to use {{profile.first_name}}
etc, and that was it.
0👍
Instead of this:
<a href="{% url 'profile' creator.user %}">
you should try:
<a href="{% url 'profile' creator.user.username %}">
From the presumably working statement get_object_or_404(User, username=username)
I assume that username
is a field (hopefully, unique) of the User
. So you should pass it onto the URL, not the entire User
model.
- [Answered ]-Django Rest Framework – adding permissions for views based on groups?
- [Answered ]-Django queryset: All Model1 objects where a Model2 exists with a model1 AND the given user
- [Answered ]-Proper way to update model in Django
- [Answered ]-Django template if inside a for loop – Invalid block tag on line 13: 'else', expected 'empty' or 'endfor'.
- [Answered ]-How to hydrate ToOneField and ToManyField in tastypie
Source:stackexchange.com