some strange paginator behavior

2006-11-17 Thread soundseeker
hello, the following code produces a table with 15 rows as expected. the same code with "hits=paginator.hits" without comment sign results in: Exception Type: TypeError Exception Value:count() takes exactly one argument (0 given) paginate_by = 15 paginator =

Re: Pagination with Custom Views

2006-11-17 Thread soundseeker
holy ... , how stupid. but it led not to the solution, which is: TMergeDoc().by_categories() I had to instantiate the object, of course. Now there are some paginator problems I have to analyze. thank you very much so far! robert --~--~-~--~~~---~--~~ You

Re: Pagination with Custom Views

2006-11-16 Thread soundseeker
hello, I'm desperately searching for a solution as described here (paginator + costom sql): http://groups.google.com/group/django-users/browse_frm/thread/1aa04d3ab8fc9203/ab1384a82c9d5508#ab1384a82c9d5508 and here:

Re: custom sql, method definition and views.py

2006-11-15 Thread soundseeker
> > Hello, > > if there is a method definition in the models.py like this: > > > > class TMergeDoc(models.Model): > > > > def by_categories(self): > > from django.db import connection > > ... > > return objects > > > > what is the corresponding

custom sql, method definition and views.py

2006-11-13 Thread soundseeker
Hello, if there is a method definition in the models.py like this: class TMergeDoc(models.Model): def by_categories(self): from django.db import connection ... return objects what is the corresponding call in the views.py?

Re: Custom SQL/Paginator problems

2006-11-08 Thread soundseeker
> Hello soundseeker! > On Mon, 06 Nov 2006 02:20:25 -0800 you wrote: > > > def show_categories(request, col, direction): > > paginate_by = 15 > > paginator = > > ObjectPaginator(VMergeDocsInfo.objects.all().by_categories(), > >

Custom SQL/Paginator problems

2006-11-06 Thread soundseeker
Hello, here's a django/python newbie problem, which I could not resolve after spending some time with reading and testing. Assuming a method in my models.py class VMergeDocsInfo(models.Model): .. def by_categories(self): from django.db import connection

custom sql/paginator problems

2006-11-04 Thread soundseeker
hi, some newbie questions here... after spending much time with reading/testing I still have no solution; some help is needed and appreciated. here's the problem: having a class definition with a custom sql statement: class VMergeDocsInfo(models.Model): def by_categories(self):