Re: Special SELECT and UPDATE for a field

2013-01-31 Thread Yarden Sachs
In the end, what i did is, i added a conversion type to MySQLDB for my Corrdinates object to convert it to a non literal string. and for the selecting part, i had to copy and alter db/sql/compiler's get_columns and get_default_columns to wrap my field selection with the AsText function. a very

Re: Special SELECT and UPDATE for a field

2013-01-31 Thread Yarden Sachs
You can see in my paste that i already created a custom field for geometry field. On Thu, Jan 31, 2013 at 7:52 PM, Tom Evans wrote: > On Wed, Jan 30, 2013 at 8:14 PM, Yarden Sachs wrote: > > Hello, > > i want to create a field class for geometry

Re: Special SELECT and UPDATE for a field

2013-01-31 Thread Tom Evans
On Wed, Jan 30, 2013 at 8:14 PM, Yarden Sachs wrote: > Hello, > i want to create a field class for geometry (not using geodjango). > here's the field code: http://pastebin.com/yADpZykJ > > i want 2 things i can't seem to do: > 1. I want the select to wrap the column with MySql

Re: Special SELECT and UPDATE for a field

2013-01-31 Thread Yarden Sachs
Its a hack. but it solves the save problem: class CoordinatesQuerySetManager(models.Manager): def __getattr__(self, name): return getattr(self.get_query_set(), name) def get_query_set(self): q = self.model.QuerySet(self.model) connection =

Special SELECT and UPDATE for a field

2013-01-30 Thread Yarden Sachs
Hello, i want to create a field class for geometry (not using geodjango). here's the field code: http://pastebin.com/yADpZykJ i want 2 things i can't seem to do: 1. I want the select to wrap the column with MySql AsText() Function e.x. SELECT AsText(location) FROM addresses 2. I want to be able

"select for update" with models

2010-05-18 Thread Greg Pelly
Hi, I'm new to Django -- looking to write a credit card transaction module and I need the ability to perform a "SELECT FOR UPDATE" (mysql) so that an order does not get processed by two different threads. I see an open ticket for this here: http://code.djangoproject.com/ticket/2705

Re: Two related select boxes, update the second depending on the first

2008-11-12 Thread Matias Surdi
This is exactly what I'm trying to do. Thanks for your help. Low Kian Seong escribió: > Have a go with this: > > > http://gtitsworth.blogspot.com/2007/07/chaining-selects-with-django-and-ajax.html > > On Wed, Nov 12, 2008 at 3:54 AM, Matias Surdi <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I

Re: Two related select boxes, update the second depending on the first

2008-11-11 Thread Low Kian Seong
Have a go with this: http://gtitsworth.blogspot.com/2007/07/chaining-selects-with-django-and-ajax.html On Wed, Nov 12, 2008 at 3:54 AM, Matias Surdi <[EMAIL PROTECTED]> wrote: > > Hi, > > I want to have on the admin interface a dropdown box and let the user > choose one of several

Two related select boxes, update the second depending on the first

2008-11-11 Thread Matias Surdi
Hi, I want to have on the admin interface a dropdown box and let the user choose one of several options.Then, depending on this selection, update (maybe through ajax) the values available on the second one. Could anyone give me some guidelines or documentation about how is the best way to

Re: select for update

2008-11-08 Thread tegbert
Thanks, I'll check it out. --Tim On Nov 7, 8:37 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Fri, Nov 7, 2008 at 9:45 PM, tegbert <[EMAIL PROTECTED]> wrote: > > > SELECT FOR UPDATE has been discussed in this group before, but I don't > > th

Re: select for update

2008-11-07 Thread Karen Tracey
On Fri, Nov 7, 2008 at 9:45 PM, tegbert <[EMAIL PROTECTED]> wrote: > > SELECT FOR UPDATE has been discussed in this group before, but I don't > think it's been resolved whether it should be implemented in Django. I > think it should. > > [snip] > ... Any thoughts on ho

select for update

2008-11-07 Thread tegbert
SELECT FOR UPDATE has been discussed in this group before, but I don't think it's been resolved whether it should be implemented in Django. I think it should. The idea is to avoid update collisions, i.e., the situation in which one process is attempting to select a row and update it, and while

select and update

2008-01-18 Thread Oğuz Yarımtepe
Hi, I need to use a select box in my Django application. But i want it to be filled dynamically when it is clicked so that the user will select some specified values that are taken from the database. Instead of that select box i may use a new page that will be opened when a button or check box