Re: Session Variables

2017-05-30 Thread Russell Keith-Magee
Please stop spreading FUD like this. The Django Community Code of Conduct isn’t a blunt instrument attempting to stop all dissent or disagreement. It’s there to ensure that everyone treats everyone else with respect in all communications. The fact that Daniel criticised Hungarian notation is in

Re: Session Variables

2017-05-30 Thread ludovic coues
Pretty sure the django code of conduct is against criticizing the use of Hungarian notation. 2017-05-29 12:29 GMT+02:00 Daniel Roseman : > On Monday, 29 May 2017 06:04:02 UTC+1, James Schneider wrote: >> >> >> On May 28, 2017 9:35 AM, wrote: >> >> >>

Re: Session Variables

2017-05-29 Thread Daniel Roseman
On Monday, 29 May 2017 06:04:02 UTC+1, James Schneider wrote: > > > On May 28, 2017 9:35 AM, wrote: > > > tFetchData = users.objects.get(emailid = lEmailId) > > request.session['sPassword'] = tFetchData.userroles > request.session['sCompanyId'] =

Re: Session Variables

2017-05-28 Thread James Schneider
On May 28, 2017 9:35 AM, <yeddu.j.pra...@gmail.com> wrote: Dear Experts, I am new to Django and need your help. I want a set of variables populated into session variables. These will be fixed values for the user such as which company he belongs to, his email id, his role etc. These

Session Variables

2017-05-28 Thread yeddu . j . prasad
Dear Experts, I am new to Django and need your help. I want a set of variables populated into session variables. These will be fixed values for the user such as which company he belongs to, his email id, his role etc. These values will be read from the database by the login form. These values

How to clear all session variables without getting logged out?

2013-04-16 Thread Cody Scott
I am trying to clear all of the session variables but not logout the current user. user = request.session.get('member_id', None) request.session.flush() request.session.modified = True request.session['member_id'] = user request.session.modified = True Will this also affect

Re: Comment Framework and Session Variables

2011-09-21 Thread Andres Reyes
t; View this message in context: > http://old.nabble.com/Comment-Framework-and-Session-Variables-tp32503766p32503766.html > Sent from the django-users mailing list archive at Nabble.com. > > -- > You received this message because you are subscribed to the Google Groups > "Django use

Comment Framework and Session Variables

2011-09-21 Thread SixDegrees
the session value as part of the 'initial' dictionary. I don't see any way in the template to pass this value along so the form can make use of it. How can I do this? -- View this message in context: http://old.nabble.com/Comment-Framework-and-Session-Variables-tp32503766p32503766.html Sent from

Re: Jumping from Django to php : maintaining session variables..

2010-07-06 Thread euan.godd...@googlemail.com
I think the solution is pretty self-explanatory. Could you give details of the specific problem you're encountering, because, as far as I can see, the snippet given in the referenced post is excellent, although I fail to see why any one would want to support a cross-PHP/ python application out of

Jumping from Django to php : maintaining session variables..

2010-07-06 Thread Sudharshan
Hello ppl, I have a situation here which is aptly described by an earlier post http://groups.google.com/group/django-users/msg/a492cb9394b0db4d But my problem is that even after doing whatever the post says i am not able to get away with the problem Can someone revisit the solution to the

Re: how do you use session variables in template tags?

2009-09-03 Thread Brandon
Is the request object present in your context? I believe you'd have to pass in the request, or make it available to the template via request_context and or the django.core.context_processors.request middleware. HTH, Brandon On Sep 3, 8:21 am, Bobby Roberts wrote: > I

how do you use session variables in template tags?

2009-09-03 Thread Bobby Roberts
I cannot for the life of me get a session variable to work in a template tag. Here's what I have ... from django.contrib.sessions.models import Session register = template.Library() @register.filter(name='isinsavedlist') # this gets the latest new item from the new item flex mod def

Re: Accessing session variables in template with django

