Re: Enhance class Storage with additional methods

2013-04-10 Thread Ioan Alexandru Cucu
Hi Andy, I think it would be nice for the Storage class to at least have the most common file system operations. Each implementation would then choose which of them it wants to implement. You could even write your own extension, but at least you would know that what you are coding is based on

Enhance class Storage with additional methods

2013-04-10 Thread Ioan Alexandru Cucu
Hi all, Would it make sense to enhance the django.core.files.storage.Storage class with some additional methods such as copy or move file? I'm currently in a situation where my storage backend is a S3 bucket, and in order to move files I need to download and upload them again at a different lo

Re: select_for_update running on db_for_read

2013-02-26 Thread Ioan Alexandru Cucu
Hi, I've raised https://code.djangoproject.com/ticket/19918 and opened pull request: https://github.com/django/django/pull/852 And s/but/bug/ in my initial post :) Regards, Alex On Wednesday, February 20, 2013 9:58:36 AM UTC+2, Russell Keith-Magee wrote: > > Hi Ioan, > > I'd need to dig into th

Re: select_for_update running on db_for_read

2013-02-19 Thread Ioan Alexandru Cucu
age)' I get the traceback mentioned in my initial message. Regards, Alex On Tuesday, February 19, 2013 9:23:29 PM UTC+2, Shai Berger wrote: > > Hi, > > On Monday 18 February 2013, Ioan Alexandru Cucu wrote: > > > > If I'm running a select_for_update statement

Re: select_for_update running on db_for_read

2013-02-18 Thread Ioan Alexandru Cucu
The correct patch would be: (Set _for_write on the cloned object rather than the original...) --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -664,6 +664,7 @@ class QuerySet(object): # Default to false for nowait nowait = kwargs.pop('nowait', False) ob

select_for_update running on db_for_read

2013-02-18 Thread Ioan Alexandru Cucu
Hi, I wanted to raise a but around this, but I thought it might be a better idea to ask first on the developer's group. If I'm running a select_for_update statement in a multidb environment that uses a read-only slave database, I get the following traceback: Traceback: File "/home/kux/workspac

Django silences exceptions raised by functions called during template rendering

2012-01-27 Thread Ioan Alexandru Cucu
Hi guys, Using django 1.1.1 Example template snippet template snippet: {{ foo.bar }} If 'bar' raises an AttributeError, the exception is silenced and an empty string is displayed. I tried setting DEBUG, TEMPLATE_DEBUG, and DEBUG_PROPAGATE_EXCEPTIONS to True, but nothing changes. Digging through