Show
Ignore:
Timestamp:
09/26/07 07:49:52 (2 years ago)
Author:
JensDiemer
Message:

Update the external PyLucid Plugin "DecodeUnicode?" from v0.7.x to v0.8

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • PyLucidPlugins/DecodeUnicode/DecodeUnicode.py

    r821 r1250  
    1313Last commit info: 
    1414---------------------------------- 
    15 LastChangedDate: $LastChangedDate:$ 
    16 Revision.......: $Rev:$ 
     15LastChangedDate: $LastChangedDate$ 
     16Revision.......: $Rev$ 
    1717Author.........: $Author$ 
    1818""" 
     
    2020 
    2121 
    22 __version__="$Rev:$" 
     22__version__="$Rev$" 
    2323 
    2424 
     
    3030 
    3131 
    32 from PyLucid.system.BaseModule import PyLucidBaseModule 
    33  
    34  
    35  
    36  
    37 class DecodeUnicode(PyLucidBaseModule): 
     32from PyLucid.system.BasePlugin import PyLucidBasePlugin 
     33 
     34 
     35class DecodeUnicode(PyLucidBasePlugin): 
    3836 
    3937    blocks = [ 
     
    186184 
    187185    def lucidTag(self): 
    188         #~ self.response.debug() 
    189  
    190186        self.block_select() 
    191187 
     
    201197 
    202198        context = { 
    203             "url": self.URLs.actionLink("display"), 
     199            "url": self.URLs.methodLink("display"), 
    204200            "selected_id": selected_id, 
    205201            "blocks": block_data, 
    206202        } 
    207         #~ self.page_msg(context) 
    208         self.templates.write("select", context) 
     203        self._render_template("select", context) 
    209204 
    210205    def display(self, function_info=None): 
     
    218213        else: 
    219214            try: 
    220                 block_id = self.request.form["block"] 
     215                block_id = self.request.POST["block"] 
    221216                block_id = int(block_id) 
    222217            except (KeyError, ValueError): 
     
    245240 
    246241        context = { 
    247             "back_url"  : self.URLs.actionLink("display", back_id), 
     242            "back_url"  : self.URLs.methodLink("display", back_id), 
    248243            "back_name"  : self.blocks[back_id]["name"], 
    249             "next_url"  : self.URLs.actionLink("display", next_id), 
     244            "next_url"  : self.URLs.methodLink("display", next_id), 
    250245            "next_name"  : self.blocks[next_id]["name"], 
    251246 
    252             "url"       : self.URLs.actionLink("display", block_id), 
     247            "url"       : self.URLs.methodLink("display", block_id), 
    253248            "block_name": block["name"], 
    254249            "ucHex": "%X" % block_range[0], # Für decodeunicode.org Link 
     
    259254            "unidata_version": unicodedata.unidata_version, 
    260255        } 
    261         #~ self.templates.write("display", context, debug=True) 
    262         self.templates.write("display", context, debug=False) 
     256        self._render_template("display", context) 
    263257 
    264258    def get_block_data(self, block):