On 10 loka, 00:49, Michael Hudson-Doyle wrote:
> > OK, it seems .get_or_none() method is out. I can see the point of that
> > decision, there are a lot of similar methods that could be added using
> > the convenience argument (like .first() in conjunction
> > with .latest()).
>
> > But, how about
On 10 October 2012 10:29, Anssi Kääriäinen wrote:
> On 9 loka, 20:15, ptone wrote:
>> Unsurprisingly - this has come up before:
>>
>> Earlier
>> discussionhttps://groups.google.com/forum/?fromgroups=#!topic/django-developers...
>>
>> tickets:https://code.djangoproject.com/ticket/17546https://cod
Oops sorry Dana! Thanks Jacob, that's good to hear!
Op dinsdag 9 oktober 2012 23:26:42 UTC+2 schreef Dana Woodman het volgende:
>
> Glad you like the design, but I'm a he. :)
>
> On Tuesday, October 9, 2012 11:58:58 AM UTC-7, Wim Feijen wrote:
>>
>> Hi Jacob,
>>
>> I was wondering whether there w
On 9 loka, 20:15, ptone wrote:
> Unsurprisingly - this has come up before:
>
> Earlier
> discussionhttps://groups.google.com/forum/?fromgroups=#!topic/django-developers...
>
> tickets:https://code.djangoproject.com/ticket/17546https://code.djangoproject.com/ticket/2659https://code.djangoproject.c
Glad you like the design, but I'm a he. :)
On Tuesday, October 9, 2012 11:58:58 AM UTC-7, Wim Feijen wrote:
>
> Hi Jacob,
>
> I was wondering whether there were any entries and whether a decision has
> been taken to appoint a benevolent redesigner?
>
> Personally I really liked Dana's propos
+1 on a method that returns non upon not finding. We don't need to do:
try:
val = some_dict.get('key')
except KeyError:
val = None
either. A nget or get_or_none would save me a lot of boilerplate code in my
views as well.
Tino
On Tue, Oct 9, 2012 at 8:48 PM, Wim Feijen wrote:
> For me,
Hi Win --
Yes, we selected one of the bids, and we're working with that team to
get a new site out. Stay tuned!
Jacob
On Tue, Oct 9, 2012 at 1:58 PM, Wim Feijen wrote:
> Hi Jacob,
>
> I was wondering whether there were any entries and whether a decision has
> been taken to appoint a benevolent
Hi Jacob,
I was wondering whether there were any entries and whether a decision has
been taken to appoint a benevolent redesigner?
Personally I really liked Dana's proposal, marketing-wise, and considering
she raised the question, I would certainly support her.
My apologies if I missed a co
For me, get_or_none would prevent a lot of boilerplate code in my views, so
I am in favor of adding the method.
Wim
Op dinsdag 9 oktober 2012 19:15:55 UTC+2 schreef ptone het volgende:
>
> Unsurprisingly - this has come up before:
>
> Earlier discussion
>
> https://groups.google.com/forum/?fromg
Unsurprisingly - this has come up before:
Earlier discussion
https://groups.google.com/forum/?fromgroups=#!topic/django-developers/Saa5nbzqQ2Q
tickets:
https://code.djangoproject.com/ticket/17546
https://code.djangoproject.com/ticket/2659
https://code.djangoproject.com/ticket/11352
All the ticke
So basically you want:
https://docs.djangoproject.com/en/dev/ref/models/querysets/#get-or-create
but without the create part - just an empty(), unsaved, object?
This existing method is so close to what you want - that I'd be inclined to
explore whether it could be modified to do more.
In forms
I also propose these two little helpers, one is ``refresh()`` and other is
``update()``
https://gist.github.com/3859962
``update()`` updates instance without calling ``save()`` and calling
signals and returns updated instance (sometimes you want to update instance
without involving save signals
On Tue, Oct 9, 2012 at 7:29 AM, Anssi Kääriäinen wrote:
> On 9 loka, 17:05, Ole Laursen wrote:
> > Hi!
> >
> > What do people think of
> >
> > A.objects.getdefault(slug="hello") # returns None if slug doesn't
> exist
> > A.objects.getdefault(slug="hello", default=A()) # returns empty object
On 9 loka, 17:05, Ole Laursen wrote:
> Hi!
>
> What do people think of
>
> A.objects.getdefault(slug="hello") # returns None if slug doesn't exist
> A.objects.getdefault(slug="hello", default=A()) # returns empty object
> if slug doesn't exist
>
> I find that in practice, most of the time it
Hi!
What do people think of
A.objects.getdefault(slug="hello") # returns None if slug doesn't exist
A.objects.getdefault(slug="hello", default=A()) # returns empty object
if slug doesn't exist
I find that in practice, most of the time it would be better to get None
back instead of the Do
If matters, +1.
People can easily change from $('input[type=text]') to
$('input[type=text],input[type=email]'), it's a easy, no pain change, with
various benefits of HTML5 fields.
I would only suggest that people can do something like
number_field=IntegerField(html5=False) in form (at least in 1.
Hi Stephen,
On Tuesday, October 9, 2012 7:28:43 AM UTC+2, Stephen Burrows wrote:
>
> I'm a little confused by the track the discussion took recently... my
> impression was that the solution would *not* be to change from
> last_modified to a checksum, or to add an additional checksum method.
> I
Hi Jeremy,
On Tuesday, October 9, 2012 5:15:04 AM UTC+2, jdunck wrote:
>
> Would it be reasonable to have a backend-specific hook to determine a
> fingerprint, where that could be mtime or md5 or whathaveyou as long as
> equality (or maybe ordering) works?
>
Given our discussion in IRC yesterda
фейсик после ipo сильно потерял в цене акций - им нужна комерциализация
конче ;)
хорошее слово "конче"
нам тоже нужно ентое "конче"
On Tue 09 Oct 2012 07:28:01 EEST, django-developers@googlegroups.com
wrote:
Today's Topic Summary
Group: http://groups.google.com/group/django-developers/topic
19 matches
Mail list logo