IRC log of #schooltool for Thursday, 2008-03-20

*** mgedmin has joined #schooltool00:04
*** didymo has quit IRC00:11
*** andrew_ has quit IRC00:18
*** andrew_ has joined #schooltool00:18
*** andrew_ has quit IRC00:38
*** andrew_ has joined #schooltool00:38
fsufitchignas: i'm having issues with the parents00: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
ignasself.context ?00:40
fsufitchself being CalendarViewletBase00:40
fsufitchuhh00:40
fsufitchlet's se00:40
fsufitch*see00:40
fsufitch(Pdb) self.context00: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
fsufitchnope00:41
ignasself.view ?00:42
fsufitchattr. error00:42
ignasself.manager00:42
fsufitch(Pdb) self.manager00: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
fsufitchis this what i want?00:42
ignasyes00:43
fsufitchumm00:43
fsufitchbut it's a simpleview class00:43
ignasit's a proxy00:43
fsufitchit doesn't give me a CalendarBaseView to work with00:43
fsufitchoh?00:43
ignaswrapper around DailyCalendarView00:43
ignasand DailyCalendarView inherits the base00:44
fsufitchok00:44
fsufitchso i fi ask it for something the base has00:44
fsufitchit will provide?00:44
fsufitchoh apparently it does00:44
fsufitchcool00:44
fsufitchignas: allrighty, it's fixed now00:47
*** andrew_ has quit IRC00:52
Lumierehow goes guys?00:52
*** mgedmin has quit IRC00:52
fsufitchLumiere: great fun00:57
fsufitchignas: i think i almost have the legend working as a viewlet00:59
ignasneat01:00
*** andrew_ has joined #schooltool01:00
*** nitromaster has joined #schooltool01:14
*** andrew_ has quit IRC01:19
fsufitchignas: i have an issue...01:32
ignasfsufitch: yes01:32
fsufitcheither 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 terms01:32
ignascan you come over here01:34
ignasand show me01:34
fsufitchit's being rendered before the calendar01:34
ignasas in - not with the other viewlets?01:34
fsufitchyes with the other viewlets01:34
fsufitchbut see01:34
fsufitchi put a print "FOO" in the viewlet01:34
ignas:D01:34
fsufitchand a print "RENDER" in the renderRow() of the calendar01:35
fsufitchand it goes01:35
fsufitchFOO RENDER RENDER RENDER RENDER ...01:35
ignaswell - the order of code does not matter so much01:35
fsufitchfor it to work it needs to go01:35
fsufitchRENDER RENDER RENDER RENDER FOO01:35
fsufitchbecause as it's rendering it fills up the dictionary of terms01:35
ignaswell - you will have to make it order independent01:35
fsufitch*sigh*01:35
ignasor01:35
fsufitchso maybe a prerendering thing?01:35
ignasrender in the __init__01:36
fsufitchhmm01:36
ignasor somewhere in __call__01:36
fsufitchrender is renderRow() though01:36
fsufitchand is called for every row of the tables01:36
ignashmm01:36
ignaslet me think a bit01:36
fsufitchaka each week01:36
fsufitchthat's why it's saying RENDER multiple times01:37
fsufitchsee: def renderRow(self, week, month):01:37
fsufitchi guess i can obtain the calendar then prerender everything in the __init__01:38
ignasnot too good :/01:38
ignaswhat you will have to do is:01:38
fsufitchwhy is it not too good?01:38
fsufitchi dont need to render it again01:38
fsufitchi just put it in a dictionary accessible later01:39
ignasbecause it makes unit testing the view close to impossible01:39
fsufitchthe page temeplate barely has to change01:39
ignasand it has a lot of unit tests01:39
ignasadd a method "termLegend"01:39
ignasthat returns a list of terms with colors assigned to it01:39
fsufitchthat goes thru and counts up stuff?01:39
ignasnot through01:39
ignasyou only have to:01:39
ignasget all terms from app['terms']01:39
ignasfilter out terms that a re not in the year being displayed01:40
ignasi think the view should provide you with the date range01:40
ignasthat it is showing01:40
fsufitchmm01:40
ignassort these terms by term.last01:40
ignasor term.first01:40
ignasassign colors to them01:40
ignasand use this legend both when rendering the view01:41
ignasand when displaying the legend01:41
fsufitchhmm01:41
fsufitchhow is that any better than doing all the rendering beforehand though?01:41
ignaswell - you can create a YearlyView class without setting everything up first01:43
ignasand keeps things more separated01:43
ignasas in - legend does not break if you change rendering code01:43
ignaslegend should not depend on rendering code01:43
fsufitchook01:43
ignasrendering code should pick colors according to the legend01:43
fsufitchah01:44
fsufitchright now rendering code builds a legend according to what it meets01:44
fsufitchignas: no, i have no way of finding out what year i'm supposed to show01:56
fsufitchat least not in the init01:56
fsufitchthe viewbase always needs a day specified01:58
ignasso01:59
ignasyou have a function01:59
fsufitchneeever mind01:59
fsufitchfound stuff02:00
fsufitchthere's an update() function that makes a self.cursor which is a day which i can stick into the various methods02:00
*** mattva01 has quit IRC02:06
fsufitchignas: hey, guess what02:11
fsufitchit works!02:11
ignas:)02:12
fsufitchignas: and umm... are students supposed to be able to log in using the sample data?02:12
fsufitchwait nvm it works02:12
fsufitchi jus tthought it was broken for a sec02:13
fsufitchand ignas02:14
fsufitchwhy are students now allowed to view other students anymore?02:14
*** aelkner has quit IRC02:14
fsufitchactually hang on, i'm coming back into the room02:14
*** fsufitch has quit IRC02:32
*** nitromaster has quit IRC02:36
*** eldar has joined #schooltool02:41
*** eldar|away has quit IRC02:41
*** fsufitch has joined #schooltool02:44
*** jelkner has quit IRC02:50
*** ccarey has quit IRC02:51
*** wjohnsto has quit IRC02:56
*** fsufitch has quit IRC02:57
*** th1a_ has quit IRC03:07
*** eldar has left #schooltool03:08
*** ignas has quit IRC03:12
*** mattva01 has joined #schooltool04:25
*** lisppaste5 has quit IRC07:28
*** lisppaste5 has joined #schooltool07:30
*** mattva01 has quit IRC09:41
*** ignas has joined #schooltool15:36
*** th1a_ has joined #schooltool15:48
*** th1a_ has quit IRC16:15
*** ignas has quit IRC17:02
*** pcardune has joined #schooltool17:42
*** pcardune has quit IRC17:46
*** pcardune has joined #schooltool17:47
* Lumiere is testing buildout, fail17:58
Lumiereok18:01
Lumiereth1a: ayt?18:01
*** pcardune_ has joined #schooltool18:02
*** pcardune has quit IRC18:02
*** pcardune has joined #schooltool18:07
*** pcardune_ has quit IRC18:07
Lumierehi pcardune18:14
*** mgedmin has joined #schooltool18:17
*** pcardune_ has joined #schooltool21:01
*** pcardune has quit IRC21:19
*** pcardune has joined #schooltool21:33
*** pcardune_ has quit IRC21:33
*** mgedmin has quit IRC21:42
*** eldar has joined #schooltool22:00
*** pcardune_ has joined #schooltool22:09
*** pcardune has quit IRC22:09
*** pcardune has joined #schooltool22:10
*** pcardune_ has quit IRC22:10
*** pcardune has quit IRC22:13
*** pcardune has joined #schooltool22:13
*** pcardune_ has joined #schooltool22:23
*** pcardune__ has joined #schooltool22:25
*** pcardune_ has quit IRC22:25
*** pcardune has quit IRC22:26
*** pcardune has joined #schooltool22:27
*** pcardune__ has quit IRC22:27
*** pcardune_ has joined #schooltool22:29
*** pcardune__ has joined #schooltool22:31
*** pcardune has quit IRC22:31
*** pcardune has joined #schooltool22:33
*** pcardune__ has quit IRC22:33
*** pcardune_ has quit IRC22:34
*** th1a_ has joined #schooltool22:39
*** lisppaste5 has quit IRC22:54
*** lisppaste5 has joined #schooltool22:55
*** th1a_ has quit IRC23:00
*** didymo has joined #schooltool23:05
*** pcardune has quit IRC23:08
*** eldar has left #schooltool23:41

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