Re: When would you use Context instead of RequestContext?

2009-10-16 Thread wiswaud
On Oct 15, 9:17 am, Russell Keith-Magee wrote: > On Thu, Oct 15, 2009 at 9:01 PM, wiswaud wrote: > It's strange you should raise that issue, because as of about 24 hours > ago, it isn't the case any more. Luke Plant checked in some changes to > trunk that make the re

Re: When would you use Context instead of RequestContext?

2009-10-15 Thread wiswaud
If i'm not mistaken, RequestContext, through context_processors.auth, will call request.user.get_and_delete_messages() and put in the messages to the user in the context. That's fine and dandy, except that in most modern applications, you have client-side code that will be calling server-side part

Re: Announcing Deco: static content for Django

2008-05-13 Thread wiswaud
One thing you might consider, which i've added to my version of flatpages, is language-support: the ability to specify that a given page is for fr_ca. My flatpages mod, when serving a given url, will first look for the most specific language version of the page, then go more and more generalized.

Re: Making user emails unique

2008-04-07 Thread wiswaud
On Apr 6, 9:04 pm, Julien <[EMAIL PROTECTED]> wrote: > In fact, I'd prefer to leave what comes with Django, including contrib > apps, untouched. So that I can benefit from bug fixing and > implementation of new features done by the community. > > How about hijacking the User EmailField definitio

Re: Model.validate() bug???

2007-11-28 Thread wiswaud
On Nov 28, 5:33 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: (snip) > There's a bit more work required than just implementing those few > missing methods. Just leave it for a little while longer. Jacob is > working on it and knows what remains to be done and has the bulk of the > work alre

Re: Model.validate() bug???

2007-11-28 Thread wiswaud
Hi! On Nov 28, 3:22 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 11/28/07, wiswaud <[EMAIL PROTECTED]> wrote: > > > So i just create a new object, like f=Foo(), and fill in the fields > > based on which ones were present in the input data. &

Model.validate() bug???

2007-11-28 Thread wiswaud
Hi! So i'm trying to validate the creation of a new object from input data, but not going through forms, as this is a json webservice. For various reasons, by the time the "constructor" code is reached, the data is already deserialized, and to use django forms (and hence its validation mecanism),

Re: Random Data

2006-12-07 Thread wiswaud
[EMAIL PROTECTED] wrote: > You can use python. Try: > > # Make a random phone number > def mkphone(): > import random > phone = "" > for i in range(10): > if (i == 3): > phone += "-" > if (i == 6): > phone += "-" > phone += str(random.r