Re: [Django] #17213: Can't change TIME_ZONE after initial transaction in PostgreSQL

2011-11-21 Thread Django
#17213: Can't change TIME_ZONE after initial transaction in PostgreSQL
-+-
 Reporter:  calvinspealman   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  SVN
  (models, ORM)  |   Resolution:  wontfix
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by aaugustin):

 The [https://docs.djangoproject.com/en/dev/ref/signals/#connection-created
 connection_created] signal may be useful in you want to change the time
 zone on a per-request basis.

 I think setting `TIME_ZONE = None` in the settings file and executing `SET
 TIME ZONE` in a signal receiver should work. That function will have to
 look up the time zone in a global (thread-local) variable.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #17213: Can't change TIME_ZONE after initial transaction in PostgreSQL

2011-11-21 Thread Django
#17213: Can't change TIME_ZONE after initial transaction in PostgreSQL
-+-
 Reporter:  calvinspealman   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  SVN
  (models, ORM)  |   Resolution:  wontfix
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by anonymous):

 It would be possible to support changing the connection timezone for every
 cursor.execute() if it needs changing, using get_parameter_status (see
 #17266). Although I do agree with aaugustin: you should not change
 settings, except in testing using override_setting.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #17213: Can't change TIME_ZONE after initial transaction in PostgreSQL

2011-11-20 Thread Django
#17213: Can't change TIME_ZONE after initial transaction in PostgreSQL
-+-
 Reporter:  calvinspealman   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  SVN
  (models, ORM)  |   Resolution:  wontfix
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by aaugustin):

 In fact, you're looking a larger problem than just time zone settings.
 (Massive) multi-hosting isn't supported by Django at this time. While it
 sort of works (some third party libraries exist to support this use case),
 our current position is that changing settings at runtime may cause
 undefined behavior.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #17213: Can't change TIME_ZONE after initial transaction in PostgreSQL

2011-11-20 Thread Django
#17213: Can't change TIME_ZONE after initial transaction in PostgreSQL
-+-
 Reporter:  calvinspealman   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  SVN
  (models, ORM)  |   Resolution:  wontfix
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by calvinspealman):

 While I'm very happy to see #2626 moving forward, I don't think it will be
 helpful in the context I've seen #17213 needed, which are installations
 running more sites than can realistically be served with at least one
 process per site, and some sort of middleware is used before each request
 to load per-site settings. I understand the dislike of changing settings,
 and I agree with it. i only filed this ticket, because it seemed that
 #3459 had broken a previous behavior and I could not determine if this was
 intended or desirable. I'm not sure the best course of action for such
 setups in the future, but will give it some thought.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #17213: Can't change TIME_ZONE after initial transaction in PostgreSQL

2011-11-14 Thread Django
#17213: Can't change TIME_ZONE after initial transaction in PostgreSQL
-+-
 Reporter:  calvinspealman   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  SVN
  (models, ORM)  |   Resolution:  wontfix
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by aaugustin):

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


Comment:

 You should never alter settings at runtime, and we won't add code to
 Django to support that.

 Would time zone support resolve your problem? (see last comment on #2626)

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #17213: Can't change TIME_ZONE after initial transaction in PostgreSQL

2011-11-12 Thread Django
#17213: Can't change TIME_ZONE after initial transaction in PostgreSQL
-+-
 Reporter:  calvinspealman   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  SVN
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by calvinspealman):

 * needs_docs:   => 0
 * has_patch:  0 => 1
 * component:  Uncategorized => Database layer (models, ORM)
 * needs_tests:   => 0
 * needs_better_patch:   => 0


Comment:

 I'm sure the way I've added control to set these flags on-demand might
 need changed, but its a proof-of-concept

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #17213: Can't change TIME_ZONE after initial transaction in PostgreSQL

2011-11-12 Thread Django
#17213: Can't change TIME_ZONE after initial transaction in PostgreSQL
+
 Reporter:  calvinspealman  |  Owner:  nobody
 Type:  Bug | Status:  new
Component:  Uncategorized   |Version:  SVN
 Severity:  Normal  |   Keywords:
 Triage Stage:  Unreviewed  |  Has patch:  0
Easy pickings:  0   |  UI/UX:  0
+
 The changeset from #3459 has SET TIME ZONE only executed for new
 connections, which breaks any code which changes settings.TIME_ZONE, such
 as live settings applications or per-request middleware implementations.
 The connection should allow other code to tell it "I'm changing things,
 re-do the settings statements on the next transaction.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.