Re: Model inheritance extended.

2012-09-25 Thread Dan Fairs
ore stuff (model partitioning 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 thi

Re: Migrating to 1.4

2012-04-16 Thread Dan Fairs
entication 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.fezconsulting.com -- You rec

Migrating to 1.4

2012-03-14 Thread Dan Fairs
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 the Google Groups "Django developers" grou

Re: TemplateResponse and loader should handle request

2011-11-10 Thread Dan Fairs
t 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 Google Groups &quo

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

2011-08-15 Thread Dan Fairs
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 developers" group.

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 because you

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

2011-04-13 Thread Dan Fairs
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 the Google Groups "Django developers" grou

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

2011-04-02 Thread Dan Fairs
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. To post to this group, send email

Re: Template Compilation

2011-03-28 Thread Dan Fairs
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 -- You received this message because you are subscribed to

Re: Django urls in JavaScript

2011-03-25 Thread Dan Fairs
he 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.fezconsulting.com -- You received this message because you are subscribed to the Google Groups "Django developers&

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

2011-03-11 Thread Dan Fairs
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@googlegroups.com.

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 <dan.fa...@gmail.com> 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

RFC #2705 (Support for SELECT FOR UPDATE)

2010-12-21 Thread Dan Fairs
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 subscribed to the Google Groups "D

Re: DatabaseError swallowed?

2010-12-02 Thread Dan Fairs
d 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 to the Google

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' >&g

DatabaseError swallowed?

2010-12-02 Thread Dan Fairs
thread.start() # We should find the thread threw an exception time.sleep(1) self.end_blocking_transaction() thread.join() self.assertTrue(isinstance(status[-1], self.get_exception())) The interesting part is the code marked with # XXX. As it stands, that line produces a sim

Unexpected behaviour when providing bad input to CheckboxInput

2010-11-28 Thread Dan Fairs
the field in the test.) Should I raise a bug 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 djan

Re: Changing settings per test

2010-11-04 Thread Dan Fairs
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 -- You received this message because you are s

Re: AnonymousUser has_perm/has_module_perms function check authentication backends

2010-01-19 Thread Dan Fairs
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 <dan.fa...@gmail.com> | http://www.fezconsulting.com/ -- You received thi

Re: Problem with object values in Django 1.0

2008-10-31 Thread Dan Fairs
ength=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. Could any

Re: Problem with object values in Django 1.0

2008-10-31 Thread Dan Fairs
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/ --~--~-~--~~~---~--~~ You

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

2008-09-10 Thread Dan Fairs
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, Dan -- Dan Fairs &

Re: I want a pony: Django Cheeseshop

2008-09-10 Thread Dan Fairs
se 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 <[EMAIL PROTECTED]> | http://www.stereoplex.com/ --~--~--