1 2014-06-26T00:28:08 *** magu_cic
2 2014-06-26T00:51:03 *** randomax
3 2014-06-26T01:19:31 *** penguinRaider
4 2014-06-26T04:20:50 *** derdon
5 2014-06-26T04:32:54 *** sl33k_
6 2014-06-26T04:45:03 *** sl33k_
7 2014-06-26T04:49:45 *** sl33k_
8 2014-06-26T05:03:57 *** sl33k_
9 2014-06-26T05:16:01 *** derdon
10 2014-06-26T05:34:42 *** magu_cic
11 2014-06-26T06:04:30 *** randomax
12 2014-06-26T06:18:59 *** skathpalia
13 2014-06-26T06:20:25 <skathpalia> dimazest, for the removal of unnecessary variable 'ret' in my cr I need to use {% do %} statement of jinja2
14 2014-06-26T06:21:05 <skathpalia> For that I need to add extension as specified here http://librelist.com/browser/flask/2011/3/25/jinja-and-expression-statements/
15 2014-06-26T06:21:14 <dimazest> better move this code out of the template to the python file
16 2014-06-26T06:21:33 <dimazest> but it seems that there should be a simpler solution
17 2014-06-26T06:21:42 <dimazest> without list manipulation
18 2014-06-26T06:22:58 <skathpalia> I think this one is also a simple solution as we are just doing simple list manipulation
19 2014-06-26T06:23:51 <dimazest> but it's unnecessary, imho
20 2014-06-26T06:24:00 <dimazest> what do you want to achieve with that code?
21 2014-06-26T06:24:40 <skathpalia> Just I want to perform list append and list remove operation
22 2014-06-26T06:24:58 <skathpalia> without displaying the return value
23 2014-06-26T06:24:59 <dimazest> what for?
24 2014-06-26T06:25:14 <dimazest> what do you do it for?
25 2014-06-26T06:26:23 <skathpalia> suppose the user selects tag1 which was earlier deselected then the selected_tag list should have one more element tag1 so here we use append
26 2014-06-26T06:27:02 <dimazest> well, but what is the goal?
27 2014-06-26T06:27:09 <dimazest> to apply different styling for tags?
28 2014-06-26T06:27:11 <skathpalia> and then if he deselects tag1 then the selected_tag list should have one less element with tag1 removed so here we need to use remove
29 2014-06-26T06:27:40 <skathpalia> I am just trying to do something similar to that of github
30 2014-06-26T06:27:56 <skathpalia> You can see issue tracker of github
31 2014-06-26T06:27:56 <dimazest> it seems that the line 92 is the most important
32 2014-06-26T06:28:57 <skathpalia> here is a github issue tracker https://github.com/bepasty/bepasty-server/issues
33 2014-06-26T06:29:17 <skathpalia> Here in the left there is filter by tags option
34 2014-06-26T06:29:26 <skathpalia> I am trying to have something like that
35 2014-06-26T06:30:12 <skathpalia> Yeah in line 92 we have buttons for tags selection and deselection
36 2014-06-26T06:31:09 <dimazest> there you chek whether tag is in selected_tags
37 2014-06-26T06:31:22 <skathpalia> Yeah
38 2014-06-26T06:31:23 <dimazest> but before, you remove, or append the tag
39 2014-06-26T06:32:15 <dimazest> that's so confusing
40 2014-06-26T06:32:26 <dimazest> why selected_tag is a *list*?
41 2014-06-26T06:32:37 <dimazest> e.g. line 87
42 2014-06-26T06:32:55 <skathpalia> because user can select multiple tags
43 2014-06-26T06:33:09 <dimazest> why is then called as a singular
44 2014-06-26T06:33:17 <dimazest> it suggests that it refers to one tag
45 2014-06-26T06:33:23 <dimazest> to several of them
46 2014-06-26T06:33:47 <skathpalia> Ok I will change the name
47 2014-06-26T06:35:06 <skathpalia> dimazest, how can I add extension to jinja2 environment?
48 2014-06-26T06:35:16 <skathpalia> in order to use do statement
49 2014-06-26T06:35:27 <dimazest> i don't think it's needed
50 2014-06-26T06:35:42 <dimazest> in line 89
51 2014-06-26T06:36:21 <dimazest> you want to set selected_tag (despite a confusing name) to the list of selected tags with the current tag (if it's not there) or wihtout it if it's there
52 2014-06-26T06:37:27 <skathpalia> yeah
53 2014-06-26T06:38:17 <dimazest> see my latest comment
54 2014-06-26T06:41:35 <skathpalia> dimazest, we can use difference and union in case of sets not in lists
55 2014-06-26T06:41:50 <skathpalia> this shows error
56 2014-06-26T06:42:17 <dimazest> then make them lists
57 2014-06-26T06:42:21 <dimazest> sorry, sets
58 2014-06-26T06:42:50 <skathpalia> I think we cannot define set in jinja2
59 2014-06-26T06:43:05 <skathpalia> as jinja2 has {% set %} tag also
60 2014-06-26T06:43:33 <skathpalia> I tried {% set selected_tags = set(selected_tags) %} but this shows error
61 2014-06-26T06:47:40 <dimazest> pass selected_tags as a set in views.py
62 2014-06-26T06:50:26 <skathpalia> yeah that is working
63 2014-06-26T06:50:39 <skathpalia> I will update the cr in 5 minutes
64 2014-06-26T06:53:12 <skathpalia> dimazest,updated the cr
65 2014-06-26T06:53:19 <dimazest> cool
66 2014-06-26T06:54:02 <skathpalia> Can I commit it?
67 2014-06-26T06:56:41 <skathpalia> dimazest, ^^
68 2014-06-26T06:56:52 <dimazest> not yet
69 2014-06-26T06:56:59 <dimazest> there are some things to be changed
70 2014-06-26T07:02:32 <skathpalia> Can you please point to those things?
71 2014-06-26T07:02:45 <dimazest> i've just submitted a review
72 2014-06-26T07:07:37 <skathpalia> dimazest, we need to pass a list only otherwise it doesn't work
73 2014-06-26T07:08:17 <skathpalia> If I don't pass a list and select tag1 then url becomes http://127.0.0.1:8080/+tickets?selected_tags=set%28%5Bu%27tag1%27%5D%29
74 2014-06-26T07:08:53 <skathpalia> and if we pass a list the url is http://127.0.0.1:8080/+tickets?selected_tags=tag1
75 2014-06-26T07:09:27 <dimazest> selected_tags=list(selected_tags.difference([tag])) if tag in selected_tags else selected_tags.union([tag]))
76 2014-06-26T07:10:07 <dimazest> or, you can create a variable, so this goes to a separate line
77 2014-06-26T07:10:20 <dimazest> then #81 will be shorter
78 2014-06-26T07:10:40 <skathpalia> Ok I am creating a new variable
79 2014-06-26T07:10:44 *** sl33k_
80 2014-06-26T07:10:45 <dimazest> you can also write a comment why this union, difference opearation is needed
81 2014-06-26T07:14:17 <skathpalia> dimazest, updated th cr
82 2014-06-26T07:15:12 *** sl33k_
83 2014-06-26T07:20:39 <skathpalia> dimazest, just removed a typo in the comment
84 2014-06-26T07:30:07 <dimazest> well, the comment doesn't explain why you do this
85 2014-06-26T07:30:31 <dimazest> you just translate from Python to English
86 2014-06-26T07:33:27 <dimazest> see more comments
87 2014-06-26T07:37:14 *** sl33k_
88 2014-06-26T07:43:22 <skathpalia> dimazest, updated the cr
89 2014-06-26T07:43:42 <skathpalia> changed the comment and added empty line in views.py
90 2014-06-26T07:46:12 <dimazest> the last thing
91 2014-06-26T07:46:15 <dimazest> then it's ready
92 2014-06-26T07:46:54 <dimazest> btw, does ThomasWaldmann check the changes before they are merged into default?
93 2014-06-26T07:47:42 <skathpalia> yeah
94 2014-06-26T07:48:32 <skathpalia> dimazest, I think that line should be added in 2225 as selected_tags is used in 2226
95 2014-06-26T07:49:16 <dimazest> right
96 2014-06-26T07:50:49 <skathpalia> dimazest, done updated the cr also
97 2014-06-26T07:51:37 <skathpalia> dimazest, Can I commit it now?
98 2014-06-26T07:51:56 <dimazest> yes, it looks good now
99 2014-06-26T07:52:20 <skathpalia> Ok committing changes to my repo
100 2014-06-26T08:17:49 *** skathpalia
101 2014-06-26T08:26:33 *** randomax
102 2014-06-26T08:47:12 *** sl33k_
103 2014-06-26T08:48:08 *** randomax
104 2014-06-26T09:13:25 *** sl33k_
105 2014-06-26T09:15:05 *** greg_f
106 2014-06-26T09:59:22 *** sl33k_
107 2014-06-26T10:01:57 *** sl33k_
108 2014-06-26T10:30:12 *** sl33k_
109 2014-06-26T10:33:00 *** sl33k_
110 2014-06-26T11:07:17 *** sl33k_
111 2014-06-26T11:32:49 *** sl33k_
112 2014-06-26T11:39:24 *** sl33k_
113 2014-06-26T11:50:49 <randomax> ThomasWaldmann, updated the cr https://codereview.appspot.com/108020043/
114 2014-06-26T13:04:30 *** derdon
115 2014-06-26T13:14:02 *** dave_largo
116 2014-06-26T13:31:21 *** derdon
117 2014-06-26T13:31:38 *** derdon
118 2014-06-26T13:58:54 *** skathpalia
119 2014-06-26T13:59:02 <skathpalia> ThomasWaldmann, updated th cr https://codereview.appspot.com/107060043/
120 2014-06-26T13:59:14 <skathpalia> Now used for loops in ticket.styl
121 2014-06-26T14:53:16 *** RogerHaase
122 2014-06-26T15:03:03 *** skathpalia
123 2014-06-26T15:22:32 <randomax> RogerHaase, Hi
124 2014-06-26T15:22:37 <randomax> updated the cr updated the cr https://codereview.appspot.com/108020043/
125 2014-06-26T15:22:53 <randomax> oops double copy :)
126 2014-06-26T15:33:25 *** magu_cic_
127 2014-06-26T15:35:35 <RogerHaase> randomax: I saw and just published some comments. Works well per my testing :)
128 2014-06-26T15:36:43 *** magu_cic
129 2014-06-26T15:48:14 *** sl33k_
130 2014-06-26T15:53:35 <randomax> RogerHaase, added replies
131 2014-06-26T16:18:27 <RogerHaase> randomax: see cr, add comments to basic.less and commit
132 2014-06-26T16:18:59 <randomax> RogerHaase, ok :)
133 2014-06-26T16:34:19 *** skathpalia
134 2014-06-26T16:37:21 <randomax> RogerHaase, cr needed https://codereview.appspot.com/110210043/
135 2014-06-26T16:37:30 <randomax> made some changes in the metadata UI
136 2014-06-26T16:38:29 <randomax> currently only made changes to the basic theme
137 2014-06-26T17:04:54 *** magu_cic
138 2014-06-26T17:08:03 *** magu_cic_
139 2014-06-26T17:12:02 *** penguinRaider__
140 2014-06-26T17:20:47 <RogerHaase> randomax: the old format has several fields (adtion, address, comment...) that are missing from the new format
141 2014-06-26T17:24:31 <randomax> ok i will try to add those..
142 2014-06-26T17:42:58 *** skathpalia
143 2014-06-26T17:58:29 *** magu_cic
144 2014-06-26T18:19:00 *** sl33k_
145 2014-06-26T18:23:36 *** greg_f
146 2014-06-26T18:26:07 <randomax> RogerHaase, i would need to remove action, address, comment, dataid, name_old, revid, sha1, size from kill keys
147 2014-06-26T18:26:14 <randomax> https://bitbucket.org/ajgupta93/moin-2.0/src/9645576dd44d90f608cca417288a9f4d5fc63470/MoinMoin/items/__init__.py?at=default#cl-384
148 2014-06-26T18:26:49 <randomax> as those parts were already being shown to the users previously
149 2014-06-26T18:33:48 *** sl33k_
150 2014-06-26T18:41:30 <RogerHaase> randomax: look at modifying items/__init__.py so it does not filter out those names. Maybe meta_text_to_dict needs a use_filter parameter similar to meta_dict_to_text
151 2014-06-26T18:43:29 <randomax> RogerHaase, so after adding the parameter i only use the kill keys when the filter is set to true.. right ?
152 2014-06-26T18:45:22 <RogerHaase> randomax: yes, that would be my plan. I did not look at where else that is used and whether it impacts other code.
153 2014-06-26T18:45:51 *** derdon
154 2014-06-26T18:45:52 *** RogerHaase
155 2014-06-26T18:45:53 *** jek
156 2014-06-26T18:46:43 *** RogerHaase
157 2014-06-26T18:46:43 *** derdon
158 2014-06-26T18:46:43 *** jek
159 2014-06-26T18:48:00 <RogerHaase> randomax: yes, that would be my plan. I did not look at where else that is used and whether it impacts other code. (repeat, in case you missed it on first try)
160 2014-06-26T18:48:15 *** vpv
161 2014-06-26T18:48:21 *** vpv
162 2014-06-26T18:48:25 <randomax> RogerHaase, ok i'll so that
163 2014-06-26T18:55:00 <randomax> RogerHaase, i was thinking instead of first converting from text to dict and then from dict to text.. should i make a new function that just converts it to a python dictionary and apply filters ?
164 2014-06-26T18:56:55 *** derdon
165 2014-06-26T19:00:37 <RogerHaase> randomax: dk, you have to see where and how existing code is used to see if it is better to change that or write a new method.
166 2014-06-26T19:05:01 *** derdon
167 2014-06-26T19:29:16 <randomax> RogerHaase, updated the cr https://codereview.appspot.com/110210043/
168 2014-06-26T19:56:15 <RogerHaase> randomax: old version was in alphabetical order which is helpful if you want to see a particular field. Still missing some fields: comment, name, name_old...others
169 2014-06-26T20:06:45 <RogerHaase> randomax: updated cr
170 2014-06-26T20:30:41 <randomax> ok.. will update the cr tomorrow.. need some sleep now.. gn :)
171 2014-06-26T20:30:58 <RogerHaase> gn
172 2014-06-26T20:31:19 *** randomax
173 2014-06-26T20:51:24 *** dave_largo
174 2014-06-26T22:21:02 *** derdon
175 2014-06-26T22:56:53 *** RogerHaase
176 2014-06-26T23:04:03 *** sl33k_
177