How To Django: How To Work With URL Parameters and Query Strings

  Рет қаралды 25,955

Master Code Online

Master Code Online

6 жыл бұрын

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
@Smiesznosyn
@Smiesznosyn 5 жыл бұрын
Good explanation, but you need to show urls.py :) you can just paste it in the video description :)
@hungphan
@hungphan 5 жыл бұрын
wth why you dont show the urls.py?
@fahimtahmid5754
@fahimtahmid5754 4 жыл бұрын
thank you. thank you. thank you. now need how can get this url dynamically in tag.?
@mohamedsameh7687
@mohamedsameh7687 6 жыл бұрын
does anybody know the url pattern he used for this get request?
@themstarpodcast
@themstarpodcast 6 жыл бұрын
best videos I've seen!
@PrakashKumar-bn1nk
@PrakashKumar-bn1nk 4 жыл бұрын
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
@vildanpro
@vildanpro 6 жыл бұрын
Man!!! You are best!!! :D
@heygema
@heygema 6 жыл бұрын
hi how about multiple like array and category stuff like that ?
@LearnpythontutorialFree
@LearnpythontutorialFree 6 жыл бұрын
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.
@Trampolini100
@Trampolini100 3 жыл бұрын
helped me a lot cheers cocker
@niteshrawat576
@niteshrawat576 5 жыл бұрын
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 ! :)
@neosmith009
@neosmith009 5 жыл бұрын
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
@crazdrms
@crazdrms 6 жыл бұрын
is this how you setup your project when you develop application professionally?
@LearnpythontutorialFree
@LearnpythontutorialFree 6 жыл бұрын
Yes
@vincentcui2237
@vincentcui2237 2 жыл бұрын
where is the urls.py description?????
@karl7450
@karl7450 3 жыл бұрын
i literally only came to this video to see the urls.py :(
@denzen5583
@denzen5583 2 жыл бұрын
Thanks man
@liuduan9809
@liuduan9809 6 жыл бұрын
Very good video. You explained a very complex problem in a simple way, and even I can understand.
@LearnpythontutorialFree
@LearnpythontutorialFree 6 жыл бұрын
+Liu Duan thank you for watching!
@AhmedIbrahim-wc7zp
@AhmedIbrahim-wc7zp Жыл бұрын
Full of vulnerabilities
@ThinhLe-ih6uk
@ThinhLe-ih6uk 2 жыл бұрын
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
Passing Values Through the URL in Django
14:16
Pretty Printed
Рет қаралды 86 М.
What is a QueryString?
13:00
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 14 М.
Smart Sigma Kid #funny #sigma #comedy
00:25
CRAZY GREAPA
Рет қаралды 37 МЛН
ОСКАР vs БАДАБУМЧИК БОЙ!  УВЕЗЛИ на СКОРОЙ!
13:45
Бадабумчик
Рет қаралды 6 МЛН
孩子多的烦恼?#火影忍者 #家庭 #佐助
00:31
火影忍者一家
Рет қаралды 52 МЛН
Top 18 Most Useful Python Modules
10:50
Tech With Tim
Рет қаралды 926 М.
Python Django Pages, URLs & Slugs
20:55
Dave Gray
Рет қаралды 7 М.
Django 2: How To Upload A CSV File To Django
20:41
Master Code Online
Рет қаралды 49 М.
🚀  TDD, Where Did It All Go Wrong (Ian Cooper)
1:03:55
DevTernity Conference
Рет қаралды 554 М.
Django Forms Tutorial For Beginners - Get Started Fast! (2018)
29:36
The Dumbfounds
Рет қаралды 165 М.
Django Design Patterns - URLs Best Practises (Part 1)
12:04
The Dumbfounds
Рет қаралды 26 М.
Creating Django Dynamic URLs [Integer  v/s String v/s Slug] | Kundan Kumar #URLs
13:07
Let's Code with Kundan Kumar
Рет қаралды 521
How Model Queries Work in Django
27:47
Pretty Printed
Рет қаралды 95 М.
Django Tutorial #14 - URL Parameters
8:11
Net Ninja
Рет қаралды 66 М.