ignas | we seem to be getting a lot of these, errors, and users seem to get confused by the traceback | 00:00 |
---|---|---|
ignas | should not be very difficult | 00:00 |
ignas | if you have time of course | 00:00 |
pcardune | ignas: that would be a good idea | 00:00 |
ignas | i know, it's not mine ;) | 00:01 |
smalekgh | >_< | 00:01 |
smalekgh | Ugh, should it be legal for someone to schedule the same course more than once for a single schedule? | 00:02 |
pcardune | no | 00:03 |
*** Ninno has quit IRC | 00:13 | |
*** smalekgh has left #schooltool | 00:23 | |
*** didymo has joined #schooltool | 01:14 | |
*** didymo has quit IRC | 02:04 | |
*** ignas has quit IRC | 02:14 | |
*** gpaci has quit IRC | 03:29 | |
*** gpaci has joined #schooltool | 03:44 | |
*** gpaci_ has joined #schooltool | 04:02 | |
*** gpaci has quit IRC | 04:06 | |
*** gpaci_ is now known as gpaci | 04:12 | |
*** jinty has joined #schooltool | 04:56 | |
*** jinty has quit IRC | 05:33 | |
*** th1a has joined #schooltool | 05:46 | |
th1a | aty pcardune? | 05:49 |
th1a | ayt, I mean. | 05:50 |
*** pcardune has quit IRC | 05:54 | |
*** th1a has quit IRC | 05:59 | |
*** th1a has joined #schooltool | 06:24 | |
*** wjohnsto has joined #schooltool | 06:48 | |
*** th1a has quit IRC | 06:53 | |
*** E-nnovative has joined #schooltool | 06:56 | |
*** wjohnsto has joined #schooltool | 07:31 | |
*** E-nnovative1 has joined #schooltool | 07:40 | |
*** Forexs has joined #schooltool | 07:46 | |
*** Forexs has left #schooltool | 07:46 | |
*** E-nnovative has quit IRC | 07:59 | |
*** wjohnsto has quit IRC | 07:59 | |
*** pcardune has joined #schooltool | 08:36 | |
*** E-nnovative1 has quit IRC | 10:08 | |
*** E-nnovative1 has joined #schooltool | 10:08 | |
*** pcardune has quit IRC | 10:20 | |
*** E-nnovative1 has quit IRC | 10:32 | |
*** didymo has joined #schooltool | 10:49 | |
*** Aiste has quit IRC | 10:53 | |
*** jfroche has joined #schooltool | 10:56 | |
*** jfroche has quit IRC | 11:02 | |
*** jfroche has joined #schooltool | 11:03 | |
*** jfroche has quit IRC | 11:03 | |
*** jfroche has joined #schooltool | 11:03 | |
*** jinty has joined #schooltool | 12:17 | |
*** E-nnovative1 has joined #schooltool | 13:00 | |
*** didymo has quit IRC | 13:39 | |
*** alga has joined #SchoolTool | 14:49 | |
*** E-nnovative1 has quit IRC | 14:59 | |
*** mgedmin has joined #schooltool | 15:53 | |
*** ignas has joined #schooltool | 16:03 | |
*** wjohnsto has joined #schooltool | 16:38 | |
*** pcardune has joined #schooltool | 16:46 | |
wjohnsto | pcardune: ayt? | 16:50 |
pcardune | wjohnsto: yes | 16:50 |
wjohnsto | I seem to be getting this random error when I try to start my zope instance on maddog | 16:50 |
wjohnsto | I don't think it has anything to do with my programs | 16:50 |
pcardune | wjohnsto: what is the error? | 16:50 |
wjohnsto | IOError: [Errno 11] Resource temporarily unavailable | 16:50 |
wjohnsto | I'll lispaste the entire thing | 16:51 |
pcardune | lisppaste5: url | 16:51 |
lisppaste5 | To use the lisppaste bot, visit http://paste.lisp.org/new/schooltool and enter your paste. | 16:51 |
lisppaste5 | wjohnsto pasted "error" at http://paste.lisp.org/display/43339 | 16:51 |
pcardune | that certainly does not have anything to do with your code | 16:53 |
wjohnsto | I have no clue what happened, it was all going fine, and then I decide to move my laptop upstairs, and it all goes wrong | 16:53 |
pcardune | try delete Data.fs.lock | 16:53 |
pcardune | in the var directory of your instance | 16:53 |
wjohnsto | ok | 16:53 |
wjohnsto | now it has some conflicting address error | 16:54 |
wjohnsto | I could try getting rid of all the data.fs | 16:56 |
wjohnsto | I'm going to see if Brittney's maddog still works (this error is on maddog, not local) | 16:57 |
wjohnsto | pcardune: Brittney's works | 17:00 |
pcardune | wjohnsto: well a conflicting address error might be that there is already an instance running on the same port | 17:01 |
wjohnsto | hmmm | 17:02 |
wjohnsto | in that case I'll check | 17:02 |
pcardune | I just did and it doesn't seem that there are any other ones running | 17:02 |
wjohnsto | nope | 17:03 |
pcardune | wjohnsto: could you paste the conflicting address error? | 17:03 |
lisppaste5 | wjohnsto annotated #43339 with "New Paste" at http://paste.lisp.org/display/43339#1 | 17:03 |
wjohnsto | pcardune: wait | 17:04 |
wjohnsto | it randomly started working again | 17:04 |
wjohnsto | pcardune: thanks for the help, I have another question about sepg if you have time | 17:05 |
pcardune | yeah, ask away | 17:06 |
wjohnsto | ok | 17:06 |
wjohnsto | yesterday I told you I was having the argument error problem | 17:06 |
wjohnsto | where it said the init method only took 1, and I gave it 2 arguments | 17:06 |
wjohnsto | I originally thought it was an inheritance problem from my BaseContainer class | 17:07 |
wjohnsto | ...and I was right | 17:07 |
wjohnsto | but I couldn't figure out how to fix it | 17:07 |
wjohnsto | I got past it for the time being by just making an init method in the Division class | 17:07 |
wjohnsto | but it would be nice to get it fixed. | 17:07 |
wjohnsto | pcardune: Oh, and I took a closer look at the INameChooser interface earlier this morning | 17:08 |
wjohnsto | and figured some things out/resolved my errors | 17:08 |
pcardune | cool | 17:09 |
pcardune | well if it is a base class issue you might want to call the base classe's __init__ method before yours gets called | 17:09 |
pcardune | or rather, a common pattern with inheritcan is this: | 17:09 |
pcardune | def __init__(self, args, for, baseclass, and, your, class): | 17:10 |
pcardune | super(NameOfYourClass, self).__init__(args, for, baseclass) | 17:10 |
pcardune | ... your code here... | 17:10 |
wjohnsto | ok | 17:11 |
wjohnsto | I think all I need is def __init__(self, BaseContainer): | 17:12 |
wjohnsto | super(Division, self).__init__() | 17:12 |
wjohnsto | all the BaseContainer is, is an init method | 17:13 |
wjohnsto | pcardune: I also talked with dwelsh | 17:15 |
wjohnsto | and he said that to resolve the duplicate name errors I was having, I could just append markers on the end of courses. | 17:15 |
wjohnsto | for example, some courses are also "pathways," which are courses you have to take in a certain order (like computer science1&2 -- AP Computer Science) | 17:16 |
pcardune | wjohnsto: well, I think it is important to decide whether those are actually accidental duplications in the xml file, or whether they are meant to be references to existing courses | 17:17 |
wjohnsto | for the pathways, dwelsh told me I could just put "-pathway" on the end | 17:17 |
wjohnsto | well | 17:17 |
pcardune | yeah, that would work for now | 17:17 |
pcardune | I guess if the only use case is to read from the xml file, and just use that, it won't matter if there are duplicates | 17:18 |
wjohnsto | yeah | 17:18 |
wjohnsto | I don' | 17:18 |
wjohnsto | t | 17:18 |
pcardune | wjohnsto: the issue would only come up if you wanted to edit one of the courses... in which case you'd have to edit all the duplicates too or it wouldn't really make sense | 17:18 |
wjohnsto | know exactly why a course would be outside a pathway, if it was also a pathway, but w/e | 17:18 |
wjohnsto | true | 17:18 |
pcardune | but we can worry about that later I think | 17:19 |
wjohnsto | Dwelsh also said that all the divisions/clusters are set in stone by some nationwide school system | 17:19 |
pcardune | yeah, so go ahead and attach -pathway to those sorts of courses | 17:19 |
wjohnsto | so they will never change | 17:19 |
pcardune | as far as changes are concerned I'm thinking about the teacher that teaches them, which could change as much as on a yearly basis | 17:20 |
pcardune | but I suppose that is really a corner case, so don't worry about it *yet* | 17:20 |
wjohnsto | yeah | 17:21 |
wjohnsto | well actually | 17:21 |
wjohnsto | most of the duplicate name errors occur with Career Center courses | 17:21 |
wjohnsto | and pretty much the same teachers teach the same classes year after year in each of the courses at the Career Center | 17:22 |
pcardune | that's true | 17:23 |
wjohnsto | the only time teachers change is in the Schools | 17:24 |
wjohnsto | But there really aren't any duplicate errors in the schools pcardune, because the courses aren't as "exotic" as they are at the career center | 17:24 |
pcardune | yes | 17:25 |
wjohnsto | wow | 17:26 |
wjohnsto | so now I went from having too many arguments to not having enough arguments in my init method | 17:26 |
wjohnsto | pcardune: this error does not seem to be what I thought it was | 17:30 |
pcardune | is the code you are using accessible here: http://maddog.yhspatriot.net/~wjohnsto/sepg/? | 17:31 |
wjohnsto | yes | 17:31 |
wjohnsto | in sepg.py | 17:31 |
wjohnsto | let me commit first | 17:31 |
wjohnsto | ok | 17:32 |
pcardune | and it is with the SEPG class? | 17:34 |
wjohnsto | the SEPG class is fine I think | 17:34 |
pcardune | nope | 17:34 |
wjohnsto | ok haha | 17:34 |
pcardune | I think it would probably be easier if you didn't inherit from BaseContainer | 17:35 |
pcardune | since you have an __init__ method anyways | 17:35 |
pcardune | just set the title there | 17:35 |
pcardune | and call: super(SEPG, self).__init__() # that will be the __init__ method for the BTreeContainer | 17:35 |
pcardune | if you want we can gobby and I can show you a bit more of what I mean. | 17:36 |
wjohnsto | ok | 17:36 |
wjohnsto | I'm on my windows machine right now, let me get on my linux (right next to me) | 17:36 |
wjohnsto | pcardune: ok | 17:37 |
wjohnsto | port 6522 | 17:38 |
pcardune | hmm, its not connecting. wjohnsto, did you start up sobby? | 17:39 |
wjohnsto | pcardune: maybe not | 17:41 |
wjohnsto | I dont even know how this whole thing works | 17:41 |
wjohnsto | I have to read up on it | 17:41 |
wjohnsto | whenever brittney and I edit things, we just use google documents | 17:42 |
pcardune | ok, it's up | 17:42 |
pcardune | connect to maddog.yhspatriot.net on port 6522 | 17:42 |
*** th1a has joined #schooltool | 18:30 | |
*** fsufitch has joined #schooltool | 18:54 | |
fsufitch | anybody know how i can contact mr welsh? | 18:55 |
fsufitch | i need to get client approval of my printable forms before actually turning them in... | 18:55 |
th1a | pcardune: ayt? | 18:58 |
pcardune | th1a: yes | 18:58 |
pcardune | I think I'm going to agree with you on the REST stuff | 18:59 |
th1a | I'm thinking that using REST might be the best approach. | 18:59 |
th1a | Jinx! | 18:59 |
th1a | Buy me a Coke. | 18:59 |
pcardune | I haven't said anything yet though... | 18:59 |
pcardune | at least not outloud | 18:59 |
pcardune | besides, REST will provide us with some added functionality later | 19:00 |
th1a | Right. | 19:00 |
pcardune | say, when we want to implement a web interface using google web toolkit or something | 19:00 |
pcardune | that would be pretty f-ing cool | 19:00 |
th1a | We can also use it for import/export etc. | 19:00 |
th1a | It was always a good idea. | 19:00 |
pcardune | yep | 19:00 |
th1a | Can you make the meeting tomorrow? | 19:00 |
pcardune | I think it will be worth the extra time commitment | 19:00 |
pcardune | th1a: yes | 19:01 |
th1a | It isn't like it is breaking entirely new ground. | 19:01 |
pcardune | london is UTC right? | 19:01 |
th1a | Especially since we'll probably start with Persons, which already have views. | 19:01 |
th1a | They just have to be updated, I imagine. | 19:01 |
th1a | I can never remember if London is UTC. | 19:01 |
pcardune | so, that is 6:30am my time | 19:03 |
pcardune | which is when I woke up this morning without an alarm clock, so I should be fine :) | 19:03 |
fsufitch | pcardune: how can i contact mr welsh so i can get printable forms approved? | 19:04 |
th1a | pcardune: OK, I'll put reviving REST on the agenda. | 19:04 |
pcardune | fsufitch: you'll have to wait till monday I'm afraid | 19:04 |
th1a | Perhaps some of the other interns should sit in. | 19:05 |
pcardune | fsufitch: but I would send him an email | 19:05 |
fsufitch | aww :( | 19:05 |
fsufitch | what's his email address? | 19:05 |
fsufitch | (pm) | 19:05 |
pcardune | fsufitch: what you'll want to do is setup a running instance of cando on maddog so that he can take a physical look at it | 19:05 |
fsufitch | right | 19:05 |
pcardune | th1a: yeah, I'll ping the ones who are taking over for Will | 19:05 |
th1a | pcardune: Great. | 19:06 |
fsufitch | pcardune, is there a way to transfer my code from my computer to maddog using svn? | 19:28 |
pcardune | fsufitch: well if you checked it in the the svn repository, then you just have to check it out on maddog | 19:28 |
fsufitch | oh, right | 19:29 |
fsufitch | i missed that part on the checkout page | 19:29 |
fsufitch | Permission denied (publickey). | 19:30 |
fsufitch | w8, nvm | 19:31 |
fsufitch | that was because of ssh:http | 19:31 |
fsufitch | it works with https | 19:31 |
fsufitch | pcardune, apparently checking out didn't give me the files i wanted | 19:39 |
pcardune | what was your checkout command? | 19:40 |
fsufitch | svn co https://username@svn.schooltool.org/cando/trunk cando | 19:41 |
fsufitch | uh | 19:41 |
fsufitch | fsufitch | 19:41 |
fsufitch | i copied the wrong one | 19:41 |
fsufitch | actually let me try again | 19:42 |
fsufitch | i might have done username@svn.schooltoo.org | 19:42 |
fsufitch | nope | 19:45 |
fsufitch | it's still not there | 19:45 |
fsufitch | pcardune, ping | 19:45 |
pcardune | you don't want trunk | 19:45 |
pcardune | you want your branch | 19:45 |
fsufitch | um | 19:46 |
fsufitch | i forgot how to access it | 19:46 |
pcardune | it should be cando/branches/name-or-your-branch | 19:46 |
pcardune | instead of cando/trunk | 19:46 |
fsufitch | i c | 19:46 |
pcardune | to see what your branch is, you can type svn info on your local machine | 19:46 |
pcardune | in the checkout directory | 19:46 |
fsufitch | i c | 19:47 |
fsufitch | printable-forms | 19:47 |
fsufitch | yay it's there! | 19:51 |
*** th1a has quit IRC | 19:52 | |
fsufitch | pcardune, is port 7080 blocked on maddog? | 19:59 |
pcardune | fsufitch: yes i believe so | 19:59 |
fsufitch | great | 20:00 |
fsufitch | i need to reconfigure my port <_< | 20:00 |
*** alga has quit IRC | 20:32 | |
*** mgedmin has quit IRC | 20:34 | |
fsufitch | pcardune, is there somewhere i can get the code for the barcode read/write? | 20:41 |
fsufitch | because neither bvuong or brittany are online | 20:42 |
pcardune | I think it is somewhere on maddog | 20:42 |
pcardune | just type locate barcode | 20:42 |
fsufitch | locate is an actual command?! | 20:42 |
fsufitch | amazing | 20:43 |
fsufitch | i should learn more unix ;) | 20:43 |
pcardune | and it works instantly... not like any of those other find things | 20:43 |
fsufitch | i was having trouble searching my local machine without locate | 20:43 |
fsufitch | so, pcardune, where should i start on barcode integration? | 20:49 |
fsufitch | i'm thinking of giving the person and the resource object "barcode" fields | 20:49 |
pcardune | yes, except that you can't modify that code | 20:49 |
fsufitch | oh :( | 20:49 |
pcardune | so you'll have to use annotation adapters :) | 20:49 |
fsufitch | what are those? | 20:49 |
ignas | pcardune: still there? | 20:50 |
pcardune | they're things that let you attach "attributes" to objects | 20:50 |
pcardune | ignas: yes | 20:50 |
fsufitch | cool! so how can i use them? | 20:50 |
pcardune | fsufitch: but they get attached as an "annotation" like "metadata" | 20:50 |
ignas | pcardune: when it comes to REST, got any idea of how to have different REST views for different versions of the same object? | 20:51 |
fsufitch | is there an example of them that i can see? | 20:51 |
pcardune | I'll give you a hint: skill drivers are stored as annotations on top of courses. So go look at the skill driver code | 20:51 |
ignas | as in - schooltool person vs demographics person | 20:51 |
fsufitch | oh ok | 20:51 |
ignas | without breaking clients too much | 20:51 |
ignas | if person object is switched or something like that | 20:51 |
pcardune | ignas: maybe a separate interface | 20:51 |
ignas | or are we going to make clients use different interfaces depending on the person class | 20:52 |
pcardune | IRESTPerson with adapters | 20:52 |
ignas | no not that part | 20:52 |
ignas | that pars is easy - different views for different classes | 20:52 |
ignas | but on XML level | 20:52 |
ignas | if XML files will be 100% incompatible | 20:52 |
ignas | it will not be very nice | 20:52 |
ignas | though - title vs first_name + last_name | 20:52 |
ignas | is something that will definitely apply to the "base" | 20:53 |
pcardune | yes, make an XML file that is compatible | 20:53 |
pcardune | can't you have an xml file not require certain attributes | 20:53 |
pcardune | but provide them if they are there? | 20:53 |
ignas | so we don't really have a common way to create different persons | 20:53 |
ignas | creating a person in one case requires "title" in other case requires "first_name" and "last_name" | 20:53 |
ignas | and this distinction is set in schooltool code | 20:54 |
ignas | REST client has no way to know | 20:54 |
ignas | which person is being used | 20:54 |
ignas | even if we write the client | 20:54 |
pcardune | it sounds like we should stop having multiple persons | 20:55 |
ignas | not really possible at the moment | 20:56 |
ignas | persons are too different | 20:56 |
pcardune | in the future? | 20:56 |
pcardune | Well, I'll think about it for a bit | 20:56 |
ignas | ok | 20:56 |
fsufitch | so i need the zope.component.adapts(something)? | 20:59 |
pcardune | yeah | 20:59 |
pcardune | fsufitch: you'll want the something to be IPerson and IResource | 20:59 |
fsufitch | how do i do it for both of them at once? | 21:00 |
fsufitch | or do i have to have separate classes? | 21:00 |
ignas | pcardune: hmm, we probably want an extendable XML | 21:01 |
ignas | and some view that list available REST person extensions | 21:02 |
fsufitch | do i do zope.component.adapts(("IPerson","IResource"))? | 21:02 |
pcardune | fsufitch: no | 21:02 |
fsufitch | or zope.component.adapts(IPerson) <newline> zope.component.adapts(IResource) | 21:02 |
ignas | fsufitch: i'd define adapts in zcml | 21:02 |
ignas | in this case | 21:02 |
pcardune | you will actually want to have some other interface | 21:02 |
pcardune | like, IHaveBarcode | 21:02 |
ignas | or you can add <class> directives | 21:03 |
ignas | with IHaveBarcode | 21:03 |
ignas | for both | 21:03 |
ignas | persons and resources | 21:03 |
pcardune | i like that way the best | 21:03 |
fsufitch | i see | 21:03 |
fsufitch | so there would be a PersonBarcode and a ResourceBarcode in the end? | 21:03 |
fsufitch | or am i getting this wrong? | 21:04 |
ignas | oh, and you should probably add a catalog for barcode -> IHaveBarcode lookup | 21:04 |
fsufitch | a catalog? | 21:05 |
ignas | it can wait | 21:05 |
pcardune | ignas: why a catalog? | 21:05 |
ignas | pcardune: because iterating through 1000 of persons and getting annotations of every one of them and seeing if the barcode is right | 21:06 |
ignas | will be slow | 21:06 |
pcardune | oh god know I wouldn't do that | 21:06 |
ignas | or are you going to immitate a catalog by having a BTree with "barcode" -> person pairs? | 21:07 |
pcardune | yeah, that is more what I was thinking | 21:07 |
pcardune | but only because I've never used catalogs before | 21:07 |
ignas | hmm, that's a bit "reinventing the wheel" though | 21:07 |
ignas | as you will have to add your own PersonModified | 21:07 |
ignas | PersonRemoved | 21:07 |
ignas | Person Added | 21:07 |
ignas | subscribers | 21:07 |
fsufitch | ... | 21:07 |
pcardune | hmmm, yes I suppose that is true | 21:08 |
ignas | and it will effectivelly be a ... catalog | 21:08 |
ignas | *... a catalog | 21:08 |
pcardune | well that can come later | 21:08 |
fsufitch | so a catalog is a way to backtrace from contained object to container object? | 21:09 |
ignas | no | 21:09 |
ignas | it's a method to find all the objects that match some query, like "get me all person with this barcode" | 21:09 |
ignas | without accessing all the objects that have a barcode | 21:09 |
fsufitch | i see | 21:09 |
fsufitch | well, if it comes later, then it comes later | 21:10 |
* ignas would even go so far as to not store barcode in annotations | 21:10 | |
ignas | just use a catalog | 21:10 |
fsufitch | but right now i should just start by writing an IBarcode class, right? | 21:10 |
ignas | as catalogs are two way ... | 21:11 |
fsufitch | i see | 21:11 |
ignas | IBarcode, yes | 21:11 |
fsufitch | but if i have blah/person/barcode, i can use a catalog to do that traversal? | 21:11 |
ignas | all the magic will be happening in IHaveBarcode => IBarcode adapter | 21:11 |
ignas | why traverse? | 21:11 |
ignas | you just have a @@barcode.html view on all IHaveBarcode objects | 21:12 |
ignas | that can change the barcode | 21:12 |
fsufitch | i see | 21:12 |
fsufitch | ok | 21:12 |
fsufitch | but the barcodes are supposed to be autogenerated from the object they're describing | 21:12 |
ignas | so @@barcode.html would just display that info, not change it | 21:13 |
fsufitch | i see | 21:13 |
fsufitch | alright | 21:13 |
fsufitch | but i still don't get what you mean the IHaveBarcode class to do | 21:13 |
ignas | IHaveBarcode is a marker interface | 21:13 |
ignas | that tells you that this object has a barcode | 21:14 |
fsufitch | which means...? | 21:14 |
fsufitch | i see | 21:14 |
ignas | so you could add views for all the objects that can have a barcode | 21:14 |
ignas | instead of registering every view for let's say Person and Resource | 21:14 |
ignas | twice | 21:14 |
fsufitch | so no hard-coding... | 21:14 |
ignas | yes | 21:14 |
fsufitch | oook | 21:15 |
ignas | though - i'd write 2 IBarcode adapters one for IPerson and one for IResource because i think the logic of barcode generation will be different | 21:15 |
ignas | but i have no idea about how that will work ;) | 21:15 |
ignas | so you should ask pcardune what he thinks about it | 21:15 |
fsufitch | it's the same code for generating the barcodes for anything | 21:15 |
fsufitch | somebody else wrote that code | 21:15 |
ignas | hmm | 21:15 |
ignas | and how does it generate the code? | 21:16 |
fsufitch | no idea | 21:16 |
fsufitch | black magic | 21:16 |
fsufitch | it's given a string | 21:16 |
fsufitch | and generates a numerical code from there | 21:16 |
fsufitch | which is then used to make the bars | 21:16 |
ignas | same code for identical strings? | 21:16 |
fsufitch | yes | 21:16 |
ignas | hmm, so yes, you can go with 1 adapter | 21:17 |
ignas | that gets self.__parent__.__name__ + "/" + self.__name__ | 21:17 |
ignas | and generates the code out of that | 21:17 |
pcardune | that is what I was going to say | 21:17 |
ignas | so you won't even have to store anything | 21:17 |
ignas | in annotations | 21:18 |
fsufitch | i see | 21:18 |
fsufitch | (somewhat) | 21:18 |
pcardune | depending on how often the barcode gets viewed though | 21:18 |
ignas | pcardune: catalog, if it's too slow | 21:18 |
ignas | hmm, but yes, it depends | 21:19 |
ignas | though - the code generation for 1 object will be fast enough anyway | 21:19 |
fsufitch | ok... | 21:22 |
fsufitch | would i make a new directory to put all the barcode stuff in? | 21:26 |
fsufitch | pcardune, ping | 21:34 |
pcardune | yes | 21:34 |
fsufitch | yes to my question? | 21:36 |
fsufitch | also, how would i be able to store the image for the barcode? | 21:37 |
fsufitch | would i use python imaging or just keep it in a file and hold a string of the file's path? | 21:38 |
fsufitch | pcardune, ping | 21:39 |
pcardune | fsufitch: I guess we decided that it would be generated on the fly | 21:39 |
fsufitch | oh yea | 21:40 |
fsufitch | right. | 21:40 |
fsufitch | then what would the IBarcode class actually store? | 21:40 |
*** ignas has quit IRC | 21:41 | |
fsufitch | pcardune, ping | 21:41 |
fsufitch | it's fun to ping you :) | 21:42 |
pcardune | well, I guess you wouldn't actually have an IBarcode class | 21:42 |
pcardune | you would just have an IHaveBarCode interface | 21:43 |
pcardune | and it wouldn't store anything | 21:43 |
pcardune | it would just be what's called a "marker" interfae | 21:43 |
pcardune | or actually, you could make it store a __name__ and __parent__ | 21:43 |
fsufitch | i see | 21:43 |
pcardune | in which case, you could just make IHaveBarCode inherit from IContained (or maybe ILocatable?) | 21:43 |
fsufitch | do i make them actual zope attributes, or just python attributes? | 21:44 |
*** aelkner has joined #schooltool | 21:44 | |
fsufitch | hello, aelkner | 21:46 |
aelkner | hello | 21:46 |
pcardune | fsufitch: zope schema fields | 21:47 |
fsufitch | ok | 21:47 |
pcardune | or zope Attributes too | 21:47 |
fsufitch | ok | 21:48 |
*** th1a has joined #schooltool | 22:01 | |
fsufitch | pcardune, so now that i have IHaveBarCode and HaveBarCode, how would i go about linking a person/resource/whatever to an object of that kind? | 22:14 |
fsufitch | is this where the catalogs come in? | 22:14 |
*** ignas has joined #schooltool | 22:14 | |
fsufitch | or the adaptors? | 22:14 |
pcardune | you won't need a HaveBarCode class | 22:15 |
fsufitch | ok... | 22:15 |
pcardune | you just need a page registered for IHaveBarCode | 22:15 |
pcardune | named barcode.gif | 22:15 |
fsufitch | i see | 22:15 |
pcardune | or rather, | 22:15 |
pcardune | make it barcode.html | 22:15 |
fsufitch | ok.. | 22:15 |
pcardune | you'll need another view for barcode.gif later | 22:15 |
pcardune | in the barcode.gif view, you'll hook in the barcode generating code | 22:16 |
fsufitch | which actually generates a barcode, and puts it in a file of some name | 22:16 |
fsufitch | pcardune, what class would i specify for the barcode.html zcml register thing? | 22:24 |
pcardune | fsufitch: you would create a view class like BarCodeView | 22:25 |
pcardune | you do not store the bar code in any file of any name | 22:25 |
fsufitch | ok, then how would i access it? | 22:26 |
fsufitch | pcardune, ping | 22:27 |
fsufitch | also, don't i have to put a template in for the page as well? | 22:28 |
pcardune | in the zcml registration you use a "class" attribute | 22:28 |
pcardune | yes | 22:28 |
pcardune | look at the lessons we did | 22:28 |
pcardune | it's all there | 22:28 |
fsufitch | ok | 22:29 |
fsufitch | pcardune, but see, the trouble is, in the page template, i would have to get the image from *some*where, and the only place the image actually ever appears is in the bar code generator itself as a PIL image, or outside of it, as a pdf file and a gif file | 22:33 |
fsufitch | how can i get the image from there, into the pt file, so it can be displayed? | 22:33 |
pcardune | the pt file will reference the barcode.gif view | 22:33 |
fsufitch | in other words, what do i have to change in the bar code generator and what do i have to do in my browser view class? | 22:33 |
pcardune | and the barcode.gif view will take the PIL image and convert it to a string | 22:34 |
pcardune | modify the HTTP headers to change the content type to a gif | 22:34 |
pcardune | and send off the image data | 22:34 |
pcardune | fsufitch: look at http://bzr.carduner.net/focus/focusphoto/browser.py | 22:36 |
fsufitch | ok | 22:36 |
*** th1a has quit IRC | 22:43 | |
*** jfroche has quit IRC | 22:43 | |
ignas | or at schooltool attendance sparkline code | 22:45 |
*** ignas has quit IRC | 22:51 | |
*** th1a has joined #schooltool | 23:33 | |
*** didymo has joined #schooltool | 23:39 | |
*** aelkner has quit IRC | 23:48 | |
*** jinty has quit IRC | 23:53 | |
*** ignas has joined #schooltool | 23:58 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!