Python Desktop Server 2004/5

2004-05-31

Show first, not edit

To Do: At the moment, I home in on an edit page of a weblog post from internal links. I should really home in on the view page.
posted at 23:58:24    #    comment []    trackback []
 

Diff!

Georg! Grab gtk-2004-05-31.diff for the changes:

  • MeshTool:
  • P110: use edit/view links where possible
  • P119: redirect explicit pyds:/ links
  • handle cached link target no longer existing
  • ShutdownTool:
  • Added startShutdown API call
  • StructuredText:
  • Add Psyco testing (if installed)
  • Fix testing (previously broken with _flet)
  • WeblogTool:
  • Fix renderItemByUniqueId
  • WikiTool:
  • P117: fill in empty Wiki titles
  • P118: prevent backslashes in Wiki node names
  • Remove Delete button when editing
posted at 18:59:44    #    comment []    trackback []
 
2004-05-30

DirectPydsUriTest

As DirectPydsUriTest points out, I should capture outbound pyds:/ links and redirect them appropriately. [Fixed.]

posted at 21:24:48    #    comment []    trackback []
 

Backslashes in Wiki node titles

When I first made EmptyParentNodeTest, I accidentally used backslashes to separate the ID. That caused problems because the code I was using to separate the names worked (_fullSplit), but the subsequent name lookups I was performing after recomposing with '/' didn't. I need to automatically translate them, or at least issue an appropriate warning. [Fixed.]

posted at 14:33:04    #    comment []    trackback []
 

Empty Title Test

I should automatically fill in the titles of new Wiki nodes. I've added EmptyTitleTest to track it. [Done.]

posted at 13:26:56    #    comment []    trackback []
 

New bug!

I was trying to post a new Wiki node (EmptyParentNodeTest), and...

Exception exceptions.NameError: 
global name 'getPost' is not defined

PyDS\Tool.py 967 process_request 
u = getattr(tool,meth)(req) 

PyDS\WikiTool.py 569 edit_redir 
id = self.addNode(id, title, text, template=int(template)) 

PyDS\WikiTool.py 699 addNode 
meshTool.renderItemsWithUnresolvedLinks() 

PyDS\MeshTool.py 986 renderItemsWithUnresolvedLinks 
return [handles, self.renderItems(handles)] 

PyDS\MeshTool.py 1015 renderItems 
method(item.uniqueId) 

PyDS\WeblogTool.py 325 renderItemByUniqueId 
post = getPost(uniqueId) 

Fix:

# Render an item by its unique ID
def renderItemByUniqueId(self, uniqueId):
        """Render all pages associated with the post identified by `uniqueId`."""
        post  = self.getPost(uniqueId)
        # ... and so on

I've got no idea why renderItemsWithUnresolvedLinks was triggering weblog renders. I should also look into that.

posted at 13:22:40    #    comment []    trackback []
 
2004-05-29

Psyco vs PyDS

Anyone tried using Psyco with PyDS? I'm thinking it might be especially handy for rendering reStructuredText...

[later] I've tried it out, and it speeds up reST on the example in StructuredText.py by a good 40%. Just for fun, I've changed pyds-start to load Psyco. I'm posting from it now. :)

posted at 00:00:32    #    comment []    trackback []
 
2004-05-28

Still trying to nut out this local rendering problem in WeblogTool...

I thought I was on to something, but WeblogTemplate.tmpl does indeed refer to the local rendering.

AHA! Fixed. New code at the bottom of ReferToWeblogPost.

That'll do me for the night, I reckon. :)

posted at 23:13:36    #    comment []    trackback []
 
2004-05-24

Aha!

My problem with Wiki uploads (see P111) turned out just to be a problem with the templates. Georg, you need to catch that Cheetah.NameMapper.NotFound exception and throw up something nicer...

Now, why can't I force a refresh? Or, assuming I can: why is my call to PyDS.Tool.debugOutput not working? [Cough. look in error.log, silly!]

posted at 23:13:36    #    comment []    trackback []
 

I don't get the render problem

Following on from P111; if I hit the Status page I get a report on the size of the StoryTool render queue. Maybe it's there now?

posted at 21:01:20    #    comment []    trackback []
 

Can't Upstream Wiki Changes

[This turned out to be a lot simpler than it looked. See P113.]

wiki is throwing:

Background thread exception  
Cheetah.NameMapper.NotFound: 
yearException instance __dict__: {'args': ('year',)}

C:\Python23\Lib\site-packages\PyDS\Tool.py[1300] in thunk
C:\Python23\Lib\site-packages\PyDS\WikiTool.py[127] in _initthread
C:\Python23\Lib\site-packages\PyDS\WikiTool.py[740] in renderNodeOnline
C:\Python23\Lib\site-packages\PyDS\Tool.py[760] in renderPage
[40] in respond
C:\Python23\Lib\site-packages\Webware\Cheetah\NameMapper.py[261] in valueFromSearchList

render is throwing:

Background thread exception 
exceptions.AttributeError: 
StoryTool instance has no attribute 'queue'
Exception instance __dict__: 
{'args': ("StoryTool instance has no attribute 'queue'",)}

C:\Python23\Lib\site-packages\PyDS\Tool.py[1300] in thunk
C:\Python23\Lib\site-packages\PyDS\RenderTool.py[66] in _initthread
C:\Python23\Lib\site-packages\PyDS\RenderTool.py[48] in haswork
C:\Python23\Lib\site-packages\PyDS\RenderTool.py[44] in getqueue
posted at 17:06:40    #    comment []    trackback []
 

First Bug to Fix: Refer To Weblog Post (again)

Now, all links go to external. Oops. See: ReferToWeblogPost. I swear that wasn't the case when I was last writing code for PyDS.

posted at 15:02:56    #    comment []    trackback []
 

PyDS back up on 0.7.3

Righto. Let's start experimenting again.

posted at 14:56:32    #    comment []    trackback []
May 2004
MoTuWeThFrSaSu
      1 2
3 4 5 6 7 8 9
10111213141516
17181920212223
24252627282930
31      
Dec
2003
 Jun
2004

Posts related to PyDS

XML-Image Letterimage

© 2004, Garth T Kidd