Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle App Engine + Validation
    primarykey
    data
    text
    <p>I am looking for how to do validation on Google App Engine and I have found only how to do it using Django framework. Ok Django approach is ok but if I have one form and this form have data from few tables what then??? I can not do it like this:</p> <pre><code>class Item(db.Model): name = db.StringProperty() quantity = db.IntegerProperty(default=1) target_price = db.FloatProperty() priority = db.StringProperty(default='Medium',choices=[ 'High', 'Medium', 'Low']) entry_time = db.DateTimeProperty(auto_now_add=True) added_by = db.UserProperty() class ItemForm(djangoforms.ModelForm): class Meta: model = Item exclude = ['added_by'] class MainPage(webapp.RequestHandler): def get(self): self.response.out.write('&lt;html&gt;&lt;body&gt;' '&lt;form method="POST" ' 'action="/"&gt;' '&lt;table&gt;') # This generates our shopping list form and writes it in the response self.response.out.write(ItemForm()) self.response.out.write('&lt;/table&gt;' '&lt;input type="submit"&gt;' '&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;') def post(self): data = ItemForm(data=self.request.POST) if data.is_valid(): # Save the data, and redirect to the view page entity = data.save(commit=False) entity.added_by = users.get_current_user() entity.put() self.redirect('/items.html') else: # Reprint the form self.response.out.write('&lt;html&gt;&lt;body&gt;' '&lt;form method="POST" ' 'action="/"&gt;' '&lt;table&gt;') self.response.out.write(data) self.response.out.write('&lt;/table&gt;' '&lt;input type="submit"&gt;' '&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;') </code></pre> <p>Is any easy way to validate form which contain data from few tables or I have to code it alone?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload