Skip to main content

Questions tagged [django-sessions]

For questions related to Django's session mechanism.

django-sessions
1 vote
1 answer
28 views

What is the best way to make sure the "django-timezone" session variable is set based on a user's profile preference each time they log in

Background I read this section in Django's documentation titled "Selecting the current time zone,", and it's clear to me how a user can select their preferred timezone for their session (and ...
DevinG's user avatar
  • 474
0 votes
1 answer
97 views

How to do session-based authentication when combining FastAPI with Django?

For the backend of a project, we are combining FastAPI and Django. Why FastAPI? We need to use WebSockets and FastAPI supports that natively We like the Pydantic validation & auto-documentation ...
KCDC's user avatar
  • 724
0 votes
0 answers
26 views

Clearing the browser history and django session

I have an application in django, in it you can add a tourist tour to your cart, the basket is stored in the session. The tour has a model, and the models field is available.It is responsible for the ...
Magomed's user avatar
0 votes
3 answers
59 views

KeyError at /cart/ 'product_obj' Django

In my cart i can add same product with different size and color. but randomly when i want to to add same product with different size and color i have this error in my cart iter function. i've tracked ...
vahid sh's user avatar
0 votes
1 answer
42 views

Django sessions failing intermittently

I wrote an app last year for a community event I run, called Nashville Tabletop Day. The app allows people to scan QR codes to interact with games they can play during the day. Locally it runs great. ...
commadelimited's user avatar
1 vote
1 answer
45 views

Django Sessions Login

in the following code section of my Django project, I have a function login_view. This function is supposed to log in a user. My question would be how I can use Django's sessions to start a separate ...
Fabian Tschuggmall's user avatar
0 votes
1 answer
72 views

Access to Django Session with React

I'm new to React and I wanna Access my Django sessions with React framework. In this case I have an array in my session named UserInfo that I can access with request.session['UserInfo'] in Django. I ...
Mohammad's user avatar
  • 129
0 votes
1 answer
29 views

Hi, I'm a beginner in Django. After logging into the admin site, the admin account automatically logs into the main site. How can I fix this issue?

I am almost beginner in django, the problem i am facing is that when i logged in main site from an account and then logged into admin site from admin's account then this admin automatically logged ...
Adeeb Hassi's user avatar
0 votes
0 answers
81 views

Django - Redis Sessions not being recognized by downstream microservices from user_service

I am writing a Django framework based on Django Rest Framework with Redis enabled for authenticated sessions. That way my downstream micro-sevices can use the same session / cookie information and jwt ...
Grant Zukel's user avatar
  • 1,183
0 votes
0 answers
180 views

Django site wide caching with vary on Cookie header caching per user response due to third party cookies

I am currently trying to set up the per-site-cache, it all seemed to work fine locally but once I moved it onto test servers with google analytics I noticed that it wasn't serving pages from the cache ...
Mike H's user avatar
  • 21
-2 votes
1 answer
42 views

How to access the session information coming in from a third party application in Django

I Need to check whether a user is logged in to a third party application from a redirection request that comes from that application. This request must contain a session token and the credentials used ...
Apurva Kunkulol's user avatar
-2 votes
2 answers
186 views

What is the most secure way to store sessions with Django?

What Django session engine should I use for enhanced security?
Aidas Bendoraitis's user avatar
0 votes
1 answer
54 views

Django Session, Login and Signup

This is my view module def home(request): return render(request, 'rescues_site/home_page.html') # @login_required def user_home(request): if request.method == 'POST': username = ...
Khiết Huỳnh's user avatar
0 votes
1 answer
66 views

How do I log out any user when using the cache session backend?

I am building a form into django admin where I can submit a user id and the system is expected to log the user out. I cannot do django.contrib.auth.logout() because it does not take a user id as a ...
wonton's user avatar
  • 7,988
1 vote
2 answers
106 views

How to store or save ssh client object in Django session?

Below functions, I am creating the ssh client and trying to save it to django session object. def create_ssh_client(host, user, password): client = SSHClient() client....
codemastermind's user avatar

15 30 50 per page
1
2 3 4 5
33