http://codereview.appspot.com/4627046/diff/1/MoinMoin/apps/frontend/views.py File MoinMoin/apps/frontend/views.py (right): http://codereview.appspot.com/4627046/diff/1/MoinMoin/apps/frontend/views.py#newcode644 MoinMoin/apps/frontend/views.py:644: please note that .get() has a second parameter, use ...
13 years, 5 months ago
(2011-06-18 12:40:01 UTC)
#1
And what should i do regarding this count param, should i wait or implement it ...
13 years, 5 months ago
(2011-06-18 19:36:05 UTC)
#2
And what should i do regarding this count param, should i wait or implement it
as parameter of user object, or save it in some kind of session/cookie or just
pass it in query url ?
http://codereview.appspot.com/4627046/diff/1/MoinMoin/apps/frontend/views.py
File MoinMoin/apps/frontend/views.py (right):
http://codereview.appspot.com/4627046/diff/1/MoinMoin/apps/frontend/views.py#...
MoinMoin/apps/frontend/views.py:644:
On 2011/06/18 12:40:01, ThomasWaldmann wrote:
> please note that .get() has a second parameter, use it correctly.
what changes i should do here, i mean i have used `count` as second param
previously and was retrieving it correctly as request.values.get('count') ?
http://codereview.appspot.com/4627046/diff/1/MoinMoin/apps/frontend/views.py#...
MoinMoin/apps/frontend/views.py:649: toappend = 1
On 2011/06/18 12:40:01, ThomasWaldmann wrote:
> are you abusing integers as booleans?
got this habit from C programming, trying to adjust this in python, thanks for
correcting.
http://codereview.appspot.com/4627046/diff/1/MoinMoin/apps/frontend/views.py#...
MoinMoin/apps/frontend/views.py:663: elif rev_date == prev_date:
On 2011/06/18 12:40:01, ThomasWaldmann wrote:
> the above code would be a bit prettier if you did:
>
> if ... not in ...:
> ... = 0
> ... += ...
>
> There is also a "defaultdict" type that might be nice for this. Or even the
> Counter type from collections? Be careful, must work on py 2.6.
Yes defaultdict is somewhat appropriate, but i need the values in ordering ,
which could only be done by using OrderedDict, neither of both could fit here.
answered http://codereview.appspot.com/4627046/diff/1/MoinMoin/apps/frontend/views.py File MoinMoin/apps/frontend/views.py (right): http://codereview.appspot.com/4627046/diff/1/MoinMoin/apps/frontend/views.py#newcode644 MoinMoin/apps/frontend/views.py:644: On 2011/06/18 19:36:05, sinha wrote: > On 2011/06/18 ...
13 years, 5 months ago
(2011-06-19 06:29:38 UTC)
#3
answered
http://codereview.appspot.com/4627046/diff/1/MoinMoin/apps/frontend/views.py
File MoinMoin/apps/frontend/views.py (right):
http://codereview.appspot.com/4627046/diff/1/MoinMoin/apps/frontend/views.py#...
MoinMoin/apps/frontend/views.py:644:
On 2011/06/18 19:36:05, sinha wrote:
> On 2011/06/18 12:40:01, ThomasWaldmann wrote:
> > please note that .get() has a second parameter, use it correctly.
>
> what changes i should do here, i mean i have used `count` as second param
> previously and was retrieving it correctly as request.values.get('count') ?
No
you can set the default. There are some other places in views.py where you can
see that.
13 years, 5 months ago
(2011-06-20 04:02:06 UTC)
#4
On 2011/06/19 06:29:38, Reimar Bauer wrote:
> answered
>
> http://codereview.appspot.com/4627046/diff/1/MoinMoin/apps/frontend/views.py
> File MoinMoin/apps/frontend/views.py (right):
>
>
http://codereview.appspot.com/4627046/diff/1/MoinMoin/apps/frontend/views.py#...
> MoinMoin/apps/frontend/views.py:644:
> On 2011/06/18 19:36:05, sinha wrote:
> > On 2011/06/18 12:40:01, ThomasWaldmann wrote:
> > > please note that .get() has a second parameter, use it correctly.
> >
> > what changes i should do here, i mean i have used `count` as second param
> > previously and was retrieving it correctly as request.values.get('count') ?
>
> No
>
> you can set the default. There are some other places in views.py where you can
> see that.
I am actually not getting the point here, i mean in modify_item function i am
seeing these lines
==================================
contenttype = request.values.get('contenttype')
template_name = request.values.get('template')
======================================
And i am doing no different than this, i mean how to use it correctly ?
Issue 4627046: paging of history results, currently without the option of setting count per page
Created 13 years, 5 months ago by sinha
Modified 13 years, 5 months ago
Reviewers: ThomasWaldmann, Reimar Bauer
Base URL:
Comments: 9