Re: proposal: get_or_none QuerySet method

2006-12-20 Thread Joseph Perla
Also, here's the pseudo-ish code for it: def update_or_create( --same arguments as get_or_create()-- ): object, created = Class.objects.get_or_create( --args above-- ) if not created: object.__dict__.update(defaults) object.save() return object Well, Class is self o

Re: Oracle: call for testing

2006-12-20 Thread McA
Matt Boersma schrieb: - To run the unit ts, est suite, do "python tests/runtests.py --settings=myproject.settings" from the root of the boulder-oracle-sprint branch. Make sure myproject.settings is a python module in your PYTHONPATH that is configured to connect to an Oracle database. Hi Mat

Re: New firebird backend using the boulder-oracle-sprint branch

2006-12-20 Thread David Elias
Is there anything i can help with? I m don´t have much python knowledge Same with me :) but i m really interested in firebird support in django, so if i can help testing or doing something it will be a pleasure. Well you can use this patch on your projects and report bugs and enhancements.

Re: proposal: get_or_none QuerySet method

2006-12-20 Thread Brantley Harris
On 12/18/06, Gary Wilson <[EMAIL PROTECTED]> wrote: What do you think about adding a get_or_none QuerySet method? +1 On 12/20/06, Joseph Perla <[EMAIL PROTECTED]> wrote: There should also be an update_or_create() function. +1 --~--~-~--~~~---~--~~ You recei

Re: proposal: get_or_none QuerySet method

2006-12-20 Thread Joseph Perla
There should also be an update_or_create() function. I often find myself get_or_creating, then updating the object's dict if it wasnt just created, then saving. This can easily be expressed more clearly in one line with this function. j On 12/20/06, Gary Wilson <[EMAIL PROTECTED]> wrote: Smi

Re: proposal: get_or_none QuerySet method

2006-12-20 Thread Gary Wilson
SmileyChris wrote: On Dec 19, 11:08 am, "Waylan Limberg" <[EMAIL PROTECTED]> wrote: > something like this: > > user = User.objects.get(pk=user_id, default=None) Except this would break (or at least limit the functionality of) objects which use "default" as a field name. Of course, this didn't

Re: django.contrib.formtools: High-level abstractions of common form tasks

2006-12-20 Thread rassilon
One slight modification, there was debugging code left in, which I've now fixed. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@goo

Re: New firebird backend using the boulder-oracle-sprint branch

2006-12-20 Thread Fabio Gomes
Thanx again, it worked perfectly now. Is there anything i can help with? I m don´t have much python knowledge but i m really interested in firebird support in django, so if i can help testing or doing something it will be a pleasure. also, is there any plans to add it in the main django release

Re: New firebird backend using the boulder-oracle-sprint branch

2006-12-20 Thread David Elias
I was able to reproduce this error by enable the admin in the INSTALLED_APPS and in urls.py but not sync'ed to database, make sure you call manage.py syncdb to install also the admin app. Fabio Gomes escreveu: Thanx, it worked now. I was able to create the table, acess the objects, add, update

Re: BigIntegerField for postgres

2006-12-20 Thread Darren Redmond
Ivan, Thanks for the idea. cheers Darren Ivan Sagalaev wrote: Darren Redmond wrote: I could not find any way to make the Integer Field use the int8 type without changing the django db mappings code, I once hacked it with initial SQL that changed column type after creation: ALTER

Re: New firebird backend using the boulder-oracle-sprint branch

2006-12-20 Thread Fabio Gomes
Thanx, it worked now. I was able to create the table, acess the objects, add, update and delete data.. but i get this error when i try to use the django admin: (-204, 'isc_dsql_prepare: \n Dynamic SQL Error\n SQL error code = -204\n Table unknown\n DJANGO_ADMIN_LOG\n At line 1, column 530.') O

Re: Customizable object tools

2006-12-20 Thread Ville Säävuori
Replying to myself This would be great. But I think it would be better to name the templates __foo.html. It would make the customization of admin pages very easy and Django-like. D'oh. After looking the admin source code, this allready works! I wonder howcome it isn't documented? (Or is it?)

Re: BigIntegerField for postgres

2006-12-20 Thread Ivan Sagalaev
Darren Redmond wrote: I could not find any way to make the Integer Field use the int8 type without changing the django db mappings code, I once hacked it with initial SQL that changed column type after creation: ALTER TABLE "table" DROP COLUMN "column"; ALTER TABLE "table" ADD COLUMN

Re: Customizable object tools

2006-12-20 Thread Ville Säävuori
ao wrote: _change_list.html instead of original one. If it somehow did the same like with generic views where it looks for a _detail.html but loads a default detail.html if former does not exist. +1 from me. This would be great. But I think it would be better to name the templates __foo.html

BigIntegerField for postgres

2006-12-20 Thread Darren Redmond
Hi all, I am running django with postgresql on a red hat box, and I was using the IntegerField. This seems to get mapped to the postgresql int4 column type and when my integer got bigger that 2^32 I could no longer update the field. I could not find any way to make the Integer Field use the

Re: Customizable object tools

2006-12-20 Thread ao
I saw your ticket got patched and changed my code to use templates for extended object tools. Works great but still gets a bit messy when i have to create new template file for each model I want to have one extra link and then write code to load that custom _change_list.html instead of original o

Re: Directory of Django Programmers

2006-12-20 Thread Kenneth Gonsalves
On 20-Dec-06, at 3:07 PM, Siliconbits wrote: Anyone knows where I can find this rare species. I've trawled Rent a Coder and Get a Freelancer without success. If anyone is interested in freelancing in London, UK with good rates, let me know. did you try the wiki? -- regards kg http://lawgon

Re: Directory of Django Programmers

2006-12-20 Thread Ian Holsman
http://gypsyjobs.com has a 'developer' section. but you have probably just reached most of the people who can help ;-) regards Ian On 20/12/2006, at 8:37 PM, Siliconbits wrote: Anyone knows where I can find this rare species. I've trawled Rent a Coder and Get a Freelancer without success. If

Directory of Django Programmers

2006-12-20 Thread Siliconbits
Anyone knows where I can find this rare species. I've trawled Rent a Coder and Get a Freelancer without success. If anyone is interested in freelancing in London, UK with good rates, let me know. --~--~-~--~~~---~--~~ You received this message because you are sub

Re: #2473 - 'in' QuerySet operator generates invalid SQL for empty list

2006-12-20 Thread Russell Keith-Magee
On 12/20/06, Gary Wilson <[EMAIL PROTECTED]> wrote: Patch and a few tests added. Can someone please review and test on something other than postgres. http://code.djangoproject.com/ticket/2473 I use postgres myself as well, so I can't help out there. On the face of it, it seems ok, but like