.
2) I am using routes_app (domain for every application) so
routes_onerror can't be in global routest.py (in web2py root) but it
must be in application routest.py
Hope it helps somebody
Bye!
On Sep 9, 2:38 am, kachna wrote:
> Hi,
> I am trying to catch "invalid request"
Hi,
I am trying to catch "invalid request" after requesting non-existing
file from static folder of application "eshop". My routest.py:
routes_onerror = [
#('eshop/400', '/eshop/default/HTTP_404'),
('*/*', '/eshop/default/HTTP_error')
]
routes_app = (
(r'.*http://meganaby
Hi once again today!
I am trying manual upload on table with upload field(book:
http://web2py.com/book/default/chapter/06#Manual-Uploads). My model
store data in database:
db.define_table('photo',
Field('photo', 'upload', uploadfield='photo_data'),
Field('photo_data', 'blob')
)
t
print 'resize exception:', e
return (value, self.error_message)
On 2 zář, 12:34, kachna wrote:
> Thanks for hint.
> Here is my working solution. It takes lot of time.
>
> def __call__(self, value):
>
> imp
torage object so the validator __call__ should return a
> cgi.FieldStoarge.
>
> On Sep 1, 3:50 pm, kachna wrote:
>
>
>
> > Hi,
> > I am trying to write validator to resize my image before storing in DB
> > field.
>
> > class RESIZE_IMG(object)
Hi,
I am trying to write validator to resize my image before storing in DB
field.
class RESIZE_IMG(object):
def __init__(self, isThumb=False, error_message='unresizable'):
(self.isThumb, self.error_message) = (isThumb, error_message)
def __call__(self, value):
Hi,
I am trying to define table with foreign key to the table stored in
different database on same server (MySQL).
db_sys # db_sys on localhost mysql
db_cs # db_cs on localhost mysql
db_sys.define_table('item',
Field('id_producer', db_sys.producer, requires=IS_IN_DB(db_sys,
'producer.id', '%(n
I have try it. In update it works fine but it is impossible to fill in
email in registration.There is read only field too.
On 19 kvě, 20:15, mdipierro wrote:
> On May 19, 12:09 pm, kachna wrote:
>
> > Hi,
> > I have problem with Atuh.profile(). It allows user to change his/her
(like registration). I am not sure if this
new feature or bug or I just missing somethig. Thank for your
opinion.
kachna
thanks for hint. It works fine when I send right values, but when I
send wrong one than values in field are still lists of all values.
On 10 bře, 15:09, mdipierro wrote:
> requires=IS_LIST_OF(IS_TIME())
>
> On Mar 10, 4:45 am, kachna wrote:
>
>
>
> > Hi,
> > I wan
I followed manual and everything works fine. But there is problem whit
translation of code. Google translator try to translate it to and it
make some mistakes there. So it is better to use codes form original
site.
On 6 bře, 23:21, pistachio wrote:
> Hi guys,
>
> I know there is a wiki page on th
Hi,
I want to build form where user can edit or insert many records. I
prepare form where are many rows of INPUT fields and this fields have
same names. After send this form a receive in
request.vars['INPUTs_name'] list of filled in values. It is ok. But
when I use validator it don't let pass anyon
omehow one of your variables does not contain what you expect. Try
> logging them:
>
> @auth.requires_login()
> def edit():
> print request.vars['tbl'], request.vars['id']
> form_edit = crud.update(db[request.vars['tbl']],
> request.vars['
(0, 2))
)
CONTROLLER:
@auth.requires_login()
def edit():
form_edit = crud.update(db[request.vars['tbl']], request.vars['id'])
return dict(form=form_edit)
COMPLETE ERROR:
Traceback (most recent call last):
File "/home/kachna/work/web2py/gluon/restricted.py",
14 matches
Mail list logo