Re: Major Trouble Understanding Sessions Documentation

2012-08-02 Thread Kurtis Mullins
On Thu, Aug 2, 2012 at 10:57 AM, Gregory Thompson Jr. < spockthompso...@gmail.com> wrote: > Thanks a load! You've cleared up a lot! > > Yes, I have read through the tutorial. I even wrote a shortened version > of it to act as notes as I learn: http://polydoo.com/code/?p=48 (my > blog) > > Than

Re: Major Trouble Understanding Sessions Documentation

2012-08-02 Thread Gregory Thompson Jr.
Thanks a load! You've cleared up a lot! Yes, I have read through the tutorial. I even wrote a shortened version of it to act as notes as I learn: http://polydoo.com/code/?p=48 (my blog) Thanks again! On Thursday, August 2, 2012 10:42:59 AM UTC-4, Kurtis wrote: > > Hey Gregory, > > On Thu, A

Re: Major Trouble Understanding Sessions Documentation

2012-08-02 Thread Marcin Tustin
This is how you store data: request.session['member_id'] = m.id This is how you read it: request.session['member_id'] Your view code looks fine, in respect of how you use sessions. I can't see that you have explained what problem you are having: what is going wrong? Finally, you do have to do s

Re: Major Trouble Understanding Sessions Documentation

2012-08-02 Thread Daniel Roseman
On Thursday, 2 August 2012 15:31:54 UTC+1, Gregory Thompson Jr. wrote: > > >1. def login(request): >2. m = Member.objects.get(username=request.POST['username']) >3. if m.password == request.POST['password']: >4. request.session['member_id'] = m.id >5. ret

Re: Major Trouble Understanding Sessions Documentation

2012-08-02 Thread Kurtis Mullins
Hey Gregory, On Thu, Aug 2, 2012 at 9:06 AM, Gregory Thompson Jr. < spockthompso...@gmail.com> wrote: > I'd like to pass form data from one view to another. > > Here's my attempt: > > *#Models.py* > from django import forms > class Textizer(forms.Form): > to_textize = forms.CharField(max_leng

Re: Major Trouble Understanding Sessions Documentation

2012-08-02 Thread Gregory Thompson Jr.
Then how do I use the session to pass data between views? What's wrong with my code? If it counts for anything, *'text'* returns *'None'* in my debug statements (in the results() view). On Thursday, August 2, 2012 10:38:40 AM UTC-4, Marcin wrote: > > What's confusing about this? You don't ex

Re: Major Trouble Understanding Sessions Documentation

2012-08-02 Thread Marcin Tustin
What's confusing about this? You don't explicitly create sessions, and they last as long as they are configured to last, which by default is until the session cookie is cleared. On Thu, Aug 2, 2012 at 10:31 AM, Gregory Thompson Jr. < spockthompso...@gmail.com> wrote: > >1. def login(request):

Re: Major Trouble Understanding Sessions Documentation

2012-08-02 Thread Gregory Thompson Jr.
1. def login(request): 2. m = Member.objects.get(username=request.POST['username']) 3. if m.password == request.POST['password']: 4. request.session['member_id'] = m.id 5. return HttpResponse("You're logged in.") 6. else: 7. return HttpR

Re: Major Trouble Understanding Sessions Documentation

2012-08-02 Thread Daniel Roseman
On Thursday, 2 August 2012 14:06:04 UTC+1, Gregory Thompson Jr. wrote: > > > > I really don't understand the following, and I've read the documentation over > and over. I've been on this for two days: > > >- How to initiate a session >- How sessions are checked >- How to retrieve for

Re: Major Trouble Understanding Sessions Documentation

2012-08-02 Thread Gregory Thompson Jr.
Okay. What? Can you explain any of the key points I was trying to understand? I don't know what I'm doing. On Thursday, August 2, 2012 9:22:40 AM UTC-4, larry@gmail.com wrote: > > On Thu, Aug 2, 2012 at 7:06 AM, Gregory Thompson Jr. > wrote: > > I'd like to pass form data from one view

Re: Major Trouble Understanding Sessions Documentation

2012-08-02 Thread Larry Martell
On Thu, Aug 2, 2012 at 7:06 AM, Gregory Thompson Jr. wrote: > I'd like to pass form data from one view to another. > > Here's my attempt: > > #Models.py > from django import forms > > class Textizer(forms.Form): > to_textize = forms.CharField(max_length=100) > > def __unicode__(self): >