How to Use Django Sessions

  Рет қаралды 37,399

Pretty Printed

Pretty Printed

Күн бұрын

Пікірлер: 40
@AlexZyablov
@AlexZyablov Жыл бұрын
For anybody who was searching for it. The actual tutorial about sessions starts at 14:12.
@rishabhsingh3315
@rishabhsingh3315 Жыл бұрын
Live long
@chahatbhatia2157
@chahatbhatia2157 4 ай бұрын
Thanks Man!
@davidinmichael
@davidinmichael 11 ай бұрын
This is a great tutorial, explains the whole concepts at once, thank you.
@amythomas3745
@amythomas3745 2 жыл бұрын
Thank you! I'm taking a programming bootcamp, am late with an assessment because after having all of the 'parts' for the website that I'm required to create, until watching this I just couldn't figure out how to correctly put it all together, the views, urls, etc, I finally get it! This wasn't even why I started watching it (I wanted to get a head start on the topic for Monday) but this was much more significant to me as far as actually having a chance to pass this course, I'm excited to watch the rest. thanks again!
@itsvivekshukla1
@itsvivekshukla1 3 жыл бұрын
to solve the issue that you faced in last part of the video, move the statement in line no 25 (insertion part) to the last part of current if (ie. right after removal of more than 5 elems). Nice Video. Thanks.
@prettyprinted
@prettyprinted 3 жыл бұрын
I'll try that out. Thanks for watching!
@HandcartRule46
@HandcartRule46 2 жыл бұрын
Great video like always, the applicability of your tutorials is fantastic. If I may add a little tip, use constants when grabbing session data that way you ensure you didn't do a typo somewhere and will get an error in your ide. What i mean is instead of: request.session['data_field'] Then: DATA_FIELD = 'data_field' request.session[DATA_FIELD] It works great when you are dealing with a lot of session data.
@vikaskumarl3719
@vikaskumarl3719 2 жыл бұрын
great video, nicely explained. Would have appreciated it even more if you had shown how the sessions are stored in DB and see what information does it store exactly.
@HandcartRule46
@HandcartRule46 2 жыл бұрын
I'm also keen to know about this. I've been wondering if you are able to save state with class based views for individual sessions.
@brandon_wallace
@brandon_wallace 3 жыл бұрын
Anthony, I really like these Django videos.
@ClaytonCook12
@ClaytonCook12 3 жыл бұрын
Really great video! Will be using sessions more now that I've seen how easy it is to add and remove data.
@akhils3561
@akhils3561 2 жыл бұрын
Nicely explained. if possible kindly do a video on soft deletion of data in django.
@ambaigbaig9459
@ambaigbaig9459 8 ай бұрын
Pretty Printed why you didn't use orderby in order to manage the recently viewed image in the the list?
@optimuseaacademy
@optimuseaacademy Жыл бұрын
super tutorials, thanks man
@prettyprinted
@prettyprinted Жыл бұрын
Thanks for watching!
@AngelHernandez-ex7ji
@AngelHernandez-ex7ji 2 жыл бұрын
how long do sessions last? is there a way to limit their time ?
@matrixtoogood5601
@matrixtoogood5601 2 жыл бұрын
Sessions start from 13:29
@saidtahmazov9197
@saidtahmazov9197 2 жыл бұрын
Really helpful video. Subscribed! Thanks.
@MrPicklepod
@MrPicklepod 2 жыл бұрын
A fantastic tutorial!
@user-vv8sx2th6r
@user-vv8sx2th6r Жыл бұрын
Thank you, it was realy interesting.
@developershub2024
@developershub2024 6 ай бұрын
Its a great video but i have a question, suppose we have a form where we are booking lets say a hotel but we did not finish the booking process, how can we make sure that after logging back in if we are logged in we dont loose the information in our form. instead we continue where we left. Someone please help.
@chahatbhatia2157
@chahatbhatia2157 4 ай бұрын
I need help with the same, did u manage to get an answer?
@ajmalbangash6928
@ajmalbangash6928 Жыл бұрын
Products.objects.filter(pk__n=request.sessions[recently_viewed]) What is pk___n here refers to???
@prettyprinted
@prettyprinted Жыл бұрын
pk is the primary key of Products, so the product id. pk__in means that primary key matches of the items in the list request.sessions[recently_viewed]
@itspaintosee
@itspaintosee 10 ай бұрын
I have the same set up (as far as I can tell). I'm using the django_session table. Which has no rows. But each time I have a new request, the session is empty. Anybody know why it's dictionary is either not being set or not being reloaded on follow up requests? Thanks
@2010sparsh
@2010sparsh Жыл бұрын
Why would u add product to session ???
@thetechtimes
@thetechtimes 3 жыл бұрын
Amazing ❤️✨
@prettyprinted
@prettyprinted 3 жыл бұрын
Thanks for watching!
@RainSoundsToConcentrate
@RainSoundsToConcentrate 6 ай бұрын
Awesome :)
@timmanning9
@timmanning9 3 жыл бұрын
Is session synonymous with cookies? If not, what is the difference?
@prettyprinted
@prettyprinted 3 жыл бұрын
Sessions allow you to associate information with a user. A cookie is just one method of doing so. But I would say more implementation of sessions use cookies in some way.
@7s9n
@7s9n 3 жыл бұрын
Thanks 💛
@prettyprinted
@prettyprinted 3 жыл бұрын
You're welcome 😊
@AntonioSanchez-bi3nu
@AntonioSanchez-bi3nu 2 жыл бұрын
Te amo.
@idobooks909
@idobooks909 Жыл бұрын
13:28
@chamaipornphongthong
@chamaipornphongthong 3 жыл бұрын
👍👍👍👍👍👍👍
@scren2010
@scren2010 3 жыл бұрын
👍
@prettyprinted
@prettyprinted 3 жыл бұрын
Thanks for watching!
@ashokkumar5581
@ashokkumar5581 2 жыл бұрын
kzbin.info/www/bejne/hF61ZqCKYtN8es0 for Sessions.
Difference between cookies, session and tokens
11:53
Valentin Despa
Рет қаралды 648 М.
ROSÉ & Bruno Mars - APT. (Official Music Video)
02:54
ROSÉ
Рет қаралды 288 МЛН
Will A Basketball Boat Hold My Weight?
00:30
MrBeast
Рет қаралды 147 МЛН
Using Sessions in Django
12:34
Chuck Severance
Рет қаралды 23 М.
How to Use Select Related and Prefetch Related in Django
9:34
Pretty Printed
Рет қаралды 27 М.
Django Dynamic Forms Tutorial with Htmx
48:27
Matt Freire
Рет қаралды 69 М.
Understanding Django Model Relationships
25:56
Pretty Printed
Рет қаралды 95 М.
Django Middleware
56:19
Very Academy
Рет қаралды 24 М.
Django Interview Questions (Junior Developer)
30:26
Dennis Ivy
Рет қаралды 126 М.
How Sessions in Django Work
9:27
Denis Orehovsky
Рет қаралды 18 М.
Customer Sessions Shopping Cart - Django Wednesdays ECommerce 12
10:04
Adding a session timeout in Django
15:44
Cloud With Django
Рет қаралды 9 М.