Re: AnonymousUser has_perm/has_module_perms function check authentication backends

2010-01-19 Thread Dan Fairs
s has worked extremely well in the Zope/Plone world; changing a public website to one that requires authentication is simply a case of removing the standard 'View' permission from anonymous users. Cheers, Dan -- Dan Fairs | http://www.fezconsulting.com/ -- You received this message

Possible regression with serializers in 1.4

2012-03-12 Thread Dan Fairs
ld I raise a ticket for this one? Cheers, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To u

Migrating to 1.4

2012-03-14 Thread Dan Fairs
okie-based sessions, and our build-time patch for select_for_update(). Next up is checking that there aren't any significant performance regressions. Thanks, everyone! Cheers, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com -- You received this message because you are subscribed to t

Re: Migrating to 1.4

2012-04-16 Thread Dan Fairs
app uses an external authentication service for most of its users, so this won't affect us in production - but for those running sites with high signup rates, this could be a surprise. Is that worth a mention in the release notes? Cheers, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezcons

Re: Model inheritance extended.

2012-09-25 Thread Dan Fairs
rtitioning for large data volumes, handling the case of deriving from generated base classes, shared models between 'blueprints'), but the core of yours looks pretty neat. Cheers, Dan -- Dan Fairs | dan.fa...@gmail.com | @danfairs | www.fezconsulting.com -- You received this message

Re: Changing settings per test

2010-11-04 Thread Dan Fairs
;s Mock library to patch a setting for the duration of a test case. Chris Withers' testfixtures library also has some sugar to provide a context manager approach, though I haven't used that in a little while. Cheers, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com --

Unexpected behaviour when providing bad input to CheckboxInput

2010-11-28 Thread Dan Fairs
at validation pass, and then for the underlying model to not be saved when the formset save() is called. (For the curious - we discovered this while writing tests for a Piston API that uses formsets to validate data, and accidentally passed a '0' instead of omitting the field i

DatabaseError swallowed?

2010-12-02 Thread Dan Fairs
= [] thread = threading.Thread( target=self.run_select_for_update, args=(status,), kwargs={'nowait': True}, ) thread.start() # We should find the thread threw an exception time.sleep(1) self.end_blocking_transact

Re: DatabaseError swallowed?

2010-12-02 Thread Dan Fairs
Hi, > On 12/02/2010 03:43 PM, Dan Fairs wrote: >> My gut feeling is that this boils down to this vastly simplified >> demonstration of how list() works: >> >>>>> class Foo(object): >> ... def __len__(self): >> ... print 'len called&#x

Re: DatabaseError swallowed?

2010-12-02 Thread Dan Fairs
fixed almost 2 years ago. > Cool - the Python I'm using is a Mac OS X Snow Leopard system Python. I'll rebuild my dev environment with a newer Python. Cheers, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com -- You received this message because you are subscribed

RFC #2705 (Support for SELECT FOR UPDATE)

2010-12-21 Thread Dan Fairs
ncidentally, brunobraga is the owner of this ticket currently - should I claim it?) Malcolm's main gripe was the API. If anyone has any better ideas - I'm all ears! Thanks, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com -- You received this message because you are

Re: RFC #2705 (Support for SELECT FOR UPDATE)

2010-12-22 Thread Dan Fairs
> > On Tue, Dec 21, 2010 at 10:31 AM, Dan Fairs wrote: >> I've mainly worked on the tests and docs, not the core content of the patch, >> but I'd welcome any comments on the implementation as well - I'd like to see >> this get in (be it in a 1.3 or 1.4

Re: Proposal: Add current_app to request and pass it to template loaders.

2011-03-11 Thread Dan Fairs
available as an attribute of the base view class. Cheers, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@go

Re: Django urls in JavaScript

2011-03-25 Thread Dan Fairs
cessed, look at django.core.handlers.base:94-98). Having a template tag would probably be fine, as the URLConf is set by render time, but don't expect to be able to do a one-off analysis of the URLConf at application startup. Cheers, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulti

Re: Template Compilation

2011-03-28 Thread Dan Fairs
There are other possible implementations, of course; but it turned out that being able to determine the base template dynamically solved our problem pretty elegantly. Put a feature in, and someone, somewhere will be using it :) Cheers, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com

Re: RFC #2705 (Support for SELECT FOR UPDATE)

2011-04-02 Thread Dan Fairs
I'd welcome review and feedback on improving the patch; I'd welcome seeing it merged even more. :) Cheers, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com -- You received this message because you are subscribed to the Google Groups "Django developers" group

Re: RFC #2705 (Support for SELECT FOR UPDATE)

2011-04-13 Thread Dan Fairs
Jacob said he thought this was RFC - it'd be great to see that happen. As ever, let me know on the ticket if there's anything else that needs to be done. Thanks, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com -- You received this message because you are subscribed to t

Re: RFC #2705 (Support for SELECT FOR UPDATE)

2011-04-15 Thread Dan Fairs
in #15580. Thanks for that, Ian. It sounds like those Oracle failures aren't related to this patch, then. Is there anything else that needs to be done before 2705 can be merged? Cheers, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com -- You received this message becaus

Re: Speed up models.Model.__init__: deprecate pre_init and post_init signals?

2011-08-15 Thread Dan Fairs
d in kwargs. There may be another way of doing what we're doing without post_init, but I'd need to look into it. Cheers Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com -- You received this message because you are subscribed to the Google Groups "Django develope

Re: TemplateResponse and loader should handle request

2011-11-10 Thread Dan Fairs
st out of the context (use the 'request' context processor) - then use whatever mechanism you used before to pick a template based on the request. Cheers, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com -- You received this message because you are subscribed to the Goo

Re: I want a pony: Django Cheeseshop

2008-09-10 Thread Dan Fairs
namespace package front, I'd be wary; I started trying to use them, but a client of mine on Windows has experienced problems using them in Django (in places where some __import__ magic is done). I'll raise a ticket when I get down to a minimal example. Cheers, Dan -- Dan Fairs <

Re: Proposal: user-friendly API for multi-database support

2008-09-10 Thread Dan Fairs
import MyModel class MyModelConnection(connection.ModelConnection): def __call__(self): ... return a database connection ... connection.register(MyModel, MyModelConnection) I guess there's no reason even for MyModelConnection to be a class; a callable would do. Just a thought. Cheers

Re: Problem with object values in Django 1.0

2008-10-31 Thread Dan Fairs
is wrong. The 'def __unicode__' line needs to be intended to the same level as question and pub_date, else it won't be considered part of the Poll class. Cheers, Dan -- Dan Fairs <[EMAIL PROTECTED]> | http://www.fezconsulting.com/ --~--~-~--~~~

Re: Problem with object values in Django 1.0

2008-10-31 Thread Dan Fairs
ield(max_length=200) >votes = models.IntegerField() > > def __unicode__(self): >return self.choice > > When I do >>>> from mysite.polls.models import Poll, Choice >>>> Poll.object.all() > > I get "poll.object" instead of a name.