Re: A little refactoring help please

2008-10-02 Thread Brandon Taylor
Thanks guys, I appreciate it. On Oct 2, 3:29 am, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 2 oct, 07:33, Travis Parker <[EMAIL PROTECTED]> wrote: > > > Instead of calling render_to_response on an empty template file you > > could simply return an empty django.http.HttpResponse and

Re: A little refactoring help please

2008-10-02 Thread bruno desthuilliers
On 2 oct, 07:33, Travis Parker <[EMAIL PROTECTED]> wrote: > Instead of calling render_to_response on an empty template file you > could simply return an empty django.http.HttpResponse and avoid the > templating system overhead. > > I would generally send *something* in the response, even if

Re: A little refactoring help please

2008-10-01 Thread Travis Parker
Instead of calling render_to_response on an empty template file you could simply return an empty django.http.HttpResponse and avoid the templating system overhead. I would generally send *something* in the response, even if just {"success": true}, to leave space for specific error reporting

A little refactoring help please

2008-10-01 Thread Brandon Taylor
Hi everyone, I have a view to do some re-ordering of a list via ajax: @staff_member_required def reorder(request): collections = Collection.objects.all() if request.method == 'POST': pk_ids = request.POST['pk_ids'].split(',') length = len(pk_ids) for collection