#4675: Typo in view example in session.txt
----------------------------+-----------------------------------------------
   Reporter:  [EMAIL PROTECTED]  |                Owner:  jacob        
     Status:  closed        |            Component:  Documentation
    Version:  SVN           |           Resolution:  invalid      
   Keywords:                |                Stage:  Unreviewed   
  Has_patch:  0             |           Needs_docs:  0            
Needs_tests:  0             |   Needs_better_patch:  0            
----------------------------+-----------------------------------------------
Changes (by Gary Wilson <[EMAIL PROTECTED]>):

  * status:  reopened => closed
  * resolution:  => invalid

Comment:

 But when the `has_commented` key doesn't exist, the then clause of the if
 statement is not executed...
 
 looking at the three cases:
  * `has_commented` is `True` => `request.session.get('has_commented',
 False)` evaluates to `True` => user sees "You've already commented."
  * `has_commented` is `False` => `request.session.get('has_commented',
 False)` evaluates to `False` => user's comment is saved and they see
 "Thanks for your comment!"
  * `has_commented` key doesn't exist in session =>
 `request.session.get('has_commented', False)` evaluates to `False` =>
 user's comment is saved and they see "Thanks for your comment!"

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4675#comment:3>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to