<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi,<br>
    <br>
    I am pretty new in Grok Development, so sorry for (probably) trivia
    question. I have small testing application in app.py<br>
    <br>
    import grok<br>
    <br>
    class Awbarcode(grok.Application,grok.Container):<br>
    <br>
        def __init__(self):<br>
            super(Awbarcode, self).__init__()<br>
            self.title = 'AWBarcode manager'<br>
            self.text = "basic text"<br>
            self.next_id = 0<br>
    <br>
        def addBarcode(self,text):<br>
            id = str(self.next_id)<br>
            self.next_id = self.next_id + 1<br>
            self[id] = Barcode(text)<br>
    <br>
        def deleteBarcode(self,barode):<br>
            del self[barcode]<br>
    <br>
    class Barcode(grok.Model):<br>
    <br>
        def __init__(self,text):<br>
            super(Barcode,self).__init__()<br>
            self.text = text<br>
    <br>
    class AwbarcodeIndex(grok.View):<br>
        grok.context(Awbarcode)<br>
        grok.name('index')<br>
    <br>
    class AddBarcode(grok.View):<br>
        grok.context(Awbarcode)<br>
        grok.name('addbarcode')<br>
    <br>
        def update(self,text):<br>
            self.context.addBarcode(text)<br>
            self.redirect(self.url('index'))<br>
     <br>
    Also I have two .pt files, awbarcodeindex.pt:<br>
    <br>
    &lt;html&gt;<br>
    &lt;head&gt;<br>
        &lt;title tal:content="context/title"&gt;Barcode
    manager&lt;/title&gt;<br>
    &lt;/head&gt;<br>
    &lt;body&gt;<br>
        &lt;h1 tal:content="context/title"&gt;Barcode manager&lt;/h1&gt;<br>
        &lt;h2&gt;Here you can see barcodes:&lt;/h2&gt;<br>
        &lt;tal:block repeat="barcode context/values"&gt;<br>
            &lt;ul&gt;<br>
                &lt;li tal:content="barcode/text"&gt;Barcode&lt;/li&gt;<br>
            &lt;/ul&gt;<br>
        &lt;/tal:block&gt;<br>
    &lt;/body&gt;<br>
    &lt;/html&gt;<br>
    <br>
    and addbarcode.pt:<br>
    <br>
    &lt;html&gt;<br>
        &lt;body&gt;<br>
            &lt;h2&gt;Add barcode&lt;/h2&gt;<br>
            &lt;form tal:attributes="action view/url"  method="POST"&gt;<br>
                New Barcode text: &lt;input type="text" name="text"
    value="" /&gt;&lt;br /&gt;<br>
                &lt;input type="submit" value="Add Barcode Text" /&gt;<br>
            &lt;/form&gt;<br>
        &lt;/body&gt;<br>
    &lt;/html&gt;<br>
    <br>
    So, if I manually add some barcode text, I can see it listed on the
    index page, but when I try to add new barcode text using url:<br>
    <br>
    <a class="moz-txt-link-freetext" href="http://localhost:8080/test/addbarcode">http://localhost:8080/test/addbarcode</a> <br>
    <br>
    I can see just
    <meta charset="utf-8">
    "A system error occurred.", not form I have in addbarcode.pt  and in
    log file is "TypeError: Missing argument to update(): text". I must
    use this to add new text to the storage:<br>
    <br>
    <a class="moz-txt-link-freetext" href="http://localhost:8080/test/addbarcode?text=text1">http://localhost:8080/test/addbarcode?text=text1</a><br>
    <br>
    After that I can finally see form and add new barcode text.<br>
    <br>
    What I am doing wrong? Thanks for any help.<br>
    <br>
    Best Regards<br>
    <br>
    Lumir Jasiok<span class="Apple-style-span" style="border-collapse:
      separate; color: rgb(0, 0, 0); font-family: Times; font-style:
      normal; font-variant: normal; font-weight: normal; letter-spacing:
      normal; line-height: normal; orphans: 2; text-indent: 0px;
      text-transform: none; white-space: normal; widows: 2;
      word-spacing: 0px; font-size: medium;"> <br>
    </span>
    <pre class="moz-signature" cols="72">-- 
 Lumír Jasiok
 VSB-TU Ostrava - Computer centre
 Tel: +420 59 732 3189
 E-mail: <a class="moz-txt-link-abbreviated" href="mailto:lumir.jasiok@vsb.cz">lumir.jasiok@vsb.cz</a>
 <a class="moz-txt-link-freetext" href="http://www.vsb.cz">http://www.vsb.cz</a> 
</pre>
  </body>
</html>