In this How To Django tutorial, we look at how to work with URL parameters and query strings. Please visit mastercode.online for the code examples for this tutorial
Пікірлер: 22
@Smiesznosyn5 жыл бұрын
Good explanation, but you need to show urls.py :) you can just paste it in the video description :)
@hungphan5 жыл бұрын
wth why you dont show the urls.py?
@fahimtahmid57544 жыл бұрын
thank you. thank you. thank you. now need how can get this url dynamically in tag.?
@mohamedsameh76876 жыл бұрын
does anybody know the url pattern he used for this get request?
@themstarpodcast6 жыл бұрын
best videos I've seen!
@PrakashKumar-bn1nk4 жыл бұрын
I have a dictionary (having student data) in views.py and I want to get that data in browser using template by changing query string in url, as in the same video that you have shown. Like localhost: url ?/name=abc, If I change the name = abc , I will get details of abc, and so on
@vildanpro6 жыл бұрын
Man!!! You are best!!! :D
@heygema6 жыл бұрын
hi how about multiple like array and category stuff like that ?
@LearnpythontutorialFree6 жыл бұрын
We will look at it shortly when we bring categories into play. For now you can add a category slug variable to the url before the slug. Then when you create your view you have three parameters request, category_slug, slug. Then in the get_object_or_404(Post, category.slug=category_slug, slug=slug) something like that. It will be more clear when I get to it this week.
@Trampolini1003 жыл бұрын
helped me a lot cheers cocker
@niteshrawat5765 жыл бұрын
Hi, Does anyone know how to get the whole query set is case when its more than ?name. Like ?name='Nitesh'&sex=''Male'&....so on. Also, it's been created dynamically based on the filters provide. I will deeply appreciate for any help given. Thanks in advance! God bless you all ! :)
@neosmith0095 жыл бұрын
Not sure if you got it or not, but you can call request.GET.urlencode() to get any thing after ?, then parse accordingly. This is a dirty method, but it works
@crazdrms6 жыл бұрын
is this how you setup your project when you develop application professionally?
@LearnpythontutorialFree6 жыл бұрын
Yes
@vincentcui22372 жыл бұрын
where is the urls.py description?????
@karl74503 жыл бұрын
i literally only came to this video to see the urls.py :(
@denzen55832 жыл бұрын
Thanks man
@liuduan98096 жыл бұрын
Very good video. You explained a very complex problem in a simple way, and even I can understand.
@LearnpythontutorialFree6 жыл бұрын
+Liu Duan thank you for watching!
@AhmedIbrahim-wc7zp Жыл бұрын
Full of vulnerabilities
@ThinhLe-ih6uk2 жыл бұрын
I read many documents but I didn't see any thing I need, and I try to find in youtube and I see this video, and you save my life, request.GET.get("..."). Many thanks