▶️ Watch Entire Django Blog Playlist ✅ Subscribe To My KZbin Channel: bit.ly/3bWN6wj bit.ly/2IGzvOR ▶️ See More At: ✅ Join My Facebook Group: Codemy.com bit.ly/2GFmOBz ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt! Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN
@WhisperinScream3 жыл бұрын
For those that cant figure out this error: Reverse for 'show_profile_page' with arguments '('',)' not found. 1 pattern(s) tried: ['members/(?P[0-9]+)/profile/$'] if you created a new user, it could be that you dont have a profile created for that user yet.
@devincydan2343 жыл бұрын
have you fixe the error ?if yes how?it'been 3 days now that I'm struggling with that issue.help
@justasnom2472 жыл бұрын
if you insist on keeping all of your users, then you have to create a profile for those, who don't have it. you can do that in the admin console easily. in the future you can automatically create new profile for user upon registration.
@santiagoandresdelzotto57712 жыл бұрын
@@justasnom247 I tried already, but the error stills there :(
@dikshyantthapa33676 ай бұрын
for anyone having this problem just do : {% url 'show_profile_page' post.author.profile.id as profile_url %} {% if profile_url %} View Profile {% endif %}
@dwightledet58574 жыл бұрын
Don't ya just hate it when you forget the > after
@Codemycom4 жыл бұрын
Ha!
@alexradu19214 жыл бұрын
omg... this happened to me yesterday, guess where 30 minutes of debugging went on... crazy.
@Codemycom4 жыл бұрын
@@alexradu1921 Ha, that's always the way it goes ;-)
@jumamakorere85972 жыл бұрын
Hello thanks for your great tuts sir, how can I get all list of posts of that clicked profile of that specific user like Facebook does?
@cnslpsbly4 жыл бұрын
Thanks for your videos, they´re very helpful. I have a question though. Instead of using the page_user variable, why dont you use the profile variable, you can access it by using the directly from the view without overwriting the get_context func. i did everything in this step but instead of doing page_user.profile.... i just did profile. I think this works because of the one_to_one relationship in the model, where user has a profile and a profile has a user.
@Codemycom4 жыл бұрын
lots of ways to do a thing...use what works best for you.
@shawnbeans73894 жыл бұрын
Good
@Codemycom4 жыл бұрын
Thanks
@mtrkhan5664 жыл бұрын
Great sir
@Codemycom4 жыл бұрын
Thanks!
@ali_sadrian2 жыл бұрын
What if the user doesn't have a profile pic? how can I show a image that says "no image available" instead?
@rangabharath42534 жыл бұрын
Awesome
@Codemycom4 жыл бұрын
Thanks!
@freeeagle88624 жыл бұрын
django.urls.exceptions.NoReverseMatch: Reverse for 'show_profile_page' with arguments '('',)' not found. 1 pattern(s) tried: ['users/(?P[0-9]+)/profile/$'] I have this error, and I can't find solution. For admin user which have image everything works fine, but for others which don't have and new created without picture it doesn't. I can't see article detail page or profile for that users. Any ideas, what can be wrong? I can't upload user image in admin area.
@Codemycom4 жыл бұрын
No idea..I suggest starting over and rewatching the videos and walking thru them step by step to see where you went wrong
@freeeagle88624 жыл бұрын
@@Codemycom Step forward, I can open all articles, written by any user, but by clicking on the link to open profile page, it opens the profile of only one user (admin/root/first created), the others do not. I have the following error: Page not found (404) Request Method: GET Request URL: http: // localhost: 8000 / users / 5 / profile / Raised by: users.views.ShowProfilePageView No profile found matching the query
@sakibshabir17854 жыл бұрын
@@Codemycom sir ,i got the same error... django.urls.exceptions.NoReverseMatch: Reverse for 'show_profile_page' with arguments '('',)' not found. 1 pattern(s) tried: ['users/(?P[0-9]+)/profile/$']
@faroukbul41944 жыл бұрын
solved it. you can't write posts if you don't have a user, and you can't have a user without profile, and you can't show the page without a profile cuz that would mean that you don't have a user. to solve this you have to make a profile for every user u used to write past posts.
@sandeep-rai074 жыл бұрын
@@sakibshabir1785 firstly you need to create user profile using admin....or you can use if condition in you article_detail page... e.g: {% if post.author.profile.id %} profile page
@tennis00373 жыл бұрын
I am using a profile's username as a PK, how do I use that string in URL instead of ID=1?
@atribhatt66283 жыл бұрын
sir how to use a user name in the slug in place of primary key i tried but I am getting an error Generic detail view ProfileDetailView must be called with either an object pk or a slug in the URLconf.
@shiveshtiwari26122 жыл бұрын
What shall I do if I want to display the username in the url istead of user id??
@ShubhamSharma-bo3ot3 жыл бұрын
Reverse for 'show_profile_page' with arguments '('',)' not found. 1 pattern(s) tried: ['members/(?P[0-9]+)/profile/$'] Can anyone help with this error?
@Matrix-Glitchs3 жыл бұрын
focus at 15:04 you miss one of them
@ShubhamSharma-bo3ot3 жыл бұрын
@@Matrix-Glitchs no
@zoljargalenkhtaivan96613 жыл бұрын
if you did like this: Profile Page, you should try it: Profile Page
@MrMikamika2003 жыл бұрын
I have the same problem and nothing is working
@santiagoandresdelzotto57712 жыл бұрын
@@zoljargalenkhtaivan9661 I used the one you suggested first, but then I used the first one, and now works. Thank you so much.
@kunjalsunny34283 жыл бұрын
When i post something from another user and try to click on it throws an error NoReverseMatch it does not go to article_detail.html
@derekkroeker45823 жыл бұрын
It's because that users don't have any profile, you can solve this by either making a profile for that user or you can make and if statement. here is the if statement, in article_details.html *{% if post.author.profile %}* *Profile* *{% endif %}*
@webaruhazberles2 жыл бұрын
@@derekkroeker4582 how to create a profile same time with registration ? please, help me.
@sajeersayed20084 жыл бұрын
404 error showing
@spreadhysteria36504 жыл бұрын
my {{ page_user.first_name }} {{ page_user.last_name }} does not show up in the user_profile.html no matter what I do.
@uzbegimuz38363 жыл бұрын
But everything is fine on my side. I recommend you to recheck your code