Re: Transforming django-admin.py to a shell script

2013-03-03 Thread Alon Nisser
Yes! Actually I also bumped into the annoying `ImportError: No module named django.core` problem, so fixing virtualenv would be a blessing. *But.. *I still think this is the wrong path, since python setuptools has a better solution for that with cross platform compatibility etc. Take a look at h

Re: deprecation of AUTH_PROFILE_MODULE

2013-03-03 Thread Jacob Kaplan-Moss
On Fri, Mar 1, 2013 at 12:04 PM, Florian Apolloner wrote: > Doing it outside of Django core if fine, inside core is -0 to -1 from me. I actually strongly disagree: I think Django *should* ship an "authenticate-using-email" system. It's *SUCH* a common desire, and it's actually fairly tricky to ge

Re: Switch to database-level autocommit

2013-03-03 Thread Christophe Pettus
On Mar 2, 2013, at 3:49 PM, Jacob Kaplan-Moss wrote: > I'm with Aymeric: the current behavior is bad enough, and this is a > big enough improvement, and the backwards-incompatibility is minor > enough. Right now, the only real example I've heard (there might be more is): 1. The ORM generates mul

Re: Switch to database-level autocommit

2013-03-03 Thread Aymeric Augustin
On 3 mars 2013, at 17:09, Christophe Pettus wrote: > Right now, the only real example I've heard (there might be more is): > > 1. The ORM generates multiple updating operations for a single API-level > operation. > 2. The developer did nothing to manage their transaction model (no decorator, >

Re: deprecation of AUTH_PROFILE_MODULE

2013-03-03 Thread Florian Apolloner
Hi Jacob, On Sunday, March 3, 2013 5:08:24 PM UTC+1, Jacob Kaplan-Moss wrote: > > I actually strongly disagree: I think Django *should* ship an > "authenticate-using-email" system. > Out of curiosity, since I barely have this need by myself: Is it "authenticate-using-email" or "use-email-as-use

Re: Switch to database-level autocommit

2013-03-03 Thread Christophe Pettus
On Mar 3, 2013, at 10:13 AM, Aymeric Augustin wrote: > In practice, the solution is probably called @xact. Applying it to each > public ORM function should do the trick. Therefore, I'd like to ask your > permission to copy it in Django. Technically speaking, this means relicensing > it from Po

Re: Switch to database-level autocommit

2013-03-03 Thread Aymeric Augustin
On 1 mars 2013, at 13:48, Aymeric Augustin wrote: > Basically, Django intends to provide autocommit by default. Rather than fight > the database adapter that itselfs fights the database, I propose to simply > turn autocommit on, and stop implicitly starting and committing transactions. > Expl

Re: Switch to database-level autocommit

2013-03-03 Thread Shai Berger
Hi, Here's some thoughts on possible problems with Aymeric's plan. I like the look of the suggested transaction API, I'm raising these to help make sure it can be realized. On Sunday 03 March 2013, Aymeric Augustin wrote: > On 1 mars 2013, at 13:48, Aymeric Augustin > wrote: > > I'd like to ad

Re: New additions to django.contrib?

2013-03-03 Thread Per-Olof Åstrand
On Saturday, March 2, 2013 8:00:22 AM UTC+1, Russell Keith-Magee wrote: > > > On Sat, Mar 2, 2013 at 11:38 AM, Per-Olof Åstrand > > > wrote: > >> First, I would like to give all my compliments to the persons that made >> Django what it is. Although my background is in scientific computing sinc

Re: first() and last(), earliest() and latest()

2013-03-03 Thread Stephen Burrows
So if I understand correctly, you want something that returns 0-or-1 objects, without having to do try/except? (Or alternately, try: qs[:1][0] except IndexError.) First of all, I don't understand why first/last are the names you've chosen. This isn't about getting the first object or the last o

Re: Switch to database-level autocommit

2013-03-03 Thread Shai Berger
On Sunday 03 March 2013, Jacob Kaplan-Moss wrote: > Shai: do you have any real-world code that'd have data loss > with this bug? The code in sites I work on usually uses transaction middleware or @commit_on_success, so it would not suffer (nor benefit) from this change. So I tried to look for op

Re: deprecation of AUTH_PROFILE_MODULE

2013-03-03 Thread Daniel Greenfeld
I agree that email-as-username should be a built-in User abstract model (or something) in Django. It's an incredibly common use case and for once I think Django could use some additional functionality. +1 to email as username model in core. Danny On Sunday, March 3, 2013 10:21:55 AM UTC-8, Flo