Hii,
below answer might ring some bells.
https://stackoverflow.com/questions/2551933/django-accessing-session-variables-from-within-a-template
Cheers!
On Sat, Jul 6, 2019, 5:24 PM Luka Lelashvili
wrote:
> Hello, how can I access session in my base.html? {% request.session.name
> %} doesn't
Hello, how can I access session in my base.html? {% request.session.name %}
doesn't work on base.html any clues?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
Hello, I'm having issues with Django sessions on Heroku/Redis.
I expect to be able to login and stay logged in. Instead, user will
continually be logged out and sessions do not persist.
I posted more details on Stack Overflow
here:
https://stackoverflow.com/questions/52535488/django-sessions
Hello, I'm having trouble configuring Django sessions to be persistent.
I expect a user to be able to log in on first try and then stay logged in.
Currently, it takes multiple tries to login and then the user is logged
out. Sessions are clearly not persisting.
I posted a bounty
8 at 05:44:22AM -0700, Web Architect wrote:
> > Hi,
> >
> > We are using persistent django sessions for our website where in the
> > session information is stored in MySQL. Over last couple of years, the
> > session data has grown to a huge number and we
Hi Avraham,
Thanks for the recommendation. Will take a look at the package.
Thanks.
On Monday, August 20, 2018 at 1:00:03 PM UTC+5:30, Avraham Serour wrote:
>
> maybe something like this could be useful for your use case:
> https://pypi.org/project/django-session-timeout/
> it has an option
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
On Fri, Aug 17, 2018 at 05:44:22AM -0700, Web Architect wrote:
> Hi,
>
> We are using persistent django sessions for our website where in the
> session information is stored in MySQL. Over last couple of years, the
> session
maybe something like this could be useful for your use case:
https://pypi.org/project/django-session-timeout/
it has an option for SESSION_EXPIRE_AFTER_LAST_ACTIVITY
maybe this could also be useful for you:
https://django-session-security.readthedocs.io/en/latest/
On Mon, Aug 20, 2018 at 8:34
Hi Jason,
Thanks for your response.
As mentioned in my earlier post...I have a long expiry date for the
sessions (and hence, the cookies) as we want our users to be always logged
in or in session (till they clear their cookies). And that's what is
causing the issue.
The goal is to keep the
Hi Hemendra,
Thanks for the workaround. Would look at it's feasibility in our existing
scenario.
Thanks.
On Saturday, August 18, 2018 at 3:58:10 PM UTC+5:30, HEMENDRA SINGH HADA
wrote:
>
> Hi,
>
> I can suggest one thing it might be useful for you. For this you need to
> create one more
> We are using persistent django sessions for our website where in
the
> session information is stored in MySQL. Over last couple of
years, the
> session data has grown to a huge number and we were planning to
clean
> it up.
> I know that there is a djan
With database sessions out of the box, no.
https://github.com/django/django/blob/master/django/contrib/sessions/base_session.py
You can see there are three attributes for a session model: key, data and
expire_date
That said, since sessions are backed by browser cookies, django's default
is
Hi,
I can suggest one thing it might be useful for you. For this you need to
create one more attribute in session table like *last activity,* which will
update every time when user is logged in and perform some action. Write one
middle-ware which will check the activity of each user and update
months. We can force out the
users who aren't active since last 3 months.
Is there a way to do that in django?
Thanks.
On Saturday, August 18, 2018 at 5:11:23 AM UTC+5:30, Mike Dewhirst wrote:
>
> On 17/08/2018 10:44 PM, Web Architect wrote:
> > Hi,
> >
> > We are using pe
On 17/08/2018 10:44 PM, Web Architect wrote:
Hi,
We are using persistent django sessions for our website where in the
session information is stored in MySQL. Over last couple of years, the
session data has grown to a huge number and we were planning to clean
it up.
I know
Hi,
We are using persistent django sessions for our website where in the
session information is stored in MySQL. Over last couple of years, the
session data has grown to a huge number and we were planning to clean it up.
I know that there is a django management command 'clearsessions' and we
You can have a flag in cart class to mark if things are cleared. Then in the
__iter__ function, check the flag before getting the keys.
If you do this you also need to add the check in add/remove and others
accordingly.
--
You received this message because you are subscribed to the Google
Hello,
I am practicing for my college exams. I am building a Restaurant Order
System with Django and I am using Django sessions for the first. I borrowed
some ideas from the "Django by example".
Below you can find the MenuItem model and Order Model.
class MenuItem(models.Model):
uot; within the root of the project directory.
I need to handle this using django-sessions. I need some pointer/examples
so that I can solve this issue.
More about this app: https://github.com/psachin/haqiba
--
You received this message because you are subscribed to the Google Groups
"Django users&qu
I have an django and i am trying to store an object in django session
varaible, and trying to access that in the redirected view, but its showing
`keyerror` as below
def payment(request):
if request.method == 'POST':
form = CardForm(request.POST)
if
I saw that post and set request.session.modified = True before redirecting
in the view with no luck!
Any other ideas?
Thanks,
-Moe
On Sun, Jul 1, 2012 at 4:08 PM, Alagappan wrote:
> I think someone has faced a similar issue as yours. Find more details at:
>
>
Hello,
Why is it that the session id changes after a redirect is initiated from a
view function? This is basically the scenario, after the browser makes a
POST request to a custom login() view function, the view function
authenticates the user and redirects (302) the user back to a page, but the
On Mon, May 7, 2012 at 7:48 AM, M Oklah wrote:
>
> Hello,
>
> Is it possible to hook into Django so that a user defined callback method is
> executed each time a session expires?
>
>
> Thanks,
>
> -Moe
>
Yes/no/maybe. Depends what you want to do.
First of all, nothing
Hello,
Is it possible to hook into Django so that a user defined callback method
is executed each time a session expires?
Thanks,
-Moe
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
> You better show some code now...
My urls.py has the following entry:
(r'^accounts/logout/$', 'django.contrib.auth.views.logout',
{'next_page' : '/'})
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
On Fri, Jun 4, 2010 at 8:45 PM, aa56280 wrote:
>> How are you logging out? Are you sure you are calling
>> django.contrib.auth.logout() ?
>
> Yup, I'm calling django.contrib.auth.views.logout()
>
You better show some code now...
Cheers
Tom
--
You received this message
> How are you logging out? Are you sure you are calling
> django.contrib.auth.logout() ?
Yup, I'm calling django.contrib.auth.views.logout()
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
On Thu, Jun 3, 2010 at 9:06 PM, aa56280 wrote:
> Django's docs say: "When a user logs in, Django adds a row to the
> django_session database table. Django updates this row each time the
> session data changes. If the user logs out manually, Django deletes
> the row. But if the
Django's docs say: "When a user logs in, Django adds a row to the
django_session database table. Django updates this row each time the
session data changes. If the user logs out manually, Django deletes
the row. But if the user does not log out, the row never gets
deleted."
I'm logging out of my
please have a look at this section
http://docs.djangoproject.com/en/dev/topics/http/sessions/#when-sessions-are-saved
--rama
On Jul 2, 2:15 am, bjoern_mainz wrote:
> Hi,
>
> what i try do do is (in plain python):
>
> products = []
> products.append({"product" :
Hi,
what i try do do is (in plain python):
products = []
products.append({"product" : "foo","quantity": 5})
products.append({"product": "foz","quantity": 1})
---Django---
def add_to_basket(request):
if not 'products' in request.session:
31 matches
Mail list logo