Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(176)

Issue 4686045: major types are replaced by contenttype groups

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 5 months ago by sinha
Modified:
13 years, 5 months ago
Reviewers:
Reimar Bauer
Visibility:
Public.

Description

some questions and screenshot at diary page http://moinmo.in/AkashSinha/Gsoc2011Diary/2011-07-09

Patch Set 1 #

Total comments: 6

Patch Set 2 : major types are replaced by contenttype groups in filtering #

Total comments: 16

Patch Set 3 : change in code for filtering by contenttype, docstring and unittest added for flat_index function #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -15 lines) Patch
M MoinMoin/apps/frontend/views.py View 1 2 2 chunks +18 lines, -11 lines 3 comments Download
M MoinMoin/items/__init__.py View 1 2 2 chunks +23 lines, -3 lines 0 comments Download
M MoinMoin/items/_tests/test_Item.py View 1 2 2 chunks +12 lines, -1 line 0 comments Download
M MoinMoin/templates/global_index.html View 1 2 1 chunk +24 lines, -0 lines 2 comments Download
M MoinMoin/themes/modernized/static/css/common.css View 1 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 12
Reimar Bauer
some comments http://codereview.appspot.com/4686045/diff/1/MoinMoin/apps/frontend/views.py File MoinMoin/apps/frontend/views.py (right): http://codereview.appspot.com/4686045/diff/1/MoinMoin/apps/frontend/views.py#newcode496 MoinMoin/apps/frontend/views.py:496: all_contenttypes = ["application", "audio", "image", "text", "video"] ...
13 years, 5 months ago (2011-07-10 07:33:11 UTC) #1
sinha
13 years, 5 months ago (2011-07-12 07:38:54 UTC) #2
Reimar Bauer
some comments, docstring missing and look at unit tests please http://codereview.appspot.com/4686045/diff/11001/MoinMoin/items/__init__.py File MoinMoin/items/__init__.py (right): http://codereview.appspot.com/4686045/diff/11001/MoinMoin/items/__init__.py#newcode578 ...
13 years, 5 months ago (2011-07-12 07:58:51 UTC) #3
ThomasWaldmann
http://codereview.appspot.com/4686045/diff/11001/MoinMoin/apps/frontend/views.py File MoinMoin/apps/frontend/views.py (right): http://codereview.appspot.com/4686045/diff/11001/MoinMoin/apps/frontend/views.py#newcode497 MoinMoin/apps/frontend/views.py:497: posted_fields = request.values.to_dict() "post"ed? request.values has post form fields ...
13 years, 5 months ago (2011-07-12 08:27:37 UTC) #4
sinha
http://codereview.appspot.com/4686045/diff/11001/MoinMoin/apps/frontend/views.py File MoinMoin/apps/frontend/views.py (right): http://codereview.appspot.com/4686045/diff/11001/MoinMoin/apps/frontend/views.py#newcode497 MoinMoin/apps/frontend/views.py:497: posted_fields = request.values.to_dict() On 2011/07/12 08:27:37, ThomasWaldmann wrote: > ...
13 years, 5 months ago (2011-07-12 09:05:04 UTC) #5
sinha
http://codereview.appspot.com/4686045/diff/11001/MoinMoin/apps/frontend/views.py File MoinMoin/apps/frontend/views.py (right): http://codereview.appspot.com/4686045/diff/11001/MoinMoin/apps/frontend/views.py#newcode508 MoinMoin/apps/frontend/views.py:508: initials = list(set(initials)) On 2011/07/12 08:27:37, ThomasWaldmann wrote: > ...
13 years, 5 months ago (2011-07-12 13:36:53 UTC) #6
sinha
change in code for filtering by contenttype, docstring and unittest added for flat_index function I ...
13 years, 5 months ago (2011-07-12 14:11:47 UTC) #7
ThomasWaldmann
http://codereview.appspot.com/4686045/diff/21001/MoinMoin/templates/global_index.html File MoinMoin/templates/global_index.html (right): http://codereview.appspot.com/4686045/diff/21001/MoinMoin/templates/global_index.html#newcode16 MoinMoin/templates/global_index.html:16: <label for="{{ gname }}">{{ gname|replace("items", "") }}</label> i think ...
13 years, 5 months ago (2011-07-12 14:35:33 UTC) #8
sinha
http://codereview.appspot.com/4686045/diff/21001/MoinMoin/templates/global_index.html File MoinMoin/templates/global_index.html (right): http://codereview.appspot.com/4686045/diff/21001/MoinMoin/templates/global_index.html#newcode16 MoinMoin/templates/global_index.html:16: <label for="{{ gname }}">{{ gname|replace("items", "") }}</label> On 2011/07/12 ...
13 years, 5 months ago (2011-07-12 14:39:11 UTC) #9
Reimar Bauer
small comments http://codereview.appspot.com/4686045/diff/21001/MoinMoin/apps/frontend/views.py File MoinMoin/apps/frontend/views.py (right): http://codereview.appspot.com/4686045/diff/21001/MoinMoin/apps/frontend/views.py#newcode513 MoinMoin/apps/frontend/views.py:513: detailed_index = sorted(detailed_index) look at the key ...
13 years, 5 months ago (2011-07-12 19:00:34 UTC) #10
sinha
replied. http://codereview.appspot.com/4686045/diff/21001/MoinMoin/apps/frontend/views.py File MoinMoin/apps/frontend/views.py (right): http://codereview.appspot.com/4686045/diff/21001/MoinMoin/apps/frontend/views.py#newcode513 MoinMoin/apps/frontend/views.py:513: detailed_index = sorted(detailed_index) On 2011/07/12 19:00:34, Reimar Bauer ...
13 years, 5 months ago (2011-07-12 19:15:38 UTC) #11
Reimar Bauer
13 years, 5 months ago (2011-07-12 20:13:49 UTC) #12
use a different list and get that index

http://codereview.appspot.com/4686045/diff/21001/MoinMoin/apps/frontend/views.py
File MoinMoin/apps/frontend/views.py (right):

http://codereview.appspot.com/4686045/diff/21001/MoinMoin/apps/frontend/views...
MoinMoin/apps/frontend/views.py:513: detailed_index = sorted(detailed_index)
On 2011/07/12 19:15:38, sinha wrote:
> On 2011/07/12 19:00:34, Reimar Bauer wrote:
> > look at the key functions, if you can use it e.g. with str.lower 
> > 
> > see http://wiki.python.org/moin/HowTo/Sorting/
> 
> i tried but here list elements are tuple, so that 
> ]$ sorted(detailed_index, key=str.lower) is throwing errors, 
> i am thinking of using lambda as 
> ]$ sorted(detailed_index, key=lambda item_info: item_info[1])
> 
> but here i may have to add the cmp function also, otherwise it is not helping
> any better.

you can create a different list in lower case and get how that is sorted and
apply that index to your data
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b