2009-05-23 Thread Puneet
Thanks Daniel, Its working fine now. :) On May 23, 1:39 am, Daniel Roseman <roseman.dan...@googlemail.com> wrote: > On May 23, 6:34 am, Puneet <look4pun...@gmail.com> wrote: > > > > > Hi All, > > > I am facing issue when I am trying to access session vari

Re: Accessing session variables in template with django

2009-05-23 Thread Daniel Roseman
On May 23, 6:34 am, Puneet <look4pun...@gmail.com> wrote: > Hi All, > > I am facing issue when I am trying to access session variables in > django. > > I am setting the session variable something like : > >  request.session['cityname'] = cityname >  c = Reque

Accessing session variables in template with django

2009-05-23 Thread Puneet
Hi All, I am facing issue when I am trying to access session variables in django. I am setting the session variable something like : request.session['cityname'] = cityname c = RequestContext(request, {'current_date': now}) html = t.render(c) return HttpResponse(html) And I am trying

Sounding out form state preservation with session variables?

2009-04-28 Thread Alfonso
Hi, I've got a form with a number of checkboxes that allow a user to filter their search query based on the usual suspects of things like location, facilities etc. So now I need a way to preserve these checked options after the form is submitted to allow the user to adjust what they are looking

Re: Working with Forms and Session Variables

2009-02-11 Thread Daniel Roseman
On Feb 11, 4:11 pm, gbd wrote: > Another point (sorry I should have said this in my original post) > > My form is bound > i.e. in my view > form = RecipeForm(request.POST) > I don't believe that I can use initial in this case? > > please let me know if I've misunderstood

Re: Working with Forms and Session Variables

2009-02-11 Thread gbd
Thanks for all your help it's much appreciated. I will work with both methods and see if i can get them to work! Thanks again On Feb 11, 12:13 pm, Daniel Roseman wrote: > On Feb 11, 4:11 pm, gbd wrote: > > > > > Another point (sorry I

Re: Working with Forms and Session Variables

2009-02-11 Thread gbd
Feb 11, 10:54 am, Daniel Roseman <roseman.dan...@googlemail.com> > wrote: > > > On Feb 11, 3:20 pm, gbd <ganit.bar...@gmail.com> wrote: > > > > Hello, > > > > I am presently working on my first Django project and seemed to be a > > > little s

Re: Working with Forms and Session Variables

2009-02-11 Thread gbd
wrote: > On Feb 11, 3:20 pm, gbd <ganit.bar...@gmail.com> wrote: > > > > > Hello, > > > I am presently working on my first Django project and seemed to be a > > little stuck concerning session variables and forms. > > > This is how my app is laid out: > >

Re: Working with Forms and Session Variables

2009-02-11 Thread Daniel Roseman
On Feb 11, 3:20 pm, gbd <ganit.bar...@gmail.com> wrote: > Hello, > > I am presently working on my first Django project and seemed to be a > little stuck concerning session variables and forms. > > This is how my app is laid out: > - user logs in and is directed to a &q

Working with Forms and Session Variables

2009-02-11 Thread gbd
Hello, I am presently working on my first Django project and seemed to be a little stuck concerning session variables and forms. This is how my app is laid out: - user logs in and is directed to a "you have successfully logged in" page - user is then redirected to what i

Re: Session variables

2009-02-03 Thread Malcolm Tredinnick
On Tue, 2009-02-03 at 13:52 -0800, Vladimir Shulyak wrote: > Any progress on this problem? > I've got exactly the same problem with sessions on ubuntu/database- > backend sessions. But the most interesting thing that variables like > instances of large classes are deleted while simple instances

Re: Session variables

2009-02-03 Thread Vladimir Shulyak
Any progress on this problem? I've got exactly the same problem with sessions on ubuntu/database- backend sessions. But the most interesting thing that variables like instances of large classes are deleted while simple instances like integers are fine. class Cart(): items = {}

Re: Session Variables as Default Form Values

2009-02-02 Thread Ty
kbox in my comment form that says "remember my > > >> information". After a comment is submitted and if the checkbox is > > >> checked I'm saving the persons name, email address, and website in > > >> session variables. > > > >> Now I'm j

Re: Session Variables as Default Form Values

