[web2py] Re: routest_onerror don't work after deploy

2011-09-09 Thread kachna
. 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"

[web2py] routest_onerror don't work after deploy

2011-09-08 Thread kachna
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

[web2py] DAL upload Field manual uplad to DB

2010-09-02 Thread kachna
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

[web2py] Re: resize image validator using PIL

2010-09-02 Thread kachna
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

[web2py] Re: resize image validator using PIL

2010-09-02 Thread kachna
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)

[web2py] resize image validator using PIL

2010-09-01 Thread kachna
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):

[web2py] DAL crossdatabase reference

2010-06-07 Thread kachna
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

[web2py] Re: Auth.profile() allow change email used as username

2010-05-19 Thread kachna
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

[web2py] Auth.profile() allow change email used as username

2010-05-19 Thread kachna
(like registration). I am not sure if this new feature or bug or I just missing somethig. Thank for your opinion. kachna

[web2py] Re: Form fielad with same name and validators

2010-03-10 Thread 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

[web2py] Re: alwaysdata deployment

2010-03-10 Thread kachna
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

[web2py] Form fielad with same name and validators

2010-03-10 Thread kachna
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

[web2py] Re: CRUD.update TypeError: list indices must be integers, not str

2010-03-05 Thread kachna
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['

[web2py] CRUD.update TypeError: list indices must be integers, not str

2010-03-04 Thread kachna
(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",