1 2011-03-24T00:28:56 *** m4k3r
2 2011-03-24T00:29:22 *** grzywacz
3 2011-03-24T00:56:53 *** gwork
4 2011-03-24T01:18:27 *** sl33k_
5 2011-03-24T01:20:15 *** sl33k_
6 2011-03-24T01:58:03 *** sl33k_
7 2011-03-24T01:58:59 *** sl33k_
8 2011-03-24T02:39:49 *** sl33k_
9 2011-03-24T02:39:49 *** sl33k_
10 2011-03-24T03:49:11 *** Marchael
11 2011-03-24T03:59:15 <Marchael> moin
12 2011-03-24T04:07:12 *** ronny
13 2011-03-24T04:15:54 *** Marchael
14 2011-03-24T04:19:59 *** ronny
15 2011-03-24T05:05:24 *** Marchael
16 2011-03-24T06:40:22 *** moinBot
17 2011-03-24T06:51:32 *** sl33k_
18 2011-03-24T07:10:12 <dreimark> moin
19 2011-03-24T07:14:55 *** Marchael
20 2011-03-24T07:25:33 *** Marchael
21 2011-03-24T08:24:41 *** kasun
22 2011-03-24T08:26:47 <dreimark> bbl
23 2011-03-24T09:37:52 *** kasun
24 2011-03-24T09:40:27 *** kasun
25 2011-03-24T09:57:55 <ThomasWaldmann> moin
26 2011-03-24T10:03:13 *** andialbrecht_
27 2011-03-24T10:03:28 *** andialbrecht
28 2011-03-24T11:35:41 *** greg_f
29 2011-03-24T11:37:53 *** ronny
30 2011-03-24T12:01:06 *** kasun
31 2011-03-24T12:01:33 *** Marchael
32 2011-03-24T12:17:10 *** kasun
33 2011-03-24T12:29:02 *** kasun
34 2011-03-24T12:42:06 *** kasun
35 2011-03-24T13:57:08 *** ronny
36 2011-03-24T15:38:10 *** ronny
37 2011-03-24T15:54:04 *** ronny
38 2011-03-24T17:51:41 <CIA-58> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 5772:f3262beca6b1 1.9/MoinMoin/user.py:
39 2011-03-24T17:51:41 <CIA-58> include page name in password reset URL (thanks to Marwan Gedeon for the patch)
40 2011-03-24T17:51:41 <CIA-58> Works better if only some URLs are forwarded (proxied) to a wiki, but e.g. the
41 2011-03-24T17:51:41 <CIA-58> url_root is not proxied - so we play safe and just use the current URL.
42 2011-03-24T18:57:48 *** ronny
43 2011-03-24T19:12:54 *** sinha
44 2011-03-24T19:14:54 *** greg_f
45 2011-03-24T19:20:56 <sinha> how to add index to any item ?
46 2011-03-24T19:21:11 <sinha> when i go to /+index/item and click on modify
47 2011-03-24T19:21:42 <sinha> it takes me to modify the content of that item..
48 2011-03-24T19:22:46 <sinha> dreimark: ^
49 2011-03-24T19:28:41 *** grzywacz
50 2011-03-24T19:45:14 *** Marchael
51 2011-03-24T19:47:58 *** m4k3r
52 2011-03-24T19:48:22 <ThomasWaldmann> sinha: index means = list sub items
53 2011-03-24T19:48:47 <ThomasWaldmann> e.g. if you have item Foo and sub items Foo/Bar1 and Foo/Bar2, it'll list Bar1 and Bar2
54 2011-03-24T19:49:24 <ThomasWaldmann> kind of local index (as opposed to global index, which is also available and just lists subitems of a virtual root item)
55 2011-03-24T19:49:41 <sinha> yes i understand that but how to add them
56 2011-03-24T19:49:46 <sinha> i went to index of a item
57 2011-03-24T19:49:52 <sinha> and clicked on modify
58 2011-03-24T19:50:02 <sinha> but it went to modify content of item
59 2011-03-24T19:50:17 <ThomasWaldmann> adding wiki items usually works by FIRST linking to them from markup, saving, clicking on the link
60 2011-03-24T19:50:32 <ThomasWaldmann> that makes sure all stuff is sanely interlinked
61 2011-03-24T19:50:55 <ThomasWaldmann> e.g. [[Foo/Bar1]]
62 2011-03-24T19:51:30 <sinha> okay
63 2011-03-24T19:51:58 <ThomasWaldmann> brb
64 2011-03-24T20:10:05 *** ronny
65 2011-03-24T20:13:18 *** m4k3r
66 2011-03-24T20:20:07 *** m4k3r
67 2011-03-24T20:26:02 *** Marchael
68 2011-03-24T20:48:09 <ThomasWaldmann> re
69 2011-03-24T21:12:53 *** andialbrecht_
70 2011-03-24T21:14:29 <andialbrecht> moin
71 2011-03-24T21:24:40 *** m4k3r
72 2011-03-24T21:31:21 <ThomasWaldmann> hi andialbrecht
73 2011-03-24T21:37:57 <andialbrecht> ThomasWaldmann: hi
74 2011-03-24T21:38:20 <andialbrecht> is there an example wiki to play with the sqla backend and metadata somewhere
75 2011-03-24T21:38:36 <andialbrecht> e.g. a substantial set of pages to play with?
76 2011-03-24T21:38:39 <ThomasWaldmann> not on the web
77 2011-03-24T21:38:45 <ThomasWaldmann> but you can try it locally
78 2011-03-24T21:39:18 <andialbrecht> sure, but is it enough to populate it with a few random pages
79 2011-03-24T21:39:22 <ThomasWaldmann> (sqla i mean, metadata is a general feature)
80 2011-03-24T21:39:55 <ThomasWaldmann> usually it loads 4,5 pages into the backend
81 2011-03-24T21:41:52 <andialbrecht> ok, I hope to have some time next week - maybe dreimark can point me to some interesting code parts on our next PyCologne meeting too :)
82 2011-03-24T21:48:14 <ThomasWaldmann> btw, there are some docs about installation, even for the different backend config options
83 2011-03-24T21:48:44 <ThomasWaldmann> either see docs/ directory or the docs url linked from the MoinMoin2.0 page
84 2011-03-24T21:49:59 <andialbrecht> Yeah, I've seen them. Thanks
85 2011-03-24T21:53:09 *** andialbrecht
86 2011-03-24T21:55:14 <sinha> ThomasWaldmann: Suppose i want to create a url like /+ajaxindex/item
87 2011-03-24T21:55:27 <sinha> how would i know which function in view is going to be called
88 2011-03-24T21:55:48 <sinha> and which template will be called..Infact i need to use similar thing for ajax call
89 2011-03-24T21:56:29 *** andialbrecht_
90 2011-03-24T21:58:15 <ThomasWaldmann> sinha: see MoinMoin/apps/frontend/views.py for some examples
91 2011-03-24T21:59:01 <sinha> yes there are functions defined..but how does environment know that for which url which function to call
92 2011-03-24T21:59:14 <sinha> Can you please guide me through entire process from start
93 2011-03-24T21:59:25 <sinha> from the point of URL being called
94 2011-03-24T21:59:41 <sinha> I have gone through docs but still has several doubts like how moin works !
95 2011-03-24T22:03:34 <ThomasWaldmann> the frontend module is registered for all stuff except some under +admin/ and +feeds/
96 2011-03-24T22:04:26 <ThomasWaldmann> @frontend.route('/+meta/<itemname:item_name>', defaults=dict(rev=-1))
97 2011-03-24T22:04:26 <moinBot> ThomasWaldmann: Error: "frontend.route('/+meta/<itemname:item_name>'," is not a valid command.
98 2011-03-24T22:04:27 <ThomasWaldmann> @frontend.route('/+meta/<int:rev>/<itemname:item_name>')
99 2011-03-24T22:04:27 <ThomasWaldmann> def show_item_meta(item_name, rev):
100 2011-03-24T22:04:28 <moinBot> ThomasWaldmann: Error: "frontend.route('/+meta/<int:rev>/<itemname:item_name>')" is not a valid command.
101 2011-03-24T22:04:35 <ThomasWaldmann> ignore moinbot :)
102 2011-03-24T22:04:53 *** MattMaker
103 2011-03-24T22:04:53 <ThomasWaldmann> this is the way how you define url rules: by decorators
104 2011-03-24T22:05:16 <ThomasWaldmann> if it is not clear enough from that example, you'll have to read the flask and/or werkzeug docs
105 2011-03-24T22:06:09 <ThomasWaldmann> if the rule in the decorator is matched, the framework will call that function with parameters.
106 2011-03-24T22:06:23 <sinha> what will be the params ?
107 2011-03-24T22:07:01 <sinha> okay i get it
108 2011-03-24T22:07:50 <ThomasWaldmann> itemname is a moin-special type, but (iirc) equivalent to "path"
109 2011-03-24T22:08:11 <sinha> yes
110 2011-03-24T22:08:36 <sinha> the thing is i am trying to create a tree like navigation for the subitems on the index page
111 2011-03-24T22:09:06 <sinha> i want to use ajax for that..as i dont think anything else will work..other than dynamic fetching
112 2011-03-24T22:09:55 <sinha> And can you please tell me is there any place in moin where ajax is being used ?
113 2011-03-24T22:10:04 <sinha> i could learn from that
114 2011-03-24T22:11:05 <ThomasWaldmann> the normal index is a flat index, just immediate subitems
115 2011-03-24T22:11:18 <ThomasWaldmann> but it is easy to get all subitems
116 2011-03-24T22:11:28 <ThomasWaldmann> none yet
117 2011-03-24T22:12:06 <andialbrecht> ThomasWaldmann: Is the location of the KVStore configurable somewhere?
118 2011-03-24T22:12:49 *** andialbrecht
119 2011-03-24T22:13:31 <sinha> yes to get subitem how would i know how much deeper i have to go
120 2011-03-24T22:13:50 <sinha> as dreimark proposed we can show the subitems in hierarchy (tree) manner
121 2011-03-24T22:14:46 <sinha> so first i will start with global index..if goes well then can add that at index page of each item
122 2011-03-24T22:14:53 <ThomasWaldmann> you don't use +index to get all subitems
123 2011-03-24T22:16:24 <ThomasWaldmann> you'ld duplicate the +index code to +fullindex (or so) and within that, do not call flat_index but index
124 2011-03-24T22:18:48 <sinha> yes but this index function http://hg.moinmo.in/moin/2.0/file/8b811bdef521/MoinMoin/apps/frontend/views.py#l482 returns render_template..
125 2011-03-24T22:19:30 <sinha> what i will do is..i will create a function say ajaxindex in that i will call item.flat_index() and can pass the index to a template ajaxindex.html
126 2011-03-24T22:20:01 <sinha> i think it will work
127 2011-03-24T22:20:04 <sinha> ?
128 2011-03-24T22:22:53 <ThomasWaldmann> if you don't want a flat index, you won't call flat_index
129 2011-03-24T22:25:14 <ThomasWaldmann> http://flask.pocoo.org/docs/api/#returning-json
130 2011-03-24T22:40:07 <sinha> you want to say that for ajax call i can return the json data, right ?
131 2011-03-24T22:41:13 <sinha> but to retrieve the subitems of item we have to call item.flat_index()..otherwise how would i get all the subitems ?
132 2011-03-24T22:48:21 <ThomasWaldmann> (22:16) < ThomasWal> you'ld duplicate the +index code to +fullindex (or so) and within that, do not call flat_index but index
133 2011-03-24T22:49:05 <ThomasWaldmann> you want all, don't you?
134 2011-03-24T22:49:52 <sinha> no i just want the one level subitem for a single call
135 2011-03-24T22:55:05 <ThomasWaldmann> why?
136 2011-03-24T22:56:30 <sinha> suppose there is a item "A" then it has subitems "B" and "C" and now "B" has subitem "B1" and "B2" like this
137 2011-03-24T22:56:43 <sinha> when index page of A is called it will list B and C
138 2011-03-24T22:56:56 <sinha> and when B is expanded it will give B1 and B2
139 2011-03-24T22:57:16 <sinha> and when again B1 is expanded it will give B11 and B12 ( if it is like this )
140 2011-03-24T22:57:27 <sinha> means something like tree one level traversal
141 2011-03-24T22:57:28 <ThomasWaldmann> how do you know B can be expanded?
142 2011-03-24T22:57:46 <sinha> exactly..i will call the function if nothing is returned..i will know
143 2011-03-24T22:57:59 <ThomasWaldmann> that's quite some overhead
144 2011-03-24T22:58:06 <sinha> means i will call function with B as item
145 2011-03-24T22:58:07 <sinha> yes
146 2011-03-24T22:58:14 <sinha> but is there any other way to do
147 2011-03-24T22:58:20 <ThomasWaldmann> get all?
148 2011-03-24T22:58:25 <sinha> yes
149 2011-03-24T22:58:31 <sinha> that is all subitems from "A"
150 2011-03-24T22:58:57 <ThomasWaldmann> yes
151 2011-03-24T22:59:00 <sinha> how ?
152 2011-03-24T22:59:10 <ThomasWaldmann> are you reading what i say?
153 2011-03-24T22:59:24 <sinha> yes
154 2011-03-24T22:59:36 <ThomasWaldmann> so why should i tell a third time?
155 2011-03-24T23:01:53 <sinha> sorry if i am not getting you...what i am saying is in the file index.html i.e template file called to display index for a item...there is a single loop which iterates over the index variable and outputs all the subitems , right ?
156 2011-03-24T23:02:37 <sinha> like for item A it will output B and C
157 2011-03-24T23:02:55 <sinha> but here i also have to output the subitems of B and C
158 2011-03-24T23:03:01 <sinha> how will i do thar
159 2011-03-24T23:03:43 <ThomasWaldmann> you need to look at frontend/views.py
160 2011-03-24T23:04:31 <sinha> yes in the function index() in views.py it returns the first level index to index.html template
161 2011-03-24T23:04:39 <sinha> for a item
162 2011-03-24T23:04:42 <sinha> right ?
163 2011-03-24T23:04:44 <ThomasWaldmann> yes, because it uses flat_index
164 2011-03-24T23:05:02 <ThomasWaldmann> guess what happens if it calls the (non-flat) index
165 2011-03-24T23:05:22 <sinha> means it will return all the subsequent children ?
166 2011-03-24T23:05:31 *** sinha
167 2011-03-24T23:06:03 *** sinha
168 2011-03-24T23:06:07 <ThomasWaldmann> children, grandchildren, whole family :D
169 2011-03-24T23:06:18 <sinha> okay...
170 2011-03-24T23:06:38 <sinha> and how will the elements be traversed ?
171 2011-03-24T23:06:46 <sinha> breadth first or depth first ?
172 2011-03-24T23:06:56 <sinha> in that index.html() template file
173 2011-03-24T23:08:47 <sinha> in jinja there is option of looping recursively ..will it help ?
174 2011-03-24T23:09:01 <ThomasWaldmann> sorry, it is flat_index() vs. get_index()
175 2011-03-24T23:10:01 <ThomasWaldmann> see MoinMoin/items/__init__.py for the implementation
176 2011-03-24T23:17:34 <sinha> i have checked the output of get_index() ...
177 2011-03-24T23:18:29 <sinha> it displays like "A A/B A/B/C A1 " like this...so in tree like structure should i keep the parent item name as prefix of a sub item ?
178 2011-03-24T23:30:49 *** ronny
179 2011-03-24T23:31:58 <ThomasWaldmann> well, that depends on the presentation. it should be just clear what it means.