IRC log of #schooltool for Friday, 2008-02-08

*** fsufitch has joined #schooltool01:10
*** didymo has joined #schooltool01:51
*** th1a has joined #schooltool04:29
*** didymo has quit IRC05:04
*** pcardune has quit IRC05:59
*** subir has joined #schooltool06:52
*** th1a has quit IRC10:21
*** ignas has joined #schooltool11:47
*** subir has quit IRC13:08
*** pcardune has joined #schooltool13:20
*** fsufitch has quit IRC13:22
*** alga has joined #SchoolTool14:46
*** aelkner has quit IRC15:11
*** th1a has joined #schooltool15:17
*** alga has quit IRC16:11
*** wbrady has joined #schooltool16:22
*** aelkner__ has joined #schooltool16:26
*** wbrady has quit IRC16:54
*** wjohnsto has joined #schooltool17:12
aelkner__ignas?17:45
ignasaelkner__: yes?17:48
aelkner__could you please explain the part of your note about messages?17:48
aelkner__what do i need to do17:48
aelkner__to have my own messages?17:48
pcardunewjohnsto: we should be talking here I think17:48
wjohnstook17:49
ignasaelkner__: look at the definition of schooltool message17:49
ignascopy it into your module17:49
ignasand change "schooltool"17:49
ignasinto "schooltool.sla"17:49
aelkner__and that's it?17:50
ignasand name it SlaMessage17:50
ignasand use it everywhere17:50
ignasinstead of the schooltool one17:50
ignasoh - and in templates, replace domain="schooltool" with domain="schooltool.sla"17:50
aelkner__and i need to use schooltool.sla as my domain name for all the zcml files, right?17:50
ignasyes17:50
aelkner__is that it?17:51
wjohnstoI am not sure that I am changing the correct files in the necessary places17:51
aelkner__ignas: thanks17:51
*** mgedmin has joined #schooltool17:51
wjohnstopcardune: I believe the two files are event.pt and event_add.pt17:51
pcardunewjohnsto: those sound right17:52
pcardunewjohnsto: are your changes showing up? in the generated html?17:52
wjohnstowhen I click the link to "edit event" I think the event_add template is used17:52
wjohnstopcardune: well, it still  has the link to the schooltool calendar in the form action17:54
pcardunewjohnsto: if you aren't sure that you are using the right template, just put some code you know will show up and look for that17:55
pcarduneif it is not there, then yeah, you are using the wrong template17:55
wjohnstopcardune: ok, I am sure that I am using the correct template18:06
wjohnstohowever, specifying the next_url does not seem to be working18:07
wjohnstoperhaps I am putting it in the wrong places18:07
wjohnstoI specified the next_url right before the edit event link, and also in the controls in the event_add.pt18:09
*** jelkner has joined #schooltool18:34
*** jelkner has quit IRC18:36
aelkner__i have a question about the interface "casting" syntax for adapters18:42
aelkner__saying IMyInterface(some_object) will invoke the adapter that adapts some_object to IMyIntercace18:43
aelkner__but how about IMyInterface(one_object, another_object)?18:43
ignaswill return the another_object if the adapter is not found18:43
aelkner__i registered an a multi-adapter of two interfaces to a third18:43
ignasjust like IFoo(something, None)18:43
ignasthe second parameter is the default=...18:44
aelkner__i noticed that18:44
ignasqueryMultiAdapter and getMultiAdapter is what you need18:44
aelkner__does that mean one has to use the zope queryAdapter method to get multi-adapters?18:44
aelkner__oh, you just answered that18:45
aelkner__i was afraid of that, but thanks18:45
*** jelkner has joined #schooltool19:02
wjohnstopcardune: ayt?19:06
pcardunewjohnsto: did you add code to handle the next_url parameter?19:09
wjohnstopcardune: well, i am looking at the view for editing an event19:10
wjohnstoand I have found the function that handles next_url19:10
wjohnsto"def nexturl()"19:11
pcarduneso is it doing what you think it's supposed to do?19:13
pcarduneand is it ever being called?19:13
wjohnstofrom what it looks like19:13
wjohnstoI mean19:13
wjohnstoit gets called when you hit update or cancel19:13
wjohnstoand it redirects you to "self.request.get(next_url)19:14
wjohnsto"19:14
wjohnstoor "self.request.get('next_url', none)"19:14
wjohnstoperhaps next_url never gets defined19:14
wjohnstopcardune: but I would think that when you initially clicked on the "edit event" link it would still keep the person/[user]/calendar in the url19:15
wjohnstobut that changes19:15
pcarduneright, because it accesses the event from a global space... it wouldn't be bad if that changed using traversers (but the traverser solution is a little more complicated to understand)19:16
wjohnstoin other words, it directs you to where you would be if you wanted to edit an event from the schooltool calendar19:17
pcardunewjohnsto: try putting in a pdb trace and see what is going on19:17
wjohnstook19:17
ignasis there a <hidden> element that keeps the value of next_url in the form?19:18
ignasso it would get posted after you hit "Update"19:18
*** aelkner__ has quit IRC19:18
wjohnstoyes19:21
ignasthen try using pdb19:24
wjohnstook pcardune:19:40
wjohnstoit looks like19:40
wjohnstowhen I call self.request.get('next_url') there is no next_url19:41
*** jelkner has quit IRC19:41
pcardunetry self.request.has_key('next_url')19:41
wjohnstoso it skips to return absoluteURL(self.context.__parent__, self.request)19:41
wjohnstoFalse19:41
pcardunedid you put the hidden element inside the form tag?19:41
wjohnstoyea19:41
*** th1a_ has joined #schooltool19:48
*** aelkner__ has joined #schooltool19:48
wjohnstopcardune: it seems like "<input type="hidden" tal:condition="request/next_url|nothing" tal:attributes="value request/next_url" name="next_url" />" is not actually keeping a value19:52
wjohnstoI have it in the form in the page template for editing an event19:52
wjohnstoand I have it in the template where the link to edit an event is19:53
pcardunewhat is the url of the page with the form?19:53
wjohnstohttp://localhost:7080/calendar/MjAwODAyMDgxNTA2MDkuMTEwOTkuNTYwMTEuMTUyMzEwLjYxMjgzMzJAYW50ZWM%3D/edit.html?date=2008-02-0819:54
ignasemm and where is the next_url ?19:54
wjohnstoI also assigned a specific next_url19:54
ignasso what is the full url?19:54
wjohnstothat is it19:54
wjohnstoin the link to "edit event" I have "tal:attributes="href string:${context/@@absolute_url}/edit.html?next_url=${request/url}""19:56
wjohnstopcardune: so I don't know.  I guess the link to edit an event is not getting a value for next_url19:58
pcarduneare you editing the right page template? or the right link?19:59
pcardunetry putting the next_url into the url manually20:00
pcarduneand see what you get20:00
pcardunelike literally type it into firefox20:00
wjohnstoit still doesnt work20:05
wjohnstopcardune: ping20:05
pcardunewjohnsto: ?20:05
wjohnstothis is just frustrating20:05
wjohnstoI can see exactly where the link it defined, but if I change it nothing happens20:06
wjohnstobut that has to be the link because if I get rid of it20:06
wjohnstothere are errors20:06
wjohnstoor, maybe it doesnt20:10
*** alga has joined #SchoolTool20:11
pcardunewjohnsto: unfortunately, I can assure you that the computer is doing exactly what you tell it to do... you are just telling it wrong20:12
wjohnstohaha20:12
wjohnstoI know20:12
wjohnstoit must be the wrong link20:13
wjohnstoso i'll see if I can find out exactly where the link is :\20:13
wjohnstopcardune: thanks for the help20:16
pcarduneits more like moral support, but your welcome20:17
*** wjohnsto has left #schooltool20:20
*** ignas has quit IRC20:23
*** r1v3r has joined #schooltool20:43
*** alga has quit IRC21:02
*** mgedmin has quit IRC21:05
*** mgedmin has joined #schooltool21:26
*** r1v3r has left #schooltool21:31
*** ignas has joined #schooltool22:02
*** aelkner__ has quit IRC22:15
*** mgedmin has quit IRC23:06
*** pcardune is now known as pcardune_away23:25

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!