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 =
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
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:
> > 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
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?
> 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(),
> >
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
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):
8 matches
Mail list logo