Re: [Django] #22004: Allow session.modified with an explicit False value to override SESSION_SAVE_EVERY_REQUEST

2014-03-20 Thread Django
#22004: Allow session.modified with an explicit False value to override
SESSION_SAVE_EVERY_REQUEST
--+--
 Reporter:  bruth |Owner:
 Type:  Uncategorized |   Status:  closed
Component:  contrib.sessions  |  Version:  master
 Severity:  Normal|   Resolution:  wontfix
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+--
Changes (by aaugustin):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 Your proposal could degenerate into a war of (overrides that override)+
 the default behavior :/

 The root cause of the problem is that Django has global settings to
 control the session behavior globally. Introducing exceptions isn't a good
 idea.

 A better idea would be to replace all relevant SESSION_* settings with a
 flexible mechanism to control when sessions are saved.

 In the short term, may I suggest a hack: substitute request.session with a
 mock object in that view? Would that work?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.c26c91e3abb3ea044bd0c4bcbedee1b4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22004: Allow session.modified with an explicit False value to override SESSION_SAVE_EVERY_REQUEST

2014-03-11 Thread Django
#22004: Allow session.modified with an explicit False value to override
SESSION_SAVE_EVERY_REQUEST
--+--
 Reporter:  bruth |Owner:
 Type:  Uncategorized |   Status:  new
Component:  contrib.sessions  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+--

Comment (by bruth):

 I merely suggested `modified = None` to prevent needing to add another
 attribute, but I agree that a new one would be more explicit and obvious.
 To answer your first question, I presume the setting was introduced in the
 first place so that users would not have to remember to save their
 sessions even if nothing on the session itself changed, i.e. keep the
 session alive since there is a request being made. Of course the side
 effect is that the session would never time out as long as a request comes
 in.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.9ff0d298f0fe1d0693bda35bf74e703c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22004: Allow session.modified with an explicit False value to override SESSION_SAVE_EVERY_REQUEST

2014-03-11 Thread Django
#22004: Allow session.modified with an explicit False value to override
SESSION_SAVE_EVERY_REQUEST
--+--
 Reporter:  bruth |Owner:
 Type:  Uncategorized |   Status:  new
Component:  contrib.sessions  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+--

Comment (by erikr):

 But can't you then document that integrating that app only works with that
 setting disabled? Or do users typically need this to be enabled for all
 their other views?

 I don't think it's very intuitive for `modified` to have three meanings -
 `True` for always save; `False` for never save, and `None` for it to
 depend on `SESSION_SAVE_EVERY_REQUEST`. The whole point of
 `SESSION_SAVE_EVERY_REQUEST` is to always save, regardless of whether
 modifications have been made.

 Perhaps adding a new attribute like `allow_save`, not necessarily with
 that name, would be a cleaner approach. It's definitely a lot more obvious
 to understand:
 {{{
 request.session.allow_save = False
 }}}
 than to realise the impact of:
 {{{
 request.session.modified = False
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.9601670ceb7a33a6a14817fbaec0bc2c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22004: Allow session.modified with an explicit False value to override SESSION_SAVE_EVERY_REQUEST

2014-03-11 Thread Django
#22004: Allow session.modified with an explicit False value to override
SESSION_SAVE_EVERY_REQUEST
--+--
 Reporter:  bruth |Owner:
 Type:  Uncategorized |   Status:  new
Component:  contrib.sessions  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+--

Comment (by bruth):

 The `SESSION_SAVE_EVERY_REQUEST` setting is applied project-wide which
 prevents integrating a third-party app that needs that behavior to be
 turned off for it to work correctly.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.a34c1416bc9345eeb5a9ece35b30ee5a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22004: Allow session.modified with an explicit False value to override SESSION_SAVE_EVERY_REQUEST

2014-03-11 Thread Django
#22004: Allow session.modified with an explicit False value to override
SESSION_SAVE_EVERY_REQUEST
--+--
 Reporter:  bruth |Owner:
 Type:  Uncategorized |   Status:  new
Component:  contrib.sessions  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+--

Comment (by erikr):

 Why can't your use case be resolved by just setting
 `SESSION_SAVE_EVERY_REQUEST` to False? The issue you are describing simply
 sounds like this setting functioning as intended and documented.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.bcc22f5a4d912208abf54d5ecb12e3d4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22004: Allow session.modified with an explicit False value to override SESSION_SAVE_EVERY_REQUEST

2014-03-11 Thread Django
#22004: Allow session.modified with an explicit False value to override
SESSION_SAVE_EVERY_REQUEST
--+--
 Reporter:  bruth |Owner:
 Type:  Uncategorized |   Status:  new
Component:  contrib.sessions  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+--
Changes (by anonymous):

 * owner:  johngian =>
 * status:  assigned => new


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.4cb075d1a450dc9be016661d028e4589%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22004: Allow session.modified with an explicit False value to override SESSION_SAVE_EVERY_REQUEST

2014-02-13 Thread Django
#22004: Allow session.modified with an explicit False value to override
SESSION_SAVE_EVERY_REQUEST
--+--
 Reporter:  bruth |Owner:  johngian
 Type:  Uncategorized |   Status:  assigned
Component:  contrib.sessions  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+--
Changes (by johngian):

 * status:  new => assigned
 * owner:  nobody => johngian


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.1ccd6d6f24bde3f5453dd7cb8f8d7163%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #22004: Allow session.modified with an explicit False value to override SESSION_SAVE_EVERY_REQUEST

2014-02-13 Thread Django
#22004: Allow session.modified with an explicit False value to override
SESSION_SAVE_EVERY_REQUEST
--+--
 Reporter:  bruth |Owner:  johngian
 Type:  Uncategorized |   Status:  assigned
Component:  contrib.sessions  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+--
Changes (by johngian):

 * cc: johngiannelos@… (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.4007fac1081f5f93e0ab85175f5bf5e0%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #22004: Allow session.modified with an explicit False value to override SESSION_SAVE_EVERY_REQUEST (was: Allow session.modified with an explicitl False value to override SESSION_SAVE_EVER

2014-02-10 Thread Django
#22004: Allow session.modified with an explicit False value to override
SESSION_SAVE_EVERY_REQUEST
--+--
 Reporter:  bruth |Owner:  nobody
 Type:  Uncategorized |   Status:  new
Component:  contrib.sessions  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+--
Changes (by bruth):

 * needs_better_patch:   => 0
 * needs_docs:   => 0
 * needs_tests:   => 0


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.1a0e78557ba747841cf0887782ee7cfa%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.