Precedence in RequestContext processors

2011-06-30 Thread Michael Blume
Just tracked a regression in our site to the fact that I'd added a context processor to update the variable 'profile', and it was stomping one of our views that had an explicit context variable 'profile'. First of all, I find it mildly odd that the context processor takes precedence over the

Re: Timezone-aware storage of DateTime

2011-06-28 Thread Michael Blume
This seems like probably the correct solution to me. I'd like to suggest that the time itself still be stored in UTC so that reading the timezone field is (somewhat) optional On Jun 28, 2011 8:01 AM, "Sam Bull" wrote: > I figured that for most cases you wouldn't actually care

Re: Thoughts on solution to forward references in MySQL (#3615)

2011-06-27 Thread Michael Blume
Couple questions: I see a variable saved_objects being written, but I don't see it being accessed -- is this to ease future features, or am I missing a code path? If I'm reading correctly, check_for_invalid_foreign_keys extends over all the rows in a table. loaddata is called by syncdb and

Re: Thoughts on solution to forward references in MySQL (#3615)

2011-06-27 Thread Michael Blume
Just reloaded all our fixtures, and this seems to create no regressions with MySQL Server version: 5.0.51a-3ubuntu5.5 (Ubuntu) Most of our tables are backed by MyISAM, though, so I'm not sure how much this helps. On Mon, Jun 27, 2011 at 4:09 PM, Michael Blume <blume.m...@gmail.com>

Re: Thoughts on solution to forward references in MySQL (#3615)

2011-06-27 Thread Michael Blume
nitpick: I got a few complaints about trailing whitespace when I applied: /home/mike/sqlpatch.diff:36: trailing whitespace. /home/mike/sqlpatch.diff:42: trailing whitespace. /home/mike/sqlpatch.diff:126: trailing whitespace. /home/mike/sqlpatch.diff:148: trailing whitespace.

required=True for BooleanFields

2011-06-16 Thread Michael Blume
In Django BooleanFields, the required flag is used to mean that the field must be checked for the form to validate. Required is True by default for all Fields, so this is the default behavior. I strongly suspect that this violates principle of least surprise for most people including Boolean

ImportError catching in urlresolvers.py

2011-06-14 Thread Michael Blume
In RegexURLPattern._get_callback, we attempt to fetch the callable named by the URL pattern, and catch a possible ImportError if this fails. If so, we raise ViewDoesNotExist. try: self._callback = get_callable(self._callback_str) except ImportError, e:

Re: jQuery.tmpl() and Django

2011-05-27 Thread Michael Blume
Would it be possible to customize the markup Django uses for template compilation, either at the project level, at compile-time, or embedded in the template itself? -Mike On Thu, May 26, 2011 at 11:59 PM, Jonathan Slenders < jonathan.slend...@gmail.com> wrote: > +1 for the verbatim tag. I think

Re: logging view errors

2011-05-10 Thread Michael Blume
A developer can currently do this pretty easily with middleware by setting a process_exception method. We could provide some contrib middleware for logging exceptions, but I don't see any need to bring this into core. -Mike On Tue, May 10, 2011 at 1:26 PM, Shawn Milochik

Re: Tying log messages from a single request together?

2011-04-14 Thread Michael Blume
At loggly, we just have a get_request function called by our logging handlers which digs up through the stack and grabs a request object from the view. It's not too pretty, but it works. -Mike On Thu, Apr 14, 2011 at 5:21 AM, Russell Keith-Magee wrote: > On Thu, Apr 14,