**** BEGIN LOGGING AT Thu Jul 1 11:42:19 2004 | ||
-->You are now talking on #schooltool | 11:42 | |
---SteveA|way is now known as SteveA | 12:20 | |
---You are now known as mgedmin|lunch | 14:55 | |
---Disconnected (Connection timed out). | 16:12 | |
**** ENDING LOGGING AT Thu Jul 1 16:12:30 2004 | ||
**** BEGIN LOGGING AT Thu Jul 1 17:44:00 2004 | ||
-->You are now talking on #schooltool | 17:44 | |
-->th1a (~hoffman@pool-64-222-39-13.prov.east.verizon.net) has joined #schooltool | 18:20 | |
th1a | Maurius, what's the timeframe for finishing the current SchoolTool contract? | 18:52 |
---|---|---|
SteveA | th1a: I asked them to hold off on it until you'd come on board. (They've had other stuff to do). But, it turns out there's not much left to do. | 19:01 |
SteveA | I'll dig out that information about schooltool budgets | 19:01 |
th1a | Thanks. | 19:02 |
-->spacedman (~rowlings@fyb028000002.lancs.ac.uk) has joined #schooltool | 19:08 | |
spacedman | hi guys | 19:08 |
th1a | Hello. | 19:09 |
SteveA | hi | 19:09 |
spacedman | is there code in the schooltool release that can build ical files from events? | 19:15 |
spacedman | i think that sums up what i've been trying to do today :) | 19:15 |
th1a | Trying to do it with SchoolTool or in something you're writing? | 19:15 |
spacedman | in something i'm writing. | 19:15 |
spacedman | the ical format looks easy enough to sort out anyway... | 19:15 |
th1a | I think the answer is yes. Have you poked around the SchoolTool source? | 19:15 |
*SteveA pings mgedmin | 19:15 | |
spacedman | found the VEvent class in cal.py.. and there's some stuff in views/cal.py as well... | 19:15 |
mgedmin | pong | 19:18 |
mgedmin | iirc views/cal.py does that | 19:19 |
th1a | I'm not one of the developers (yet), but I need to learn this stuff, too, so I'll play along here... | 19:21 |
th1a | So you have an event object in your app that you want to output in iCal? | 19:21 |
spacedman | mmm kinda, i may have a folder of events, or a catalog search that returns a bunch of events, and i'd like a url that returns and ical file of them. this is all in plone, but the guys on #plone are in a funny mood at the moment... steve pointed me here... | 19:24 |
th1a | Oh. Plone events. | 19:24 |
th1a | Well, it looks like do_GET under CalendarReadView uses pretty straightforward string replacement to build the iCal file. | 19:30 |
spacedman | mm yeah, but probably customised plone events... | 19:30 |
th1a | I think views/cal.py should get you started writing a Python script for Plone. | 19:32 |
SteveA | th1a: maybe you should register #schooltool with ChanServ | 19:32 |
spacedman | yeah, i'm surprised so much schooltool-specific stuff is coded in there, thought the ics functionality might have been abstracted out. | 19:32 |
th1a | I'm an IRC newbie. What's ChanServ? | 19:34 |
th1a | It looks like actually building the iCal file is so simple there isn't much point in abstracting it out. | 19:35 |
SteveA | /msg ChanServ HELP | 19:36 |
SteveA | /msg ChanServ help register | 19:36 |
spacedman | fairynuff | 19:36 |
SteveA | you'll probably want to register you name with NickServ first, though, so you can be authenticated on irc | 19:36 |
spacedman | but spose someone decides they want a different calendar format... how many things need editing? oh well, you've got to have something to refactor i spose :) | 19:37 |
th1a | One thing I haven't figured out is how SchoolTool handles requests for different content-type views of the same object. | 19:38 |
th1a | Which is what you're asking about, right? | 19:39 |
spacedman | ummm not sure.... | 19:40 |
th1a | I'm expecting an actual BOOK in the mail about IRC today. That should get me up to speed on these IRC issues. | 19:40 |
th1a | Well, it isn't directly relevant to your immediate needs anyhow. | 19:40 |
spacedman | indeed :) | 19:47 |
spacedman | i shall go look for python/libical bindings or something... | 19:48 |
SteveA | spacedman: if you get something working, can you post a brief message to the schooltool list? | 19:52 |
SteveA | it will be good to tell others about using parts of schooltool outside of schooltool itself. | 19:52 |
spacedman | mm okay | 19:55 |
spacedman | not sure it will use any schooltool code though, i can probably do it with ZPTs | 19:55 |
SteveA | you don't have to actually sign up to the list. I or tom will arrange for the post to get through. | 19:55 |
SteveA | ok, only if you actually use schooltool code. | 19:55 |
spacedman | i see the schooltool code is being used in the PloneiCalendar product, but thats the ics parser | 19:56 |
SteveA | oh, cool. I spoke to alan runyan about that a while ago, but I didn't know if they were actually using it or not | 19:57 |
th1a | Can you use a page template for something that isn't XML? | 20:00 |
spacedman | hmmm i think you can... i think i wrote a product that spits out a CSV file for some data.... | 20:02 |
mgedmin | you can if you're careful enough | 20:03 |
spacedman | yeah, the page template just spits out whatever you want it to. | 20:03 |
spacedman | blank lines are a problem... | 20:03 |
spacedman | and you have to set the content type: <metal:block tal:define="dummy python:request.RESPONSE.setHeader('Content-Type', 'text/plain')" />< | 20:03 |
th1a | So a Python script might be easier. | 20:06 |
mgedmin | it was ;) | 20:07 |
mgedmin | the reason we did it in a very schooltool-specific way was because we were using XP | 20:07 |
mgedmin | write the simplest thing that works, refactor it into more abstract and reusable code later | 20:07 |
spacedman | you guys are the experts :) i guess if i want to use the code in a slightly different guise i'd have to refactor it for you first! We all win! | 20:09 |
mgedmin | ;) | 20:13 |
th1a | If we did need another view, say for the XML version of iCal, where would that be added? | 20:14 |
*spacedman leaves the schooltool ppl and wishes them well.... | 20:32 | |
<--spacedman (~rowlings@fyb028000002.lancs.ac.uk) has left #schooltool ("Client Exiting") | 20:32 | |
mgedmin | views/cal.py I think | 20:36 |
th1a | It would be a new class implementing a new interface? | 20:48 |
mgedmin | probably | 20:56 |
mgedmin | on hindsight I decided that switching representations according to the HTTP accept: header wasn't a very good idea | 20:56 |
th1a | So what is the better way? | 21:13 |
mgedmin | different urls for different representations | 21:14 |
th1a | Yeah. | 21:14 |
th1a | Different URL's for different representations can become confusing when you're identifying everything by a URL, however. | 21:15 |
mgedmin | yes | 21:16 |
mgedmin | still, /path/to/object?format=xml is more explicit than http headers | 21:16 |
th1a | Oh. Using a query string. | 21:16 |
mgedmin | expecially when mozilla says that it prefers text/xml to text/html | 21:16 |
th1a | Hm... | 21:17 |
th1a | Right now, it the accept: stuff handled by Twisted code? | 21:18 |
th1a | I could never track that down when I was thinking about doing RDF views. | 21:19 |
mgedmin | no, we handle accept: by ourselves | 21:20 |
mgedmin | in schooltool.main | 21:20 |
th1a | Aha. There it is. | 21:21 |
<--SteveA has quit (bear.freenode.net irc.freenode.net) | 21:30 | |
th1a | If Mozilla prefers text/xml to text/html, that's a pretty serious problem, isn't it? | 21:31 |
mgedmin | we have a workaround | 21:31 |
th1a | A Mozilla-specific workaround? Detect the user-agent? | 21:32 |
-->SteveA (~steve@adsl-213-190-44-43.takas.lt) has joined #schooltool | 21:32 | |
mgedmin | ues | 21:33 |
mgedmin | certain views have a method called chooseRepresentation | 21:33 |
mgedmin | e.g. | 21:33 |
mgedmin | look at TimetableContentNegotiation class | 21:34 |
th1a | So it sends Mozilla the html_template, if it exists? | 21:57 |
mgedmin | it sends Mozilla the html_template | 21:59 |
mgedmin | I do not remember any checking if it exists in the code | 21:59 |
mgedmin | html_template always exists in that context | 21:59 |
th1a | But if you ask for the root resource, for example, what you get is XML. | 22:09 |
mgedmin | yes | 22:12 |
mgedmin | that class is only used for timetable views | 22:13 |
mgedmin | it is up to the do_GET method of a view to decide if content type negotiation will happen or not | 22:13 |
th1a | OK. But it is going to end up being necessary throughout once more HTML views are written | 22:24 |
mgedmin | that is likely | 22:30 |
mgedmin | but I think it largely depends on the kind of html views that we do | 22:30 |
mgedmin | If we want to make schooltool a web app, I think it would be better to create a new view package | 22:31 |
mgedmin | and not fix RESTful xml views with unRESTful web app | 22:31 |
---Disconnected (). | 22:37 | |
**** ENDING LOGGING AT Thu Jul 1 22:37:35 2004 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!