*** mgedmin has joined #schooltool | 00:04 | |
*** didymo has quit IRC | 00:11 | |
*** andrew_ has quit IRC | 00:18 | |
*** andrew_ has joined #schooltool | 00:18 | |
*** andrew_ has quit IRC | 00:38 | |
*** andrew_ has joined #schooltool | 00:38 | |
fsufitch | ignas: i'm having issues with the parents | 00:40 |
---|---|---|
fsufitch | (Pdb) self.__parent__ | 00:40 |
fsufitch | <schooltool.app.cal.Calendar object at 0x40ec79ec> | 00:40 |
fsufitch | (Pdb) self.__parent__.__parent__ | 00:40 |
fsufitch | <schooltool.basicperson.person.BasicPerson object at 0x40ec77ec> | 00:40 |
ignas | self.context ? | 00:40 |
fsufitch | self being CalendarViewletBase | 00:40 |
fsufitch | uhh | 00:40 |
fsufitch | let's se | 00:40 |
fsufitch | *see | 00:40 |
fsufitch | (Pdb) self.context | 00:41 |
fsufitch | <schooltool.app.cal.Calendar object at 0x40ec79ec> | 00:41 |
fsufitch | (Pdb) self.context.__parent__ | 00:41 |
fsufitch | <schooltool.basicperson.person.BasicPerson object at 0x40ec77ec> | 00:41 |
fsufitch | nope | 00:41 |
ignas | self.view ? | 00:42 |
fsufitch | attr. error | 00:42 |
ignas | self.manager | 00:42 |
fsufitch | (Pdb) self.manager | 00:42 |
fsufitch | <zope.viewlet.manager.<ViewletManager providing ICalendarPortletViewletManager> object at 0xa1059cc> | 00:42 |
fsufitch | (Pdb) self.manager.__parent__ | 00:42 |
fsufitch | <zope.app.pagetemplate.simpleviewclass.SimpleViewClass from /home/fsufitch/schooltool/src/schooltool/app/browser/templates/cal_daily.pt object at 0x879ecec> | 00:42 |
fsufitch | is this what i want? | 00:42 |
ignas | yes | 00:43 |
fsufitch | umm | 00:43 |
fsufitch | but it's a simpleview class | 00:43 |
ignas | it's a proxy | 00:43 |
fsufitch | it doesn't give me a CalendarBaseView to work with | 00:43 |
fsufitch | oh? | 00:43 |
ignas | wrapper around DailyCalendarView | 00:43 |
ignas | and DailyCalendarView inherits the base | 00:44 |
fsufitch | ok | 00:44 |
fsufitch | so i fi ask it for something the base has | 00:44 |
fsufitch | it will provide? | 00:44 |
fsufitch | oh apparently it does | 00:44 |
fsufitch | cool | 00:44 |
fsufitch | ignas: allrighty, it's fixed now | 00:47 |
*** andrew_ has quit IRC | 00:52 | |
Lumiere | how goes guys? | 00:52 |
*** mgedmin has quit IRC | 00:52 | |
fsufitch | Lumiere: great fun | 00:57 |
fsufitch | ignas: i think i almost have the legend working as a viewlet | 00:59 |
ignas | neat | 01:00 |
*** andrew_ has joined #schooltool | 01:00 | |
*** nitromaster has joined #schooltool | 01:14 | |
*** andrew_ has quit IRC | 01:19 | |
fsufitch | ignas: i have an issue... | 01:32 |
ignas | fsufitch: yes | 01:32 |
fsufitch | either the viewlet is being rendered before the calendar itself, or being rendered with another instance of the view class, because it's not seeing any of the terms | 01:32 |
ignas | can you come over here | 01:34 |
ignas | and show me | 01:34 |
fsufitch | it's being rendered before the calendar | 01:34 |
ignas | as in - not with the other viewlets? | 01:34 |
fsufitch | yes with the other viewlets | 01:34 |
fsufitch | but see | 01:34 |
fsufitch | i put a print "FOO" in the viewlet | 01:34 |
ignas | :D | 01:34 |
fsufitch | and a print "RENDER" in the renderRow() of the calendar | 01:35 |
fsufitch | and it goes | 01:35 |
fsufitch | FOO RENDER RENDER RENDER RENDER ... | 01:35 |
ignas | well - the order of code does not matter so much | 01:35 |
fsufitch | for it to work it needs to go | 01:35 |
fsufitch | RENDER RENDER RENDER RENDER FOO | 01:35 |
fsufitch | because as it's rendering it fills up the dictionary of terms | 01:35 |
ignas | well - you will have to make it order independent | 01:35 |
fsufitch | *sigh* | 01:35 |
ignas | or | 01:35 |
fsufitch | so maybe a prerendering thing? | 01:35 |
ignas | render in the __init__ | 01:36 |
fsufitch | hmm | 01:36 |
ignas | or somewhere in __call__ | 01:36 |
fsufitch | render is renderRow() though | 01:36 |
fsufitch | and is called for every row of the tables | 01:36 |
ignas | hmm | 01:36 |
ignas | let me think a bit | 01:36 |
fsufitch | aka each week | 01:36 |
fsufitch | that's why it's saying RENDER multiple times | 01:37 |
fsufitch | see: def renderRow(self, week, month): | 01:37 |
fsufitch | i guess i can obtain the calendar then prerender everything in the __init__ | 01:38 |
ignas | not too good :/ | 01:38 |
ignas | what you will have to do is: | 01:38 |
fsufitch | why is it not too good? | 01:38 |
fsufitch | i dont need to render it again | 01:38 |
fsufitch | i just put it in a dictionary accessible later | 01:39 |
ignas | because it makes unit testing the view close to impossible | 01:39 |
fsufitch | the page temeplate barely has to change | 01:39 |
ignas | and it has a lot of unit tests | 01:39 |
ignas | add a method "termLegend" | 01:39 |
ignas | that returns a list of terms with colors assigned to it | 01:39 |
fsufitch | that goes thru and counts up stuff? | 01:39 |
ignas | not through | 01:39 |
ignas | you only have to: | 01:39 |
ignas | get all terms from app['terms'] | 01:39 |
ignas | filter out terms that a re not in the year being displayed | 01:40 |
ignas | i think the view should provide you with the date range | 01:40 |
ignas | that it is showing | 01:40 |
fsufitch | mm | 01:40 |
ignas | sort these terms by term.last | 01:40 |
ignas | or term.first | 01:40 |
ignas | assign colors to them | 01:40 |
ignas | and use this legend both when rendering the view | 01:41 |
ignas | and when displaying the legend | 01:41 |
fsufitch | hmm | 01:41 |
fsufitch | how is that any better than doing all the rendering beforehand though? | 01:41 |
ignas | well - you can create a YearlyView class without setting everything up first | 01:43 |
ignas | and keeps things more separated | 01:43 |
ignas | as in - legend does not break if you change rendering code | 01:43 |
ignas | legend should not depend on rendering code | 01:43 |
fsufitch | ook | 01:43 |
ignas | rendering code should pick colors according to the legend | 01:43 |
fsufitch | ah | 01:44 |
fsufitch | right now rendering code builds a legend according to what it meets | 01:44 |
fsufitch | ignas: no, i have no way of finding out what year i'm supposed to show | 01:56 |
fsufitch | at least not in the init | 01:56 |
fsufitch | the viewbase always needs a day specified | 01:58 |
ignas | so | 01:59 |
ignas | you have a function | 01:59 |
fsufitch | neeever mind | 01:59 |
fsufitch | found stuff | 02:00 |
fsufitch | there's an update() function that makes a self.cursor which is a day which i can stick into the various methods | 02:00 |
*** mattva01 has quit IRC | 02:06 | |
fsufitch | ignas: hey, guess what | 02:11 |
fsufitch | it works! | 02:11 |
ignas | :) | 02:12 |
fsufitch | ignas: and umm... are students supposed to be able to log in using the sample data? | 02:12 |
fsufitch | wait nvm it works | 02:12 |
fsufitch | i jus tthought it was broken for a sec | 02:13 |
fsufitch | and ignas | 02:14 |
fsufitch | why are students now allowed to view other students anymore? | 02:14 |
*** aelkner has quit IRC | 02:14 | |
fsufitch | actually hang on, i'm coming back into the room | 02:14 |
*** fsufitch has quit IRC | 02:32 | |
*** nitromaster has quit IRC | 02:36 | |
*** eldar has joined #schooltool | 02:41 | |
*** eldar|away has quit IRC | 02:41 | |
*** fsufitch has joined #schooltool | 02:44 | |
*** jelkner has quit IRC | 02:50 | |
*** ccarey has quit IRC | 02:51 | |
*** wjohnsto has quit IRC | 02:56 | |
*** fsufitch has quit IRC | 02:57 | |
*** th1a_ has quit IRC | 03:07 | |
*** eldar has left #schooltool | 03:08 | |
*** ignas has quit IRC | 03:12 | |
*** mattva01 has joined #schooltool | 04:25 | |
*** lisppaste5 has quit IRC | 07:28 | |
*** lisppaste5 has joined #schooltool | 07:30 | |
*** mattva01 has quit IRC | 09:41 | |
*** ignas has joined #schooltool | 15:36 | |
*** th1a_ has joined #schooltool | 15:48 | |
*** th1a_ has quit IRC | 16:15 | |
*** ignas has quit IRC | 17:02 | |
*** pcardune has joined #schooltool | 17:42 | |
*** pcardune has quit IRC | 17:46 | |
*** pcardune has joined #schooltool | 17:47 | |
* Lumiere is testing buildout, fail | 17:58 | |
Lumiere | ok | 18:01 |
Lumiere | th1a: ayt? | 18:01 |
*** pcardune_ has joined #schooltool | 18:02 | |
*** pcardune has quit IRC | 18:02 | |
*** pcardune has joined #schooltool | 18:07 | |
*** pcardune_ has quit IRC | 18:07 | |
Lumiere | hi pcardune | 18:14 |
*** mgedmin has joined #schooltool | 18:17 | |
*** pcardune_ has joined #schooltool | 21:01 | |
*** pcardune has quit IRC | 21:19 | |
*** pcardune has joined #schooltool | 21:33 | |
*** pcardune_ has quit IRC | 21:33 | |
*** mgedmin has quit IRC | 21:42 | |
*** eldar has joined #schooltool | 22:00 | |
*** pcardune_ has joined #schooltool | 22:09 | |
*** pcardune has quit IRC | 22:09 | |
*** pcardune has joined #schooltool | 22:10 | |
*** pcardune_ has quit IRC | 22:10 | |
*** pcardune has quit IRC | 22:13 | |
*** pcardune has joined #schooltool | 22:13 | |
*** pcardune_ has joined #schooltool | 22:23 | |
*** pcardune__ has joined #schooltool | 22:25 | |
*** pcardune_ has quit IRC | 22:25 | |
*** pcardune has quit IRC | 22:26 | |
*** pcardune has joined #schooltool | 22:27 | |
*** pcardune__ has quit IRC | 22:27 | |
*** pcardune_ has joined #schooltool | 22:29 | |
*** pcardune__ has joined #schooltool | 22:31 | |
*** pcardune has quit IRC | 22:31 | |
*** pcardune has joined #schooltool | 22:33 | |
*** pcardune__ has quit IRC | 22:33 | |
*** pcardune_ has quit IRC | 22:34 | |
*** th1a_ has joined #schooltool | 22:39 | |
*** lisppaste5 has quit IRC | 22:54 | |
*** lisppaste5 has joined #schooltool | 22:55 | |
*** th1a_ has quit IRC | 23:00 | |
*** didymo has joined #schooltool | 23:05 | |
*** pcardune has quit IRC | 23:08 | |
*** eldar has left #schooltool | 23:41 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!