On Sat, Oct 13, 2012 at 6:21 AM, Adrian Holovaty wrote:
> Hi all,
>
> We've been talking about moving django.contrib.localflavor into
> separate packages, outside of Django proper
> (https://groups.google.com/d/topic/django-developers/OiyEGmXTifs/discussion).
> Today I did the work of creating the
Hi all,
We've been talking about moving django.contrib.localflavor into
separate packages, outside of Django proper
(https://groups.google.com/d/topic/django-developers/OiyEGmXTifs/discussion).
Today I did the work of creating the django-localflavor-* packages and
copying code/tests/docs to them.
Is it safe to assume that the with_col_aliases argument of
SQLCompiler.as_sql is intended to only be True when the query is a
subquery? Those are the only usages I've found in the code.
MSSQL only supports ordering subqueries under a limited number of
circumstances. To fix the SQL in django-mss
On Fri, Oct 12, 2012 at 4:00 AM, Andrew Godwin wrote:
> especially if it's something highly custom internal to a company where you
> don't have the time or team to do that stuff properly.
>
Thank you for highlighting this scenario. Unfortunately, this is usually
the case with my one-man projects
On Fri, Oct 12, 2012 at 6:40 AM, Chris Wilson wrote:
> On Fri, 12 Oct 2012, Marijonas Petrauskas wrote:
>
> There already exists create method that does exactly what you need:obj =
>> SomeModel.objects.create(name=**'foo', age=42)
>>
>
> OK, thanks, that appears to be completely undocumented.
>
On Fri, 12 Oct 2012, Marijonas Petrauskas wrote:
There already exists create method that does exactly what you need:obj =
SomeModel.objects.create(name='foo', age=42)
OK, thanks, that appears to be completely undocumented.
Cheers, Chris.
--
Aptivate | http://www.aptivate.org | Phone: +44 122
On Fri, Oct 12, 2012 at 6:36 AM, Yo-Yo Ma wrote:
> +1
>
> A lot of people are overriding ``save`` and not returning anything, but
> this isn't going to hurt them (ideally, they should already be returning
> the result of ``super(``, but nobody does).
>
>
> On Friday, October 12, 2012 9:25:46 AM U
+1
A lot of people are overriding ``save`` and not returning anything, but
this isn't going to hurt them (ideally, they should already be returning
the result of ``super(``, but nobody does).
On Friday, October 12, 2012 9:25:46 AM UTC-4, Chris Wilson wrote:
>
> Hi all,
>
> If the save() method
Hi all,
On Thu, 11 Oct 2012, Daniel Moisset wrote:
obj, = SomeModel.objects.filter(foo='bar') or [None]
Daniel's solution is elegant, but far from clear or clean.
I'm strongly in favour of a simple, obvious way to do the common thing,
which is to return None if the object doesn't exist, ins
There already exists create method that does exactly what you need:
obj = SomeModel.objects.create(name='foo', age=42)
On Fri, Oct 12, 2012 at 2:33 PM, David Winterbottom <
david.winterbot...@tangentlabs.co.uk> wrote:
> While such a change is initially appealing, it violates the command-query
> s
While such a change is initially appealing, it violates the command-query
separation principle in that a 'command' method such as 'save' should not
return anything.
http://en.wikipedia.org/wiki/Command-query_separation
Hence, it's not a good idea to make this change. It's more important to
have c
Hi all,
If the save() method returned the object itself, then we could chain it
like this:
old_status = Status(last_contact=None).save()
Instead of having to do this:
old_status = Status(last_contact=None)
old_status.save()
It's a trivial one-line change to the Model
On Thu, Oct 11, 2012 at 10:58 PM, Ćukasz Rekucki wrote:
> On 11 October 2012 10:20, Russell Keith-Magee wrote:
>>
>> And don't just say "Why are Django's URL resolvers slow?". Do some
>> profiling, and come back with an analysis of where the time is being
>> spent and/or wasted.
>
> FWIW, here's
> FWIW, here's a link to a cProfile result for the mentioned
> benchmark[1] on Django 1.4.1 and CPython 2.7.3. A quick look shows
> that we're calling get_language() 1.5mln times (read: for every
> pattern), so that's definitely going to slow down things.
>
Happy to see we moved it a bit for
On Thu, Oct 11, 2012 at 2:53 PM, Tom Evans wrote:
> On Wed, Oct 10, 2012 at 7:52 AM, Moonlight wrote:
>> Here is an article comparing various URL dispatchers:
>>
>> http://mindref.blogspot.com/2012/10/python-web-routing-benchmark.html
>>
>> What cause django URL dispatcher that much... slow?
>>
>
I certainly don't want to tread on anyone's toes - the idea will be that,
like in South currently, migrations will be enabled/disabled on a per-app
basis, so if you don't want them they won't muck stuff up. Alternatively,
we could let the other apps override syncdb.
I'm hoping, in fact, that addin
16 matches
Mail list logo