Create A Blog Profile Page - Django Blog #30

  Рет қаралды 17,280

Codemy.com

Codemy.com

Күн бұрын

Пікірлер: 55
@Codemycom
@Codemycom 4 жыл бұрын
▶️ 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
@WhisperinScream
@WhisperinScream 3 жыл бұрын
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.
@devincydan234
@devincydan234 3 жыл бұрын
have you fixe the error ?if yes how?it'been 3 days now that I'm struggling with that issue.help
@justasnom247
@justasnom247 2 жыл бұрын
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.
@santiagoandresdelzotto5771
@santiagoandresdelzotto5771 2 жыл бұрын
@@justasnom247 I tried already, but the error stills there :(
@dikshyantthapa3367
@dikshyantthapa3367 6 ай бұрын
for anyone having this problem just do : {% url 'show_profile_page' post.author.profile.id as profile_url %} {% if profile_url %} View Profile {% endif %}
@dwightledet5857
@dwightledet5857 4 жыл бұрын
Don't ya just hate it when you forget the > after
@Codemycom
@Codemycom 4 жыл бұрын
Ha!
@alexradu1921
@alexradu1921 4 жыл бұрын
omg... this happened to me yesterday, guess where 30 minutes of debugging went on... crazy.
@Codemycom
@Codemycom 4 жыл бұрын
@@alexradu1921 Ha, that's always the way it goes ;-)
@jumamakorere8597
@jumamakorere8597 2 жыл бұрын
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?
@cnslpsbly
@cnslpsbly 4 жыл бұрын
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.
@Codemycom
@Codemycom 4 жыл бұрын
lots of ways to do a thing...use what works best for you.
@shawnbeans7389
@shawnbeans7389 4 жыл бұрын
Good
@Codemycom
@Codemycom 4 жыл бұрын
Thanks
@mtrkhan566
@mtrkhan566 4 жыл бұрын
Great sir
@Codemycom
@Codemycom 4 жыл бұрын
Thanks!
@ali_sadrian
@ali_sadrian 2 жыл бұрын
What if the user doesn't have a profile pic? how can I show a image that says "no image available" instead?
@rangabharath4253
@rangabharath4253 4 жыл бұрын
Awesome
@Codemycom
@Codemycom 4 жыл бұрын
Thanks!
@freeeagle8862
@freeeagle8862 4 жыл бұрын
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.
@Codemycom
@Codemycom 4 жыл бұрын
No idea..I suggest starting over and rewatching the videos and walking thru them step by step to see where you went wrong
@freeeagle8862
@freeeagle8862 4 жыл бұрын
​@@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
@sakibshabir1785
@sakibshabir1785 4 жыл бұрын
@@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/$']
@faroukbul4194
@faroukbul4194 4 жыл бұрын
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-rai07
@sandeep-rai07 4 жыл бұрын
@@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
@tennis0037
@tennis0037 3 жыл бұрын
I am using a profile's username as a PK, how do I use that string in URL instead of ID=1?
@atribhatt6628
@atribhatt6628 3 жыл бұрын
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.
@shiveshtiwari2612
@shiveshtiwari2612 2 жыл бұрын
What shall I do if I want to display the username in the url istead of user id??
@ShubhamSharma-bo3ot
@ShubhamSharma-bo3ot 3 жыл бұрын
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-Glitchs
@Matrix-Glitchs 3 жыл бұрын
focus at 15:04 you miss one of them
@ShubhamSharma-bo3ot
@ShubhamSharma-bo3ot 3 жыл бұрын
@@Matrix-Glitchs no
@zoljargalenkhtaivan9661
@zoljargalenkhtaivan9661 3 жыл бұрын
if you did like this: Profile Page, you should try it: Profile Page
@MrMikamika200
@MrMikamika200 3 жыл бұрын
I have the same problem and nothing is working
@santiagoandresdelzotto5771
@santiagoandresdelzotto5771 2 жыл бұрын
@@zoljargalenkhtaivan9661 I used the one you suggested first, but then I used the first one, and now works. Thank you so much.
@kunjalsunny3428
@kunjalsunny3428 3 жыл бұрын
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
@derekkroeker4582
@derekkroeker4582 3 жыл бұрын
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 %}*
@webaruhazberles
@webaruhazberles 2 жыл бұрын
@@derekkroeker4582 how to create a profile same time with registration ? please, help me.
@sajeersayed2008
@sajeersayed2008 4 жыл бұрын
404 error showing
@spreadhysteria3650
@spreadhysteria3650 4 жыл бұрын
my {{ page_user.first_name }} {{ page_user.last_name }} does not show up in the user_profile.html no matter what I do.
@uzbegimuz3836
@uzbegimuz3836 3 жыл бұрын
But everything is fine on my side. I recommend you to recheck your code
@5staryzzz
@5staryzzz 4 жыл бұрын
Second!
@Codemycom
@Codemycom 4 жыл бұрын
Woot!
Edit Profile Page Form - Django Blog #31
20:08
Codemy.com
Рет қаралды 18 М.
Profile Account Creation - Django Blog #32
21:22
Codemy.com
Рет қаралды 14 М.
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
Create Blog Like Button - Django Blog #18
19:35
Codemy.com
Рет қаралды 54 М.
Creating Blog User Logins With Authentication - Django Blog #9
19:14
What is ManyToOne relationship in Django DRF
7:59
Swarup Kumar Saha
Рет қаралды 48
Add Profile Pic and Social Media Links - Django Blog #28
21:51
Codemy.com
Рет қаралды 24 М.
Style Our Blog With Bootstrap - Django Blog #3
19:51
Codemy.com
Рет қаралды 49 М.
Add Default Profile Pic With Static Files - Django Blog #29
10:41
Add Blog Categories - Django Blog #12
20:10
Codemy.com
Рет қаралды 43 М.
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН