I followed the example showed on "The Django Form Validation Framework
on Google App Engine" by Alexander Power. (http://code.google.com/intl/
zh-CN/appengine/articles/djangoforms.html). it works well.

But when I entered some string (not float number) in the target_price
feild and submited, a error message occured in the response page. just
like the following words:

  Traceback (most recent call last):
  File "C:\Documents and Settings\shenguochun\workspace\helloworld
\google\appengine\ext\webapp\__init__.py", line 501, in __call__
  File "C:\Documents and Settings\shenguochun\workspace\huiiu\src
\from.py", line 40, in post
    entity = data.save(commit=False)
  File "C:\Documents and Settings\shenguochun\workspace\helloworld
\google\appengine\ext\db\djangoforms.py", line 764, in save
    converted_data[name] = prop.make_value_from_form(value)
  File "C:\Documents and Settings\shenguochun\workspace\helloworld
\google\appengine\ext\db\djangoforms.py", line 205, in
make_value_from_form
    value = self.data_type(value)
ValueError: invalid literal for float(): sdg

So, can I write a custom validate function ? How ?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to