2009-02-02 Thread Ty
a session variable. > > >> I have a checkbox in my comment form that says "remember my > >> information". After a comment is submitted and if the checkbox is > >> checked I'm saving the persons name, email address, and website in > >> session variabl

Re: Session Variables as Default Form Values

2009-01-30 Thread Todd O'Bryan
orm >> field to a session variable. >> >> I have a checkbox in my comment form that says "remember my >> information". After a comment is submitted and if the checkbox is >> checked I'm saving the persons name, email address, and website in >> session variab

Re: Session Variables as Default Form Values

2009-01-30 Thread Tyler Brownell
set the default value for a form > field to a session variable. > > I have a checkbox in my comment form that says "remember my > information". After a comment is submitted and if the checkbox is > checked I'm saving the persons name, email address, and website in >

Session Variables as Default Form Values

2009-01-30 Thread Ty
submitted and if the checkbox is checked I'm saving the persons name, email address, and website in session variables. Now I'm just trying to figure out how to get these session variables to load as the default values in the form fields, if they exist. Can anyone p

Re: Session variables

2009-01-09 Thread bradders
No this is Linux (SUSE10), runing behind Apache and not filesystem. John On Jan 9, 1:27 am, Malcolm Tredinnick wrote: > On Thu, 2009-01-08 at 05:12 -0800, bradders wrote: > > I will try to put something together. I have a fairly detailed trace > > that I have put

Re: Session variables

2009-01-08 Thread Malcolm Tredinnick
On Thu, 2009-01-08 at 05:12 -0800, bradders wrote: > I will try to put something together. I have a fairly detailed trace > that I have put in the session code that shows my session variables > are set when it calls one of my views, but the trace shows that the > next session sav

Re: Session variables

2009-01-08 Thread bradders
I will try to put something together. I have a fairly detailed trace that I have put in the session code that shows my session variables are set when it calls one of my views, but the trace shows that the next session save only a new session variable set in that view exists all the other

Re: Session variables

2009-01-08 Thread Malcolm Tredinnick
On Thu, 2009-01-08 at 02:30 -0800, bradders wrote: > Can anyone recommend a session system that works more reliably than > the built-in Django session handling? I am finding that after calling > 2 or 3 different views the session variables that were stored at login > time get cleared

Session variables

2009-01-08 Thread bradders
Can anyone recommend a session system that works more reliably than the built-in Django session handling? I am finding that after calling 2 or 3 different views the session variables that were stored at login time get cleared. I am using django 1.0, but I think the problem existed in earlier

Re: Django Session Variables

2008-12-21 Thread j...@zigzap.com
ould only take you > about two minutes to test it though--just try it out. > > -Jeff > > On Dec 19, 6:18 pm, "j...@zigzap.com" <jlb2...@gmail.com> wrote: > > > Does django maintain session variables when logging in or does it > > generate a new session

Re: del session variables

2008-12-20 Thread Jeff FW
Wow, you're right. I've been programming Python for years, and I somehow never noticed that. I'll be quiet not :-) On Dec 17, 6:33 pm, Malcolm Tredinnick wrote: > On Wed, 2008-12-17 at 15:09 -0800, Jeff FW wrote: > > You've got a space in between

Re: Django Session Variables

2008-12-20 Thread Jeff FW
On Dec 19, 6:18 pm, "j...@zigzap.com" <jlb2...@gmail.com> wrote: > Does django maintain session variables when logging in or does it > generate a new session when you use the built in authentication. > Essentially I want to be able to assign session values to an Anonymous &g

Django Session Variables

2008-12-19 Thread j...@zigzap.com
Does django maintain session variables when logging in or does it generate a new session when you use the built in authentication. Essentially I want to be able to assign session values to an Anonymous User and be able to carry them through when they log

Re: del session variables

2008-12-17 Thread Malcolm Tredinnick
On Wed, 2008-12-17 at 15:09 -0800, Jeff FW wrote: > You've got a space in between "HttpResponseRedirect" and "('../ > shop')" . Which is perfectly legal and unambiguous in Python. That isn't a problem. Regards, Malcolm --~--~-~--~~~---~--~~ You received this

Re: del session variables

2008-12-17 Thread Malcolm Tredinnick
On Wed, 2008-12-17 at 11:44 -0800, Bobby Roberts wrote: > > > Have a look at theflush() method; I believe that might well be close to > > what you are after. > > > > Regards, > > Malcolm > > > I'm trying to call the view below: > > def DoSessionReset(request): > request.session.flush() >

Re: del session variables

2008-12-17 Thread Jeff FW
You've got a space in between "HttpResponseRedirect" and "('../ shop')" . On Dec 17, 2:44 pm, Bobby Roberts wrote: > > Have a look at theflush() method; I believe that might well be close to > > what you are after. > > > Regards, > > Malcolm > > I'm trying to call the view

Re: del session variables

2008-12-17 Thread Bobby Roberts
> Have a look at theflush() method; I believe that might well be close to > what you are after. > > Regards, > Malcolm I'm trying to call the view below: def DoSessionReset(request): request.session.flush() return HttpResponseRedirect ('../shop') I'm getting this error: TypeError

Re: del session variables

2008-11-20 Thread Malcolm Tredinnick
On Thu, 2008-11-20 at 14:06 -0800, Bobby Roberts wrote: > is there a way to kill a session rather than running a del statement > on each session variable? I know in .asp you can simply say > session.abandon. Is there an equivalent with django? Django has this really nifty feature (I believe

Re: del session variables

2008-11-20 Thread Andy McKay
On 20 Nov 2008, at 22:06, Bobby Roberts wrote: > is there a way to kill a session rather than running a del statement > on each session variable? I know in .asp you can simply say > session.abandon. Is there an equivalent with django? In the session documentation there are mentions of:

del session variables

2008-11-20 Thread Bobby Roberts
is there a way to kill a session rather than running a del statement on each session variable? I know in .asp you can simply say session.abandon. Is there an equivalent with django? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: intial form field values using session variables

2008-06-27 Thread Arien
On Fri, Jun 27, 2008 at 1:12 PM, Bobby Roberts <[EMAIL PROTECTED]> wrote: > > [...] I'm trying to print those session variables to the screen in > step 2 (ie the 2nd form) so the user can review what was previously > entered on the first fom. (If this page immediately follows t

Re: intial form field values using session variables

2008-06-27 Thread Bobby Roberts
> You can pass in an "initial" argument when you instantiate your Form, > as explained > here:http://www.djangoproject.com/documentation/newforms/#dynamic-initial-... > > Arien cool! I overlooked that. I've got it working great. I'm trying to print those sessio

Re: intial form field values using session variables

2008-06-27 Thread Arien
On Fri, Jun 27, 2008 at 8:42 AM, Bobby Roberts <[EMAIL PROTECTED]> wrote: > > i'm trying to use session variables as initial values for certain form > fields as such: > >AccountNum = forms.CharField > (initial=request.session["AccountNum"],max_length=20,

intial form field values using session variables

2008-06-27 Thread Bobby Roberts
i'm trying to use session variables as initial values for certain form fields as such: AccountNum = forms.CharField (initial=request.session["AccountNum"],max_length=20, required=True, label = "Account #") i'm getting this: NameError: name 'request' is not defined ho

Re: Session variables without a database

2007-11-07 Thread [EMAIL PROTECTED]
t; variable ( the API calls can take a while)... I thought I remembered > > reading somewhere it wasn't possible to use session variables w/out > > using a Database with Django. Anyone have any work arounds for > > this? > > > Thanks for any info. --~--~-~--~~--

Re: Session variables without a database

2007-11-07 Thread @@
some API calls, but wanted to use > Django templates. I had wanted to store this data in a session > variable ( the API calls can take a while)... I thought I remembered > reading somewhere it wasn't possible to use session variables w/out > using a Database with Django. Anyone have

Session variables without a database

2007-11-07 Thread [EMAIL PROTECTED]
it wasn't possible to use session variables w/out using a Database with Django. Anyone have any work arounds for this? Thanks for any info. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Re: Curious error with Session Variables

2007-05-10 Thread Diego pylorca
Thanks Graham :) it works!! On 5/9/07, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > > > Try reenabling PHP, but delve into the PHP setup and disable the > loading of the PHP mhash module first. > > There have been cases where the PHP mhash module has clashed in some > way with the

Re: Curious error with Session Variables

2007-05-09 Thread Graham Dumpleton
Try reenabling PHP, but delve into the PHP setup and disable the loading of the PHP mhash module first. There have been cases where the PHP mhash module has clashed in some way with the Python md5 hash modules and caused the Python module to give back incorrect results. This may have an effect

Re: Curious error with Session Variables

2007-05-09 Thread Diego pylorca
Nop, when I disable mod-php5, the admin works correctly :( my web browsers are firefox and opera and IE, but it is not a client host problem :'( On 5/8/07, John DeRosa <[EMAIL PROTECTED]> wrote: > > > Perhaps check your firewall, anti-hijack, anti-trojan, etc. software. > You may have a cookie

Re: Curious error with Session Variables

2007-05-08 Thread John DeRosa
Perhaps check your firewall, anti-hijack, anti-trojan, etc. software. You may have a cookie guard enabled. For example, Webroot's Spy Sweeper has a set of "shields" for web browsers, and they include the blocking of certain tracking cookies and some IE security 'protection'. Perhaps your

Re: Curious error with Session Variables

2007-05-08 Thread Diego pylorca
m I deployed my site, and in the admin when i try to login i get this message: "Looks like your browser isn't configured to accept cookies. Please enable cookies, reload this page, and try again." the cookies is enabled. my server is a debian etch stable (intalled modpython apache2 and

Re: Curious error with Session Variables

2007-05-08 Thread Diego pylorca
For more info about me config: Apache/2.2.3 (Debian) mod_python/3.2.10 Python/2.4.4 PHP/5.2.0-8+etch3 mod_ssl/2.2.3 OpenSSL/0.9.8c Server at *** Port 80 and my vhost: ServerName ***.net ServerAlias www..net CustomLog /var/log/apache2/***/access.log combined

Re: Curious error with Session Variables

2007-04-04 Thread chasfs
There are several things going on here. If you have multiple django sites all setting sessions cookies, make sure that the SESSION_COOKIE_NAME and SESSION_COOKIE_DOMAIN are unique in the respective settings.py files. You also need to clean out old session rows in the django_session database. You

Re: Curious error with Session Variables

2007-04-03 Thread Kenneth Gonsalves
On 03-Apr-07, at 11:06 PM, Ramdas S wrote: > Looks like your browser isn't configured to accept cookies. Please > enable cookies, reload this page, and try again. > > > Later if I persist > > I get this error one person on irc was getting this - he solved it by physically restarting apache

Re: Curious error with Session Variables

2007-04-03 Thread Ramdas S
browsing through the user groups, I see that the issue is a clash between Django and PHP4/5. I cannot turn them off, since some sites on our server still use PHP. Is there any solution where we can ensure that Django does not clash with PHP and live peacefully. I am eager to know Ramdas On

Curious error with Session Variables

2007-04-03 Thread Ramdas S
Since last few days I am getting this error on Django web sites hosted. Obviously it is clashing with something. When I work on admin interface to add or delete content, I get logged off and it takes some time for me to login again. I get the following messages Please enter a correct username

Re: Accessing session variables in templates

2006-10-12 Thread patrickk
I didn´t try that, but with a combination of the following it should work: http://www.djangoproject.com/documentation/request_response/#attributes http://www.djangoproject.com/documentation/templates_python/#django- core-context-processors-request patrick Am 12.10.2006 um 19:21 schrieb

Accessing session variables in templates

2006-10-12 Thread Patrick J. Anderson
Hi! I have a member_id session variable, which I set at login (it is different than "user"). I need to check that variable in my templates to display member-specific navigation. How can I check do this? Or do I need to do the checking in each view function and pass the value in a template