OK, cool, thanks.
I'll keep in mind the custom SQL solution for the future but for this
project I think I do the editing on the front end ( see below)
I have a strange background where I'm learning django but have never used
SQL outside of django's ORM.
I haven't played around with custom SQL since I don't know it.
Is it just a matter of basically copying the code you listed above and
putting that somewhere in my model?



On Sun, Dec 23, 2012 at 12:14 AM, Dennis Lee Bieber
<wlfr...@ix.netcom.com>wrote:

> > I could also load the whole list into memory while editing and then save
> it
> > to the db once all editing was
> > complete.
>
>         And updating ALL records one at a time is better than updating a
> bunch of "order" fields in one query????
>
>         This proposal is equivalent to just dumping the database table and
> creating it new on every addition of a record. If the data is not being
> used in any join operations you might as well just save it as a CSV file
> and reload that each time.


Yea, sorry I wasn't very clear. I am thinking of doing the editing on the
front end using KnockOutJS which is a ModelView  ViewModel implementation
in javascript. So I would pass the list to KnockOutJS in a mirrored data
structure and edit it there. SO I guess it is like dumping the whole list,
but since I want the user to edit it on the front end the ineficiency is
acceptable. I guess Javascript lends itself better to editing and inserting
to an ordered list than SQL does and the data has to go the front end
anyways.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to