PythonMethods: Can't Slice context.REQUEST.PARENTS
I cannot slice context.REQUEST.PARENTS The reason I want to do this is to travel up the URL tree for a breadcrumb navigation do-hicky. I want to slice it so I can make a copy because if I just do ...reverse() on it, I screw up everything afterwards. It says I'm unauthorized (Guarded.py __careful_getattr__) so I assume this is a feature. I suppose I can just .reverse() it back again at the end, but it seems.....wrong some how. Attached is my code at the moment...it sucks, I know. This is python project numero uno and zope project duo... If anyone has a better example of how to hand text (I'm using buff and returning it) back, I'd appreciate it. I'm much to tired, so off I go to bed... Ciao! -- Man is the best computer we can put aboard a spacecraft ... and the only one that can be mass produced with unskilled labor. -- Wernher von Braun The Doctor What: <fill in the blank> http://docwhat.gerf.org/ docwhat@gerf.org KF6VNC
Okay, I figured that bit of braindeadness out (I just use a range that goes backwards, no .reverse() so everything is left as is. Now here is my next problem. Using context.REQUEST.PARENTS doesn't give me the DTML Document that called me (so to speak). I have: /test/new/foo_html My PARENTS shows Zope, Test, and New, but doesn't show foo_html. Is this because my PythonMethod is Internal vs. External? I didn't see any descriptions of what the differences are. The DTML Method version of my code can see the id/title of the foo_html via 'id', 'title' and 'title_or_id', but under python I just get: self.title_or_id() -- Zope, the folder that my method lives at m_self.title_or_id() -- Breadcrumbs (my method) context.title_or_id() -- New, the folder foo_html lives at And I have no idea what _ is for.... Any help is appreciated. Ciao! -- "Well Pumpkins, It looks like it comes down to that age old decision: Style or Substance. Hmmmmmm....." --Vida and the "Girls" ( To Wong Foo, Thanks for everything, Julie Newmar ) The Doctor What: "What, Doctor What" http://docwhat.gerf.org/ docwhat@gerf.org KF6VNC
participants (1)
-
The Doctor What