*** povbot has joined #schooltool | 14:15 | |
*** ignas__ has joined #schooltool | 14:48 | |
*** ignas has quit IRC | 14:59 | |
pcardune | I am having a problem getting these RelationshipProperty's to work | 15:12 |
---|---|---|
pcardune | when I add something, a link is only made for one of the objects involved and not both | 15:13 |
*** pcardune has left #schooltool | 15:16 | |
mgedmin | oh? | 15:45 |
*** erchache has joined #schooltool | 15:55 | |
*** matiasV has joined #schooltool | 15:57 | |
erchache | hi | 16:00 |
povbot | /svn/commits: * gintas committed revision 4153: | 16:15 |
povbot | /svn/commits: Made the daily calendar PDF report a table, added unicode support. | 16:15 |
*** jinty has joined #schooltool | 16:37 | |
*** ignas__ is now known as ignas | 16:39 | |
*** gpaci has joined #schooltool | 18:18 | |
*** gpaci has left #schooltool | 18:20 | |
*** eldar has joined #schooltool | 18:29 | |
eldar | good morning | 18:29 |
mgedmin | good evening, eldar | 18:30 |
gintas | hi | 18:30 |
povbot | /svn/commits: * gintas committed revision 4154: | 18:32 |
povbot | /svn/commits: Made font path configurable, removed some unnecessary code. The code is not in a very good state yet, I want to make the dependency on ReportLab a soft one eventually. | 18:32 |
povbot | /svn/commits: * gintas committed revision 4155: | 18:43 |
povbot | /svn/commits: Put SchoolBell logo on the report. | 18:43 |
eldar | question | 18:49 |
mgedmin | request for clarification | 18:49 |
eldar | when you relate 2 objects, the relationship schema takes care of everything itself right? | 18:49 |
eldar | meaning, it'll just add some properties to the objects | 18:49 |
mgedmin | more or less, yes | 18:50 |
mgedmin | (the schema itself doesn't do much; everything happens within the relate method and the IRelationshipLinks adapter) | 18:50 |
mgedmin | however no properties on the objects are touched | 18:51 |
eldar | then how are they virtually related? | 18:51 |
mgedmin | if you use RelationshipProperty, then yes, that property will know about the relationship you just established | 18:51 |
eldar | something has to be recorded somewhere, right? | 18:51 |
mgedmin | yes | 18:51 |
mgedmin | the IRelationshipLinks adapter is responsible for storing relationship data | 18:51 |
mgedmin | the default one uses Zope 3 annotations | 18:51 |
mgedmin | 99% of annotatable objects in Zope 3 store the annotations in a dict in the __annotations__ attribute, IIRC | 18:52 |
eldar | so just making the objects annotable and relating them is all i have to do..? | 18:52 |
mgedmin | which is an implementation detail that you normally are not interested in | 18:52 |
mgedmin | yes, you just have to make objects annotatable | 18:52 |
eldar | cool | 18:52 |
eldar | thanks | 18:52 |
mgedmin | (and make sure the IAnnotatable -> IRelationshipLinks adapter is registered) | 18:52 |
eldar | huH? | 18:52 |
mgedmin | (which happens at runtime if you include schoolbell.relationships configure.zcml) | 18:53 |
eldar | ok | 18:53 |
mgedmin | (but you must do that yourself in unit test setup code if you want to use relationships in a test) | 18:53 |
*** erchache has left #schooltool | 19:06 | |
eldar | ok, to register the adapter, i just add <package include="schoolbell.relationships" /> in candotoo configuration file, right? | 19:06 |
povbot | /svn/commits: * gintas committed revision 4156: | 19:07 |
povbot | /svn/commits: Added event description and list of booked resources to the report. | 19:07 |
*** matiasV has quit IRC | 19:12 | |
*** matiasV has joined #schooltool | 19:12 | |
mgedmin | eldar, yes | 19:38 |
*** gintas has quit IRC | 19:47 | |
*** jinty has quit IRC | 20:05 | |
*** eldar has quit IRC | 20:12 | |
*** jinty has joined #schooltool | 21:23 | |
*** ignas has quit IRC | 22:26 | |
*** replicant is now known as hazmat | 23:44 | |
*** mgedmin_ has joined #schooltool | 23:49 | |
*** mgedmin has quit IRC | 23:49 | |
*** strichter is now known as srichter | 23:57 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!