1 2010-06-14T00:08:53  *** grzywacz has quit IRC
   2 2010-06-14T00:43:00  *** RogerHaase has quit IRC
   3 2010-06-14T00:50:05  <CIA-47> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 8306:3774c85377d8 2.0-dev/MoinMoin/ (5 files in 4 dirs):
   4 2010-06-14T00:50:05  <CIA-47> storage - do not create fake metadata
   5 2010-06-14T00:50:05  <CIA-47> Rather than setting some metadata to fake values (like ip 0.0.0.0),
   6 2010-06-14T00:50:05  <CIA-47> do not set the metadata entry at all. Code that uses it must use
   7 2010-06-14T00:50:05  <CIA-47> metadata.get(key) and expect it being None (or give some other default
   8 2010-06-14T00:58:51  <CIA-47> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 8307:96f414cdabb1 2.0-dev/MoinMoin/storage/serialization.py: xml serialization: use smaller chunksize for data, shorter lines, easier to review
   9 2010-06-14T04:50:22  <diofeher> TheSheep: please take a look later http://www.moinmo.in/DiogenesAugusto/GSoC2010/I18N
  10 2010-06-14T05:28:22  *** RogerHaase has joined #moin-dev
  11 2010-06-14T05:28:44  *** RogerHaase has left #moin-dev
  12 2010-06-14T08:43:23  *** gwork has joined #moin-dev
  13 2010-06-14T08:50:22  <ThomasWaldmann> diofeher: why do you think it is called "Null"Translations?
  14 2010-06-14T08:51:53  <ThomasWaldmann> http://jinja.pocoo.org/2/documentation/extensions#environment-methods < and what's so hard about reading this (after being pointed at 3times)?
  15 2010-06-14T09:01:13  *** gwork has quit IRC
  16 2010-06-14T09:29:00  <dreimark> moin
  17 2010-06-14T09:47:15  *** DmitryAndreev has quit IRC
  18 2010-06-14T12:03:58  *** DmitryAndreev has joined #moin-dev
  19 2010-06-14T12:41:13  <ei-grad> moin
  20 2010-06-14T12:44:30  <dreimark> hi ei-grad
  21 2010-06-14T12:51:58  <dreimark> ThomasWaldmann: i can check all pages and all files for encoding
  22 2010-06-14T13:12:22  <TheSheep> diofeher: are you there?
  23 2010-06-14T13:32:25  <diofeher> TheSheep: what i trying to do yesterday night: http://www.moinmo.in/DiogenesAugusto/GSoC2010/I18N
  24 2010-06-14T13:33:08  <TheSheep> have you seen ThomasWaldmann's answer?
  25 2010-06-14T13:34:20  <diofeher> nop
  26 2010-06-14T13:34:41  <diofeher> gonna check channel log
  27 2010-06-14T13:38:01  <diofeher> TheSheep: saw... but i didn't get environment working yet :/
  28 2010-06-14T13:38:36  <TheSheep> diofeher: I see you still have all those silly functions like  def logo()
  29 2010-06-14T13:41:21  <diofeher> TheSheep: yes, it's only used to get variable... :x
  30 2010-06-14T13:41:58  <TheSheep> diofeher: that should be done directly in the template
  31 2010-06-14T13:42:06  <diofeher> i'm gonna do a url_for function to be used in template
  32 2010-06-14T13:42:22  <diofeher> logo = page.link_to_raw(self.request, self.cfg.logo_string)
  33 2010-06-14T13:45:51  <diofeher> and we have page.link_to too
  34 2010-06-14T13:46:11  <TheSheep> I think that function is the top priority, then you can get rid of all those functions that just do d.update()
  35 2010-06-14T13:47:42  <diofeher> TheSheep: yes, you're right. should i reuse link_to or use a new one?
  36 2010-06-14T13:48:16  <TheSheep> use page.link_to inside your url_for function, I guess
  37 2010-06-14T13:49:11  <diofeher> ok
  38 2010-06-14T13:52:41  <diofeher> TheSheep: you prefer to do "whiteboard" like you said, or prefer wait me writing code?
  39 2010-06-14T13:52:59  <TheSheep> lets discuss what we have to do further
  40 2010-06-14T13:53:12  <TheSheep> I really don't like how long it all takes
  41 2010-06-14T13:54:18  <TheSheep> to change the structure of our templates, we will need to put the header and footer into a single file
  42 2010-06-14T13:54:43  <TheSheep> that means we can't use a jinja.py theme anymore, we need to move the template rendering into theme base
  43 2010-06-14T13:55:58  <diofeher> ok. i have a doubt when thinking in templates structure
  44 2010-06-14T13:56:07  <TheSheep> yes?
  45 2010-06-14T13:56:16  <diofeher> actions don't extends this template base, right?
  46 2010-06-14T13:56:31  <diofeher> base = head + header + footer
  47 2010-06-14T13:57:27  <TheSheep> well, it contains everything that is needed
  48 2010-06-14T13:58:06  <TheSheep> but you can also do includes if it's too big
  49 2010-06-14T13:58:21  <diofeher> yes, i'm doing this with editbar
  50 2010-06-14T13:59:24  <diofeher> but rendering will still separated, so actions doesn't have to extend base that contains only theme html
  51 2010-06-14T14:00:41  <TheSheep> what do you mean?
  52 2010-06-14T14:01:04  <TheSheep> the base template should call all the other templates as needed
  53 2010-06-14T14:01:39  <TheSheep> by 'call' I mean either include, or extend and use the macros
  54 2010-06-14T14:03:10  <diofeher> i mean that theme have a render in different place of action
  55 2010-06-14T14:03:26  <diofeher> action is rendered in a place, theme in another
  56 2010-06-14T14:03:29  <TheSheep> I don't understand that sentence
  57 2010-06-14T14:03:41  <diofeher> wait a min
  58 2010-06-14T14:04:15  <TheSheep> different actions will use different templates that inherit from base
  59 2010-06-14T14:04:25  <diofeher> http://www.moinmo.in/MoinAPI/Beispiele?action=AttachFile&do=get&target=MoinMoinArchitecture.png
  60 2010-06-14T14:04:48  <TheSheep> we will get rid of the theme part ultimately
  61 2010-06-14T14:05:14  <TheSheep> instead, we will have functions for looking up and rendering the right template
  62 2010-06-14T14:05:41  <diofeher> they are rendered separated.. so, don't make sense action (like diff.html) extending base.html
  63 2010-06-14T14:06:14  <diofeher> hmm
  64 2010-06-14T14:06:41  <diofeher> where are going to be put these functions
  65 2010-06-14T14:06:45  <diofeher> ?
  66 2010-06-14T14:06:51  <TheSheep> int theme probably
  67 2010-06-14T14:08:55  <TheSheep> the current content of theme will not be needed
  68 2010-06-14T14:09:19  <diofeher> get it ^^
  69 2010-06-14T14:09:21  <TheSheep> we can even put it in MoinMoin/theme/jinja.py
  70 2010-06-14T14:09:29  <TheSheep> if that's comfotable
  71 2010-06-14T14:10:23  <TheSheep> so, where the actions now call theme.render_content(item_name, content, title)
  72 2010-06-14T14:11:02  <TheSheep> they will call  theme.render_template('action_name', content, params)
  73 2010-06-14T14:11:27  <TheSheep> or even just theme.render_template('action_name', **params)
  74 2010-06-14T14:11:53  <TheSheep> in the case of the view action, the params would contain content
  75 2010-06-14T14:12:04  <diofeher> yes yes, this is what i was thining ^^
  76 2010-06-14T14:12:34  <TheSheep> that render_template function will locate the right template (taking themes into account), add apropriate additional variables to the params, and render it
  77 2010-06-14T14:13:53  <TheSheep> of course this means that you need to modify all the actions, so there is a lot of work
  78 2010-06-14T14:14:04  <diofeher> yea :/
  79 2010-06-14T14:14:09  <TheSheep> you need to speed up a little
  80 2010-06-14T14:14:35  <diofeher> i know.. i was too slow
  81 2010-06-14T14:14:59  <diofeher> but trying to speed up now :)
  82 2010-06-14T14:15:43  <diofeher> ok, another question about i18n
  83 2010-06-14T14:16:04  <diofeher> i saw that GNUTranslation have an different way of moin to get translations
  84 2010-06-14T14:17:22  <diofeher> my first thought: can we use actual i18n infrastructure to work with gettext.GNUTranslations?
  85 2010-06-14T14:18:36  <TheSheep> diofeher: what do you mean? moin's gettext should be compatible
  86 2010-06-14T14:18:49  <TheSheep> diofeher: if not, you can make a facade object
  87 2010-06-14T14:20:08  * dreimark is going to give a talk about a big moin installation
  88 2010-06-14T14:20:10  <dreimark> bbl
  89 2010-06-14T14:21:56  <diofeher> what i mean, we need an instance of a object that contains attributes gettext and ngettext
  90 2010-06-14T14:22:10  <diofeher> like GNUTranslations, to load in Jinja
  91 2010-06-14T14:23:00  <diofeher> a facade object would be fit this well...
  92 2010-06-14T14:23:58  <TheSheep> you actually need an instance per every language
  93 2010-06-14T14:24:08  *** gwork has joined #moin-dev
  94 2010-06-14T14:25:36  <TheSheep> you just do:  class MoinTranslations(object): def __init__(self, request): self.request=request; def gettext(self, ..): return self.request.gettext(...)
  95 2010-06-14T14:25:50  <TheSheep> or something like that
  96 2010-06-14T14:26:17  <diofeher> ok so :D
  97 2010-06-14T14:26:19  <TheSheep> but lets get the url_for done first
  98 2010-06-14T14:26:37  <TheSheep> then move the logo() and other functions inside the template wholly
  99 2010-06-14T14:27:01  <TheSheep> so that the jinja.py has only the utility functions needed in the template
 100 2010-06-14T14:27:27  <TheSheep> then make the render_template function that finds the right template and adds all the parameters to it
 101 2010-06-14T14:27:42  <CIA-47> Andrew Grigorev <andrew@ei-grad.ru> default * 5695:51c2801733b8 1.9-ldap-kerberos-agrigorev/MoinMoin/ (3 files in 3 dirs): [LDAP2010] s/LDAPConnectionManager/LDAPConnection/g
 102 2010-06-14T14:27:45  <CIA-47> Andrew Grigorev <andrew@ei-grad.ru> default * 5696:1e7ba71bbabb 1.9-ldap-kerberos-agrigorev/MoinMoin/ (2 files in 2 dirs): [LDAP2010] s/conn_mgr/ldap_conn/g
 103 2010-06-14T14:27:46  <CIA-47> Andrew Grigorev <andrew@ei-grad.ru> default * 5697:49223d15b6ab 1.9-ldap-kerberos-agrigorev/MoinMoin/util/ldap_connection.py: [LDAP2010] docstring fix
 104 2010-06-14T14:27:49  <CIA-47> Andrew Grigorev <andrew@ei-grad.ru> default * 5698:354aa79d39f6 1.9-ldap-kerberos-agrigorev/MoinMoin/datastruct/backends/ldap_groups.py: [LDAP2010] Unauthorized user shouldn't be a member of any group
 105 2010-06-14T14:27:50  <CIA-47> Andrew Grigorev <andrew@ei-grad.ru> default * 5699:ebe8ed6573ea 1.9-ldap-kerberos-agrigorev/MoinMoin/util/ldap_connection.py: [LDAP2010] Broked LDAPConnection.search_single
 106 2010-06-14T14:27:53  <CIA-47> Andrew Grigorev <andrew@ei-grad.ru> default * 5700:ffe9065ef25f 1.9-ldap-kerberos-agrigorev/MoinMoin/util/ldap_connection.py: [LDAP2010] s/search_base/base_dn/g
 107 2010-06-14T14:27:57  <ei-grad> bbl
 108 2010-06-14T14:28:37  <TheSheep> diofeher: I need to get back to work, say if you have any problems
 109 2010-06-14T14:28:44  <diofeher> ok, gonna work now too
 110 2010-06-14T14:28:46  <diofeher> thanks :)
 111 2010-06-14T15:09:08  <CIA-47> Diogenes Augusto <diofeher@gmail.com> default * 8256:9d521aabd5f1 2.0-dev-jinja2-plugins-dfeher/MoinMoin/ (templates/head.html templates/header.html theme/jinja.py): [templating] url_for function to be used directly in template
 112 2010-06-14T15:13:51  <ThomasWaldmann> re
 113 2010-06-14T15:14:05  * ThomasWaldmann was rather busy with server hardware issue
 114 2010-06-14T15:16:49  <ThomasWaldmann> diofeher: btw, you know Page/PageEditor is rather deprecated?
 115 2010-06-14T15:17:36  <ThomasWaldmann> also, using querystr as a str (not dict) is also rather deprecated
 116 2010-06-14T15:18:40  <ThomasWaldmann> TheSheep: ^^
 117 2010-06-14T15:19:48  <ThomasWaldmann> I am thinking about whether we want something rather simple, less magic and independent of page instance url generation, like what's possible with request.(abs_)href
 118 2010-06-14T15:21:39  <ThomasWaldmann> http://werkzeug.pocoo.org/documentation/0.6.1/utils.html#url-helpers
 119 2010-06-14T15:22:04  <ThomasWaldmann> request.href and .abs_href are ready-to-use instances of Href
 120 2010-06-14T15:24:35  <ThomasWaldmann> as you see, positional args are simply used as path segments, keyword args go into the query string
 121 2010-06-14T15:24:40  <TheSheep> hmm, and have the wiki_url, static_url and theme_url variables in the theme?
 122 2010-06-14T15:25:28  <ThomasWaldmann> if the href instances are not enough, we could have more of them
 123 2010-06-14T15:26:15  <ThomasWaldmann> I just would like something less complicated than before :D
 124 2010-06-14T15:26:53  <TheSheep> I still need to finish that werkzeug routing for moin
 125 2010-06-14T15:26:58  <ThomasWaldmann> (and also be able to kill Page*.py some day)
 126 2010-06-14T15:29:09  <diofeher> ThomasWaldmann: i know
 127 2010-06-14T15:29:36  <diofeher> i'm looking here at items other way to do this
 128 2010-06-14T15:30:20  <ThomasWaldmann> maybe generating some simple url should not need any complex object instance at all
 129 2010-06-14T15:30:30  <ThomasWaldmann> neither Item nor Page
 130 2010-06-14T15:30:46  <ThomasWaldmann> if you have the name of it and you know what you want to do, that should be enough
 131 2010-06-14T15:32:13  <ThomasWaldmann> and as we use rather standard encoding (first encode to utf-8, then urlquote) for pagenames and other stuff, the standard url tools like that Href instance should work rather ok
 132 2010-06-14T15:33:45  <ThomasWaldmann> TheSheep: btw, seen the atom feed? :)
 133 2010-06-14T15:36:34  <ThomasWaldmann> TheSheep: diofeher: http://hg.moinmo.in/moin/2.0-dev/file/96f414cdabb1/MoinMoin/web/request.py#l44
 134 2010-06-14T15:37:27  <ThomasWaldmann> href generates /scriptname/... kind of urls, abs_ref is the http://servername/scriptname/... kind
 135 2010-06-14T15:38:13  *** RogerHaase has joined #moin-dev
 136 2010-06-14T15:40:12  <ThomasWaldmann> static_href (for generic stuff, like javascript, content icons) and theme_href (theme-specific css, images, ...) sound good
 137 2010-06-14T15:41:20  <TheSheep> ThomasWaldmann: no, you used that werkzeug lib?
 138 2010-06-14T15:41:38  <ThomasWaldmann> yes, the contrib module
 139 2010-06-14T15:41:57  <TheSheep> ThomasWaldmann: I use it too, let me rip out 300 loc from my code
 140 2010-06-14T15:42:33  <ThomasWaldmann> basically it works now, but esp. the content part needs more work (I just used the normal show/diff method, not specialized for feed)
 141 2010-06-14T15:42:56  <ThomasWaldmann> (and I killed the rss stuff to get rid of some old code :)
 142 2010-06-14T15:45:29  <diofeher> a little dumb question: i'm doing a simpler url generator
 143 2010-06-14T15:46:22  <diofeher> still good put inside url_for_simple in ThemeBase something like that: return '<a href="%s">%s</a>' % (link, text)
 144 2010-06-14T15:48:21  <ThomasWaldmann> don't do that
 145 2010-06-14T15:48:32  <ThomasWaldmann> that's too simple :)
 146 2010-06-14T15:48:47  <diofeher> hehe
 147 2010-06-14T15:49:06  <ThomasWaldmann> also, please differentiate between links (<a href...) and urls
 148 2010-06-14T15:49:25  <ThomasWaldmann> urls are not always used in links
 149 2010-06-14T15:49:28  <diofeher> my doubt if is ok too put this embedded html in a function as link_to does
 150 2010-06-14T15:49:39  <diofeher> ok, next gonna do this :)
 151 2010-06-14T15:49:44  <ThomasWaldmann> don't look at the old crap, it's bad
 152 2010-06-14T15:49:57  <ThomasWaldmann> and fscking complicated
 153 2010-06-14T15:50:47  <ThomasWaldmann> if you need a link (<a href...) you can easily just write that into your template html (or add some function later)
 154 2010-06-14T15:51:22  <diofeher> so, good: {{ url_for(pagename=cfg.page_front_page, text=cfg.logo_string, raw=True) }} replace to <a href="{{ cfg.page_front_page }}"> {{ cfg.logo_string }}</a> ?
 155 2010-06-14T15:51:24  <TheSheep> one difference between link and href is escaping of "
 156 2010-06-14T15:51:29  <TheSheep> and of &
 157 2010-06-14T15:51:32  <ThomasWaldmann> but you urgently need a general URL generating thing that encodes, quotes, assembles URLs
 158 2010-06-14T15:51:43  <TheSheep> but I guess jinja does that automagically
 159 2010-06-14T15:52:23  <diofeher> you can put this escaping automatically, but it's not a good practice
 160 2010-06-14T15:52:25  <ThomasWaldmann> diofeher: href(cfg.page_front_page)
 161 2010-06-14T15:52:49  <ThomasWaldmann> (with href = request.href)
 162 2010-06-14T15:53:02  <diofeher> hm
 163 2010-06-14T15:53:13  <diofeher> using werkzeug stuff, nice :D
 164 2010-06-14T15:53:31  <TheSheep> diofeher: because you can be on '/foo/bar' and then linking to 'HomePage' would link to '/foo/HomePage' instead of '/HomePage'
 165 2010-06-14T15:55:12  <ThomasWaldmann> <a href="{{ href(somepage) }}">jump to some page</a>
 166 2010-06-14T15:55:45  <ThomasWaldmann> <a href="{{ href(somepage, do='edit') }}">edit some page</a>
 167 2010-06-14T15:56:17  <ThomasWaldmann> i guess this is as simple as it can get
 168 2010-06-14T15:56:58  <ThomasWaldmann> and thanks to werkzeug devs, it also works for non-ascii pagenames as expected
 169 2010-06-14T15:57:10  <diofeher> yes... i thought that would generate "<a href.." too, but i prefer to put "<a href" directly in template
 170 2010-06-14T15:57:15  <ThomasWaldmann> (the std urllib isn't that great)
 171 2010-06-14T15:58:03  <TheSheep> diofeher: especially when you sometimes need <link href or <img src
 172 2010-06-14T15:58:15  <ThomasWaldmann> what we might need later for navi_bar is some micro converter for link markup
 173 2010-06-14T15:58:44  <diofeher> TheSheep: exactly
 174 2010-06-14T15:58:44  <TheSheep> ThomasWaldmann: something that only parses links and nothing more?
 175 2010-06-14T15:58:51  <ThomasWaldmann> because it is rather ugly now and using it's own, limited parsing of link markup
 176 2010-06-14T15:59:01  <ThomasWaldmann> -'
 177 2010-06-14T15:59:34  <TheSheep> ThomasWaldmann: it would also need to understand {{{}}} and <<>>
 178 2010-06-14T15:59:59  <TheSheep> ThomasWaldmann: because you could have {{{[[}}}somthing like this{{{]]}}}
 179 2010-06-14T16:00:10  <ThomasWaldmann> navi_bar is configurable in config (no big issue, we can expect admin to do everything needed), but also in user profile (we should accept same markup from users as in the wiki pages)
 180 2010-06-14T16:00:50  <CIA-47> Diogenes Augusto <diofeher@gmail.com> default * 8257:a8e020a242fc 2.0-dev-jinja2-plugins-dfeher/MoinMoin/ (templates/header.html theme/jinja.py): [templating] removed unnecessary comments and now we can use href function from werkzeug in templates
 181 2010-06-14T16:00:50  <ThomasWaldmann> TheSheep: yes, maybe links and transclusions as used by links
 182 2010-06-14T16:00:55  <TheSheep> ThomasWaldmann: maybe it would be better to have a SideBar similar to the Mandarin theme?
 183 2010-06-14T16:01:19  <TheSheep> ThomasWaldmann: overridable with HomePage/SideBar
 184 2010-06-14T16:01:42  <ThomasWaldmann> could be done, yes :)
 185 2010-06-14T16:02:38  <ThomasWaldmann> but nevertheless, we need some configurable navibar, maybe with quicklinks :)
 186 2010-06-14T16:02:38  <diofeher> guys, where do you plan to separate response from request?
 187 2010-06-14T16:02:40  <diofeher> after SOCs?
 188 2010-06-14T16:02:49  <ThomasWaldmann> we need that asap
 189 2010-06-14T16:03:06  <diofeher> s/where/when
 190 2010-06-14T16:03:32  <ThomasWaldmann> well, whenever someone did it :)
 191 2010-06-14T16:04:35  <diofeher> hehe
 192 2010-06-14T16:04:53  <diofeher> request.write(content) scares me
 193 2010-06-14T16:05:18  <ThomasWaldmann> diofeher: until we have that micro converter, i guess just considering the navi_bar as list of unicode item names should be acceptable
 194 2010-06-14T16:05:45  <ThomasWaldmann> that covers 99% percent of user base :)
 195 2010-06-14T16:06:19  <ThomasWaldmann> and it unblocks you for writing a nice template for it
 196 2010-06-14T16:06:59  <ThomasWaldmann> (same for the list you get from user profile)
 197 2010-06-14T16:08:10  <ThomasWaldmann> at quite some places, we do not write to output directly any more
 198 2010-06-14T16:16:13  *** kursor has joined #moin-dev
 199 2010-06-14T16:19:01  <diofeher> i'm working on navibar now :D
 200 2010-06-14T16:20:41  <CIA-47> Diogenes Augusto <diofeher@gmail.com> default * 8258:28715c3d4da2 2.0-dev-jinja2-plugins-dfeher/MoinMoin/ (templates/header.html theme/jinja.py): [templating] removed searchform function from themebase
 201 2010-06-14T16:21:25  <ThomasWaldmann> maybe add some TODO: we need link/transclusion markup micro converter there
 202 2010-06-14T16:23:26  <diofeher> added
 203 2010-06-14T16:24:02  *** gwork has quit IRC
 204 2010-06-14T16:24:40  <ThomasWaldmann> waldi: DmitryAndreev: valeuf: in case you are working on link conversion anyway, see "micro converter" above :)
 205 2010-06-14T16:25:32  <ThomasWaldmann> diofeher: hmm, in case we want to keep that link text shortening, i guess it rather needs to be (itemname, linktext)
 206 2010-06-14T16:28:03  <diofeher> change this:  <a href="{{ href(cfg.page_front_page) }}">{{ cfg.logo_string }}</a> to this: item_href(itemname, linktext)
 207 2010-06-14T16:28:06  <diofeher> ?
 208 2010-06-14T16:32:09  <ThomasWaldmann> a href is just a URL, not a link
 209 2010-06-14T16:33:40  <diofeher> yes, so {{ item_link(itemname, linktext) }}
 210 2010-06-14T16:34:32  <ThomasWaldmann> that could be an increasingly complex wrapper that uses href) internally
 211 2010-06-14T16:36:05  <ThomasWaldmann> (it would need to deal with stuff for A element (attrs), link text (and maybe not only text, but something more complex) and qs args
 212 2010-06-14T16:37:17  <ThomasWaldmann> not sure if you want that increasing complexity. the simple href thing is more to type, but very easy and flexible
 213 2010-06-14T16:37:51  <diofeher> yes, i agree with this
 214 2010-06-14T16:46:51  <TheSheep> I think making macros that just add <a></a> is not good
 215 2010-06-14T16:47:13  <ThomasWaldmann> could slow down the stuff
 216 2010-06-14T16:47:28  <TheSheep> and makes things more complicated to understand
 217 2010-06-14T16:48:08  <ThomasWaldmann>     1.26  {{ Theme.emit_custom_html(Theme.cfg.page_header2) }}  << why is that Theme.cfg?
 218 2010-06-14T16:51:42  <ThomasWaldmann> diofeher: btw, you should merge main repo soon as i had to edit in theme/__init__.py (and you likely need to port those changes to your jinja2.py also)
 219 2010-06-14T16:53:58  *** mivert_ has quit IRC
 220 2010-06-14T17:06:49  <ThomasWaldmann> diofeher: you regularly check your wiki TODO list?
 221 2010-06-14T17:07:07  * ThomasWaldmann just added stuff there and saw you didn't get notified
 222 2010-06-14T17:23:14  <dreimark> diofeher: please subscribe to that page
 223 2010-06-14T17:38:28  <waldi> ThomasWaldmann: not sure what you are talking about
 224 2010-06-14T17:39:10  <ThomasWaldmann> the navi_bar is a list of entries (potentially in wiki markup)
 225 2010-06-14T17:39:22  <ThomasWaldmann> currently it is parsed by a separate parser in the theme
 226 2010-06-14T17:39:48  <ThomasWaldmann> which is duplicated code and has less features then the real wiki link parser
 227 2010-06-14T17:40:16  <ThomasWaldmann> *than
 228 2010-06-14T17:44:02  <ThomasWaldmann> hmm, maybe we should just configure the whole list in one piece as wiki markup and run it through the converter :)
 229 2010-06-14T17:44:16  <ThomasWaldmann> like navi_bar = """
 230 2010-06-14T17:44:20  <ThomasWaldmann>  * FrontPage
 231 2010-06-14T17:44:25  <ThomasWaldmann>  * RecentChanges
 232 2010-06-14T17:44:30  <ThomasWaldmann> ...
 233 2010-06-14T17:44:31  <ThomasWaldmann> """
 234 2010-06-14T17:45:21  <ThomasWaldmann> of course that would miss the translation feature, except if we add some converter step for that
 235 2010-06-14T17:46:51  <ThomasWaldmann> and the user quicklinks part could be just some user-related page used in a similar way
 236 2010-06-14T17:47:07  <diofeher> ThomasWaldmann dreimark: i'm not subscribed but I check regularly
 237 2010-06-14T17:47:19  <ThomasWaldmann> ok, check now :D
 238 2010-06-14T17:50:06  <diofeher> checked.. a lot to do :D
 239 2010-06-14T18:02:37  <ThomasWaldmann> only for today :)
 240 2010-06-14T18:06:06  <diofeher> :O
 241 2010-06-14T18:07:00  <ThomasWaldmann> ok, today and tomorrow :)
 242 2010-06-14T18:09:17  <diofeher> haha better
 243 2010-06-14T18:14:47  <diofeher> ThomasWaldmann: cfg.credits gonna accept string? or only lists
 244 2010-06-14T18:15:04  <ThomasWaldmann> only lists
 245 2010-06-14T18:20:06  <CIA-47> Diogenes Augusto <diofeher@gmail.com> default * 8259:b43ac005bca2 2.0-dev-jinja2-plugins-dfeher/MoinMoin/ (templates/footer.html templates/header.html theme/jinja.py): [templating] killed credits and removed some duplicated variables
 246 2010-06-14T18:22:42  <diofeher> ThomasWaldmann: another little doubt... version is showed in print_mode?
 247 2010-06-14T18:23:11  <diofeher> currently, it's not..
 248 2010-06-14T18:30:12  <ThomasWaldmann> ehrm, wasn't that "kill version and modify credits"?
 249 2010-06-14T18:31:38  <diofeher> oh ok... i thought that you only saying to drop ThemeBase.show_version() and render in other way
 250 2010-06-14T18:33:31  <ThomasWaldmann> http://hg.moinmo.in/moin/2.0-dev-jinja2-plugins-dfeher/rev/b43ac005bca2
 251 2010-06-14T18:33:36  <ThomasWaldmann> first think, then code :D
 252 2010-06-14T18:33:48  <ThomasWaldmann> issues:
 253 2010-06-14T18:34:30  <ThomasWaldmann> you remove Theme. from Theme.emit_custom_html - that means you want to add all needed method to namespace?
 254 2010-06-14T18:34:55  <ThomasWaldmann> i think it should be rather theme.emit_custom_html with theme being the theme instance
 255 2010-06-14T18:35:04  <ThomasWaldmann> (== a method call)
 256 2010-06-14T18:35:20  <diofeher> but with this instance, we can access anything :P
 257 2010-06-14T18:35:29  <diofeher> (java thoughts)
 258 2010-06-14T18:35:32  <diofeher> :P
 259 2010-06-14T18:35:35  <ThomasWaldmann> but, Theme.cfg.page_footerX should be rather cfg.page_footerX because you already have cfg, right?
 260 2010-06-14T18:35:52  <diofeher> yes, i've already changed this
 261 2010-06-14T18:35:55  <ThomasWaldmann> python has adult coders :)
 262 2010-06-14T18:36:26  <diofeher> but we won't need too much functions in template
 263 2010-06-14T18:36:34  <diofeher> at least for while
 264 2010-06-14T18:36:42  <ThomasWaldmann> ok, you'll see later
 265 2010-06-14T18:37:16  <ThomasWaldmann> and now completely kill the showversion stuff :)
 266 2010-06-14T18:37:33  <diofeher> and cfg.show_version :)
 267 2010-06-14T18:37:56  <ThomasWaldmann> we only show version on SystemInfo and maybe we'll even drop that except for wiki admin
 268 2010-06-14T18:38:32  <ThomasWaldmann> yes, also drop the related configuration, see MoinMoin.config.multiconfig
 269 2010-06-14T18:41:58  <diofeher> ok ^^
 270 2010-06-14T18:42:35  <CIA-47> Diogenes Augusto <diofeher@gmail.com> default * 8260:8e185f9789f3 2.0-dev-jinja2-plugins-dfeher/MoinMoin/ (config/multiconfig.py templates/footer.html theme/jinja.py): [templating] killing show_version completely
 271 2010-06-14T18:43:23  <valeuf> ok ThomasWaldmann I will check micro converter
 272 2010-06-14T18:43:41  <valeuf> sorry, it is project defend time at university right now, but I will work on the SoC tonight :)
 273 2010-06-14T19:06:02  <dreimark> bbl
 274 2010-06-14T19:27:49  <diofeher> a doubt in timings. i have to put timings in template, but the clock stops after template rendering. if i put clock before, the time is shorter
 275 2010-06-14T19:36:10  <ThomasWaldmann> hm?
 276 2010-06-14T19:36:34  <diofeher> ThomasWaldmann: ThemeBase.send_closing_html()
 277 2010-06-14T19:36:40  <ThomasWaldmann> (of course you can't have a clock that gets stopped after the template is rendered)
 278 2010-06-14T19:36:46  <diofeher> :P
 279 2010-06-14T19:37:11  <diofeher> i get a solution, but it's not perfect yet
 280 2010-06-14T19:37:27  <diofeher> i call {{ theme.request.clock.stop('run') }} in template
 281 2010-06-14T19:37:34  <diofeher> but it printing None
 282 2010-06-14T19:38:48  <ThomasWaldmann> do some of the clocks work correctly?
 283 2010-06-14T19:39:25  <diofeher> yes
 284 2010-06-14T19:39:32  <diofeher> now i'm looking for some filter in jinja documentation
 285 2010-06-14T19:41:06  <ThomasWaldmann> what filter?
 286 2010-06-14T19:43:35  <diofeher> to put an empty string :P
 287 2010-06-14T20:15:27  <ThomasWaldmann> eh?
 288 2010-06-14T20:15:50  <ThomasWaldmann> you have gazillions of them in your templates
 289 2010-06-14T20:17:31  <ThomasWaldmann> diofeher:
 290 2010-06-14T20:21:05  <dreimark> re
 291 2010-06-14T20:21:48  * ei-grad stucked with a different variants of relationship for users and groups...
 292 2010-06-14T20:22:07  <ei-grad> seems like most of openldap users, use just a 'member' attribute for a group
 293 2010-06-14T20:23:13  <CIA-47> Diogenes Augusto <diofeher@gmail.com> default * 8261:76a5c0650b24 2.0-dev-jinja2-plugins-dfeher/MoinMoin/ (5 files in 2 dirs): [templating] removed show_timings function from ThemeBase and put them in footer.html
 294 2010-06-14T20:23:22  <ThomasWaldmann> ei-grad: so?
 295 2010-06-14T20:23:32  <ei-grad> but in that case, it would be hard to implement a support of nested groups (if not to make LDAPGroups just a GreedyGroupBackend,
 296 2010-06-14T20:23:56  <ei-grad> that is suck in case we have 10K users...
 297 2010-06-14T20:24:06  <ThomasWaldmann> definitely
 298 2010-06-14T20:24:45  <dreimark> ouch
 299 2010-06-14T20:24:53  <ThomasWaldmann> but is that possible if they just use member: ?
 300 2010-06-14T20:25:28  <ei-grad> if not make it something like GreedyGroup, then we need to execute query for every member, to check is he a group or a user
 301 2010-06-14T20:25:53  <diofeher> ThomasWaldmann: {{ theme.request.clock.stop('total') }} print None in template. a workaround would be: {% set null = theme.request.clock.stop('total') %}
 302 2010-06-14T20:26:43  <ThomasWaldmann> ei-grad: i don't quite understand
 303 2010-06-14T20:26:49  <ei-grad> if we use just member, then we can't get a list of entries for groups (or users), that are members of other group
 304 2010-06-14T20:27:02  <ThomasWaldmann> the usual question the group code has to answer is "is U in G?"
 305 2010-06-14T20:28:27  <ei-grad> if user is a member of group G1, nested in G, then at first we need to find, that G1 is nested in G
 306 2010-06-14T20:29:16  <ThomasWaldmann> is that possible when just using member: ?
 307 2010-06-14T20:29:56  <ThomasWaldmann> i mean, has the user object a member: attr, and the group it refers to also has member: attr refering to other group?
 308 2010-06-14T20:30:39  <ei-grad> we can get a list of DNs of every member of a group G, but to determine what of them is a groups, and what - a users, we need to execute a one query per each member
 309 2010-06-14T20:31:09  <ThomasWaldmann> that is not lazy
 310 2010-06-14T20:33:46  <ei-grad> in Active Directory every user and group has a memberOf attribute, poits to a groups, which that member belongs, and in that way no problems seems to appear
 311 2010-06-14T20:34:38  <ThomasWaldmann> (20:22) <   ei-grad> seems like most of openldap users, use just a 'member' attribute for a group
 312 2010-06-14T20:34:51  <ThomasWaldmann> is that different than memberOf?
 313 2010-06-14T20:35:02  <ei-grad> yes
 314 2010-06-14T20:35:45  <ThomasWaldmann> so a) user has no group info, group has list of members?
 315 2010-06-14T20:36:01  <ThomasWaldmann> b) user has memberOf info, referring to group
 316 2010-06-14T20:36:13  <ei-grad> yes
 317 2010-06-14T20:36:31  <ei-grad> in Active Directory both of them in place3
 318 2010-06-14T20:36:36  <ei-grad> s/3//
 319 2010-06-14T20:36:41  * ThomasWaldmann hasn't much practical ldap experience
 320 2010-06-14T20:37:06  <ei-grad> but in openldap seems the only first
 321 2010-06-14T20:37:21  <ThomasWaldmann> so it is expensive by default?
 322 2010-06-14T20:37:40  * ThomasWaldmann wonders
 323 2010-06-14T20:37:58  <ThomasWaldmann> waldi: ?
 324 2010-06-14T20:39:31  <ThomasWaldmann> ei-grad: are you communicating with the openldap guys, on irc?
 325 2010-06-14T20:39:46  <ThomasWaldmann> i guess they could much better answer such stuff
 326 2010-06-14T20:39:50  <ei-grad> yes, them recomended me to look in nis.schema just now
 327 2010-06-14T20:40:04  <ei-grad> s/them/they/
 328 2010-06-14T20:40:44  <ThomasWaldmann> and there you find that groups have member lists?
 329 2010-06-14T20:41:35  <waldi> ThomasWaldmann: si?
 330 2010-06-14T20:41:44  <ThomasWaldmann> ldap questions ^^
 331 2010-06-14T20:42:43  <waldi> ei-grad: okay. which questions do you want to answer?
 332 2010-06-14T20:43:56  <ei-grad> should i use memberOf attribute, assuming that it (or some like it) is used in most of LDAP installations?
 333 2010-06-14T20:44:46  <waldi> it is no attribute in any of the standard classes, so you can't
 334 2010-06-14T20:45:00  <waldi> but I asked a different question
 335 2010-06-14T20:45:58  <ei-grad> hm, nis.schema describes a posixAccount/posixGroup... iirc posixGroups don't support nested groups, right?
 336 2010-06-14T20:47:00  <waldi> nested groups are not mandated anywhere. so it is up to the application if they may work
 337 2010-06-14T20:55:30  <ei-grad> hm... thanks waldi, i think we can support nested groups for a schema used in AD, and btw we should provide support of some other features for AD (some like ignoring disabled accounts, that will find its place in the active directory config snippet)
 338 2010-06-14T21:01:14  <ei-grad> so, i think there should be a 2 different LDAPGroups implementations, one as an implementation of LazyGroupsBackend, and one with a support of nested groups, for those who are using memberOf (or such) attribute in their installations...
 339 2010-06-14T21:05:49  <ei-grad> and we should provide a complete featured config snippet for AD, with SSO, nested groups, disabled accounts, and anything else...
 340 2010-06-14T21:08:29  <ThomasWaldmann> yeah :)
 341 2010-06-14T21:16:49  <ei-grad> so, this week i will refactor LDAPGroups and LDAPAuth to use LDAPConnection (remembering about to be compatible with old-style ldap configs), and go back to finish TestLDAPGroups, i think excluding LDIF from slapd initialization will help me to pass my blocking in that direction, and then it would be easier to use it with GroupsBackendTests, which we could use for testing ADGroups...
 342 2010-06-14T21:18:39  <waldi> ei-grad: did you check that memberOf attribute provides this information?
 343 2010-06-14T21:19:08  <ei-grad> waldi: yes
 344 2010-06-14T21:20:34  <ei-grad> http://paste.pocoo.org/show/225410/
 345 2010-06-14T21:22:22  <ei-grad> *user1 is really in both of groups, if i remove him from MoinUsers, then a member attribute with a value equal to user1's dn will dissapear from MoinUsers
 346 2010-06-14T21:31:16  *** kursor has quit IRC
 347 2010-06-14T21:35:37  <waldi> ei-grad: you authenticated as which user?
 348 2010-06-14T21:36:21  <waldi> hmm, i can only read half the information ...
 349 2010-06-14T21:38:04  <waldi> no, memberof does not ascend into nested groups in my test
 350 2010-06-14T21:38:11  <waldi> a/as/des/
 351 2010-06-14T21:41:55  <waldi> http://paste.debian.net/hidden/c4f78bd8
 352 2010-06-14T21:42:04  *** grzywacz has joined #moin-dev
 353 2010-06-14T21:42:42  <ei-grad> hm? MoinAdmins.memberOf points to MoinUsers, that is all requred information to recognize, that MoinAdmins is a member of MoinUsers, and all users of MoinAdmins are the members of MoinUsers... what do you mean by 'descend into nested groups'?
 354 2010-06-14T21:45:35  <ei-grad> waldi: what is your test?
 355 2010-06-14T21:47:08  <ei-grad> MoinAdmins.memberOf points to MoinUsers, that is all requred information to recognize, that MoinAdmins is a member of MoinUsers, and all users of MoinAdmins are the members of MoinUsers, am i right? (sorry for my english)
 356 2010-06-14T21:49:15  <waldi> so again the question: what do you want to ask the ldap server. you speak about two implementations, which does the same but obscure differently
 357 2010-06-14T21:54:20  <ei-grad> in the first case we can ask a server for a 'member' attribute of a group entry, consisting a list of DNs of its members, and there are no 'memberOf' attribute in the member (users and, possibly, groups) entries... in that case, it is hard to recognize if the member is a user, or it is a nested group
 358 2010-06-14T21:54:51  <ei-grad> that seems to be a common way to implement groups in OpenLDAP installations
 359 2010-06-14T21:55:26  <ei-grad> i'm right?
 360 2010-06-14T21:56:37  <ei-grad> in the second case, we could ask a server for a 'memberOf' attribute of a user and group entries, and groups has the 'member' attribute, too
 361 2010-06-14T21:56:57  <ei-grad> that is how it done in Active Directory
 362 2010-06-14T21:57:25  <ei-grad> *how it is done
 363 2010-06-14T21:59:04  <ei-grad> in that way, we can get nested groups for a specified group by executing a query with a (&(objectClass=group)(memberOf=cn=Specified Group,dc=example,dc=org)) or such filter
 364 2010-06-14T21:59:11  <waldi> no, this is one step ahead. please first answer the question what you want to know. then how to achieve it
 365 2010-06-14T21:59:35  <waldi> no, you can't. member and memberOf are symetric
 366 2010-06-14T21:59:35  <ei-grad> i want to get nested groups for a specified group
 367 2010-06-14T22:00:10  <ei-grad> don't understand... i could
 368 2010-06-14T22:02:40  <ei-grad> hm
 369 2010-06-14T22:03:47  <ei-grad> http://paste.pocoo.org/show/225432/
 370 2010-06-14T22:04:34  <ei-grad> we got 'MoinAdmins' is a group, nested in 'MoinUsers'
 371 2010-06-14T22:05:08  <waldi> please document that in the wiki. i'm still not sure what you want to do and i'm not sure if you understand what you exactly want to do
 372 2010-06-14T22:14:59  <ei-grad> you think I don't understand correctly the behaviour of 'memberOf' attribute?
 373 2010-06-14T22:25:14  <waldi> ei-grad: yes, i do. or i imply that some specific behaviour of the attribute is needed to make proper use of it
 374 2010-06-14T22:48:25  <ThomasWaldmann> hah, found login problem
 375 2010-06-14T22:48:35  <ThomasWaldmann> or rather newaccount
 376 2010-06-14T22:56:14  <CIA-47> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 8308:c2d0c104e6c1 2.0-dev/MoinMoin/ (action/newaccount.py templates/newaccount.html): newaccount action: add ticket to template, emit error msg when checking the ticket fails
 377 2010-06-14T23:01:54  <dreimark> :)
 378 2010-06-14T23:03:12  <ThomasWaldmann> much better to test now :)
 379 2010-06-14T23:13:03  <ei-grad> waldi: http://moinmo.in/LDAP2010/2010-06-14
 380 2010-06-14T23:17:45  <ei-grad> Can I consider that it proved that I understand it?
 381 2010-06-14T23:25:29  <ei-grad> bbl
 382 2010-06-14T23:25:52  <CIA-47> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 8309:59cc6ae171be 2.0-dev/MoinMoin/ (7 files in 2 dirs): userprefs package: ticketing and url fixes
 383 2010-06-14T23:41:31  <waldi> ei-grad: it shows that you can't answer a question you don't know
 384 2010-06-14T23:55:12  <valeuf> waldi: what do you think is the best to handle style for the element in the dom tree ? having style attributes with kind of pesudo css syntax, or use different attributes for each kind of style we support ?
 385 2010-06-14T23:55:38  <valeuf> like to define the background color and the border size of an array we could have
 386 2010-06-14T23:56:13  <valeuf> 1. <table style="border-size:1; bg-color:#ccc"></table>
 387 2010-06-14T23:56:47  <valeuf> or 2. <table border-size="1" bg-color="#ccc"> </table>
 388 2010-06-14T23:57:09  <valeuf> or 3. Do you think we should avoid to have style definition in the Dom Tree ?
 389 2010-06-14T23:58:09  <CIA-47> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 8310:9fcad70acbb5 2.0-dev/MoinMoin/ (19 files in 7 dirs): action urls: use do=... not action=..., 'modify' instead of 'edit'

MoinMoin: MoinMoinChat/Logs/moin-dev/2010-06-14 (last edited 2010-06-13 22:45:02 by IrcLogImporter)