On 6/6/06, Ian Holsman <[EMAIL PROTECTED]> wrote:
> any chance of getting a insert_or_replace function as well?
>
> to do something similar to mysql 5's
>
> INSERT INTO table (a,b,c) VALUES (1,2,3)
> ON DUPLICATE KEY UPDATE c=c+1;
>
> http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.ht
It sounds great.any chance of getting a insert_or_replace function as well?to do something similar to mysql 5's INSERT INTO table (a,b,c) VALUES (1,2,3) ON DUPLICATE KEY UPDATE c=c+1;http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html(which is the other common pattern I'm seeing in my
Time and time again I have the following Django code:
try:
obj = Person.objects.get(first_name='John', last_name='Lennon')
except Person.DoesNotExist:
obj = Person(first_name='John', last_name='Lennon',
birthday=date(1940, 10, 9))
obj.save()
This pattern gets quit
Adrian Holovaty wrote:
> On 6/5/06, gabor <[EMAIL PROTECTED]> wrote:
>> i'm building a https site, and have many times problems with the Site
>> objects, which kind-of assume that the site is http.
>>
>> would it be a good idea for the site objects to also contain the
>> protocol (http or https)?
On 6/5/06, gabor <[EMAIL PROTECTED]> wrote:
> i'm building a https site, and have many times problems with the Site
> objects, which kind-of assume that the site is http.
>
> would it be a good idea for the site objects to also contain the
> protocol (http or https)? what do you think?
I don't th
hi,
i'm building a https site, and have many times problems with the Site
objects, which kind-of assume that the site is http.
would it be a good idea for the site objects to also contain the
protocol (http or https)? what do you think?
p.s: yes, i already mentioned it in my previous post
(
On 6/5/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
> Nice catch. What's the proper plural-only way to handle this with gettext?
I need to dig into that to be honest. I will have to get back on this
one, unless someone beats me to it.
--
Jeroen Ruigrok van der Werven
--~--~-~--~~
On 5/26/06, Jeroen Ruigrok van der Werven <[EMAIL PROTECTED]> wrote:
> Why on earth does it have:
>
> raise validators.ValidationError, ngettext("Ensure your text is less
> than %s character.",
> "Ensure your text is less than %s characters.", self.maxlength) %
> self.maxlength
>
> Given how the
Not at all -- it sounds like the answer is one of the ones I expected,
which was "Write a custom manipulator"
Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group
On 6/5/06, Luke Plant <[EMAIL PROTECTED]> wrote:
> Steven Armstrong wrote:
> > Just found this [1], so sorry for the noise. I searched through the
> > tickets, but forgot to check the mailing list archives.
>
> Don't worry, it's probably a good reminder, since we never actually did
> anything abou
Steven Armstrong wrote:
> Just found this [1], so sorry for the noise. I searched through the
> tickets, but forgot to check the mailing list archives.
Don't worry, it's probably a good reminder, since we never actually did
anything about this as far as I remember.
Luke
--~--~-~--~--
John Sutherland wrote:
> Is there some registration process I'm missing for the
> filters?
Yep. See:
http://www.djangoproject.com/documentation/templates_python/#writing-custom-template-filters
and the bottom of:
http://code.djangoproject.com/browser/django/trunk/django/template/defaultfilter
12 matches
Mail list logo