[web2py] small modification in the welcome application

2010-06-02 Thread hamdy.a.farag
Hi The default behavior for registration is that a user can register without password if he just let the pass field empty is not this wrong? Is not it better to add a line to the db.py in it like: db.auth_user.password.requires = [IS_NOT_EMPTY()] to enforce this behavior for any application creat

[web2py] Re: small modification in the welcome application

2010-06-02 Thread hamdy.a.farag
I also suggest another modification, to have a global messaging system in any application in db.py for the welcome scaffolding application, I suggest adding: from gluon.storage import Messages messages = Messages(T) Now a developer is free to set all his messages using the messages reference and

[web2py] Re: How to get the filename from an upload field?

2010-06-02 Thread hamdy.a.farag
assuming you've def index(): form = SQLFORM(db.tab) if form.accepts(request.vars, session): response.flash = 'x' records = db().select(db.tab.ALL) return dict(form=form, records=records) then in view you can do something like: {{extend 'layout.html'}} {{=form}}

[web2py] Re: How to get the filename from an upload field?

2010-06-02 Thread hamdy.a.farag
oh btw the image part should look like: {{=IMG(_src=URL(r=request, c='default', f='download', args=[record.x]))}} On Jun 2, 2:21 pm, "hamdy.a.farag" wrote: > assuming you've > > def index(): >     form = SQLFORM(db.tab) >     if form.accept

[web2py] Re: Hiding fields in a form, depending on a drop down list

2010-06-02 Thread hamdy.a.farag
more clarification please? you can do something like the following [just the logic] db.define_table('my_table', Field('x',.), Field('y',)) in your controller query = (db.y.id>0) my_list = [row.name for row in db(query).select()] db.my_table.y.requires=IS_IN_LIST(my_list) if var not in m

[web2py] Re: Hiding fields in a form, depending on a drop down list

2010-06-02 Thread hamdy.a.farag
IS_IN_SET Sorry

[web2py] Re: small modification in the welcome application

2010-06-02 Thread hamdy.a.farag
what about reusing messages in another applications ? can you guarantee that all your coworkers use the same typical string ? ex: error_message = T('warning, you're not authorized to access ...') another developer could do: error_message = T('you're not authorized to access this page') think of ho

[web2py] Re: remove registration link in auth login page

2010-06-02 Thread hamdy.a.farag
Don't forget to disable registration altogether, otherwise a user can use /default/user/register link to add himself and thus may have access to things you don't want him to add the line: auth.settings.actions_disabled.append('register') in your model

[web2py] Re: Frivolous request for login/logout

2010-06-02 Thread hamdy.a.farag
in your model add something like def set_message(form): session.flash = T('hello %(name)s', dict(name=auth.user and auth.user.first_name)) auth.settings.login_onaccept = set_message

[web2py] Re: remove registration link in auth login page

2010-06-02 Thread hamdy.a.farag
sure !! you'll have to make a small modification in controller default/user def user(): form = auth() if request.args(0) == 'register': session.flash = 'Registration disabled' redirect(URL(r=request, c='default', f='index')) return dict(form=form) On Jun 2, 7:03 pm, Ja

[web2py] Re: Invalid reset password

2010-06-02 Thread hamdy.a.farag
Since we're talking about retrieve password I've another issue that needs a fix in tools.py please add those self.settings.retrieve_password_onvalidation = lambda:None # or None self.settings.reset_password_onvalidation = lambda:None # or None I wanted to limit this functionality so I had to

[web2py] Re: Frivolous request for login/logout

2010-06-03 Thread hamdy.a.farag
This's not working !! you need to set the message before actually logged in !! your solution just set the message after user is actually logged in so it's useless moreover, setting the logout message will not work, unless the index page itself has no flash message set or else the flash message in

[web2py] Re: error occurs when select all fields from a legacy datatable without id field

2010-06-03 Thread hamdy.a.farag
in legacy databases, you should manually create a field called id for each table and set it to be a primary key you need in your model db.py , to set migrate=False for every table definition On Jun 3, 11:17 am, hywang wrote: > there is a legacy datatable named 'test' > +---+--+---

[web2py] Re: Frivolous request for login/logout

2010-06-03 Thread hamdy.a.farag
Hi annet Saying it's useless I meant that setting the message after logging in , I didn't mean to be mean at all, sorry that you misunderstood me :) Now let's rethink you solution : It will work right ? but when ? it will work if you just in the index page made something like: def index():

[web2py] Re: Frivolous request for login/logout

2010-06-03 Thread hamdy.a.farag
on the ideal case , most people don't force login_url because suppose for example, you've a login form above in the banner of your web app and when user stands in a specific page and enters his user/pass in login form , ...you don't want him to leave the current page right? moreover your web site

[web2py] Re: Multiple instances of same application

2010-06-03 Thread hamdy.a.farag
Well, If I well understood the problem, I think you can have something like: 0.py with a connection to a shared database database_to_use = request.application db = DAL(shared_db) db.define_table(Field('db_name', 'string')) row = db().select(db.shared_db.db_name==database_to_use).select().first() i

[web2py] Re: The state of the wiki and documentation in general

2010-02-04 Thread hamdy.a.farag
Hi >The problem is that only few people are willing to or can contribute their >time. I want to contribute in documentation so if there's a plan for documentation , let me know and I'm ready . Regards Hamdy -- You received this message because you are subscribed to the Google Groups "web2py

[web2py] Making a custom Rows object

2010-02-05 Thread hamdy.a.farag
Hi I was curious, how to make my own custom Rows object out of some records I didn't succeed to get it work records = [] id = auth.id_group(CEO) x = db(db.auth_membership.group_id == id ).select(db.auth_membership.user_id) for man in x: records.append(db.auth_user[man.user_i

[web2py] calling form through ajax fails even using formname=None

2010-02-07 Thread hamdy.a.farag
Hi I've this particular case : def governorate(): form = crud.create(db.governorate) return dict(governorates=governorates, form=form) def edit_governorate(): form = SQLFORM(db.governorate ,request.vars.gov_id) if form.accepts(request.vars, formname='n

[web2py] Re: calling form through ajax fails even using formname=None

2010-02-07 Thread hamdy.a.farag
ok 1st of all, I don't use "web2py_ajax_page" functions and the particular code looks like : def governorate(): form = crud.create(db.governorate) query = auth.accessible_query('CAN_VIEW', db.governorate, auth.user.id) governorates=db(query).select(orderby=db.governorate.name) r

[web2py] Re: calling form through ajax fails even using formname=None

2010-02-08 Thread hamdy.a.farag
ًWell, Thanks alot it worked just fine :) I changeed request.args(0) to request.vars.gov_id which I'm using I've a question though, what does form['_action']=URL(r=request,f='governorate',vars=request.vars) do exactly ? Thank you -- You received this message because you are subscribed to the

[web2py] flash message timeout

2010-02-12 Thread hamdy.a.farag
Hi I was curious, How to make the flash message disappear after a while I also read about something called "jDiv" which I didn't find , is it a custom helper used in one of the appliances ? Thank you -- You received this message because you are subscribed to the Google Groups "web2py-use

[web2py] Re: flash message timeout

2010-02-13 Thread hamdy.a.farag
thank you :) -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at

[web2py] onvalidation problem

2010-02-13 Thread hamdy.a.farag
Hi I've a problem using onvalidation in a SQLFORM -> if form.accepts(request.vars, session, onvalidation=validate)where validate is another function that makes the validation current web2py version I'm running is ok , any new application I make is working just fine with onvalidation excep

[web2py] fcgi problem

2010-02-14 Thread hamdy.a.farag
Hi I've problems running web2py with nginx webserver and fcgi I'm brandy new to this and the tutorial I found talks about lighttpd web server so any hints about that ? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send

[web2py] Re: onvalidation problem

2010-02-14 Thread hamdy.a.farag
I posted the code on private -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visi

[web2py] optgroup support

2010-02-15 Thread hamdy.a.farag
Hi I read this post http://groups.google.com/group/web2py/browse_thread/thread/f9967ef7151c5ae8/d0c47ff7a40e0dfc?lnk=gst&q=OPTGROUP#d0c47ff7a40e0dfc and I didn't find optgroup in html.py either so why not adding it since from time to time people may need it? -- You received this message beca

[web2py] flush cache

2010-02-16 Thread hamdy.a.farag
Hi it's important that we've a cache say for example for example in a tag cloud that shows the recently added products to database but how can I force some cached function to flush cache and re-read database based on certain situations like [admin adds new product, and want to flush cache of a the

[web2py] Re: flush cache

2010-02-16 Thread hamdy.a.farag
:) Aha thanks -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group a

[web2py] Re: flush cache

2010-02-16 Thread hamdy.a.farag
This's also cool, thank you -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visi

[web2py] small improvement to TK gui

2010-02-21 Thread hamdy.a.farag
Hi the TK gui is very annoying in that to start the server a click on the start server button is required can you add a listener for the enter key ? it will be easier and more friendly if someone used it -- You received this message because you are subscribed to the Google Groups "web2py-user

[web2py] Re: small improvement to TK gui

2010-02-21 Thread hamdy.a.farag
>actually if you do >python web2py.py -i ip_address -p port_number -a "password" >there will be no gui. >The tk gui could use some general cleanup by somebody who understands tk a lot >better than I do. :) I know that , actually There is no need to do many improvements in the TK gui, it's

[web2py] what distinguishes update form from create form

2010-02-22 Thread hamdy.a.farag
Hi I was curious , what distinguishes update form from create from in crud, and SQLFORM ? I mean when form is submitted what makes web2py distinguish between both criteria -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, s

[web2py] Re: Groups.

2010-02-22 Thread hamdy.a.farag
Hi Matt add auth.settings.create_user_groups = True in db.py then for every user created a new group is created for him with the name 'user_id' To add a custom group once, you may add a function to your model that do the post-registeration stuff [including adding groups] def post-registeration_s

[web2py] Re: what distinguishes update form from create form

2010-02-23 Thread hamdy.a.farag
can't get it sorry !! is not there a special form variable that distinguishes between insertion and update ? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this

[web2py] Re: what distinguishes update form from create form

2010-02-23 Thread hamdy.a.farag
:) well what can I say ? Thank you very much but I know this :) I guess I didn't make question clear enough , sorry SQLFORM, crud are both kinds of forms and forms differ in form.vars that they hold my question was about form.vars i gues now that update fom should contain form.vars.record, form.

[web2py] Re: what distinguishes update form from create form

2010-02-23 Thread hamdy.a.farag
Thank you , this was sufficient Regards, Hamdy -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. Fo

[web2py] Re: Recaptcha doesn't play nice with crud

2010-02-26 Thread hamdy.a.farag
Hi The reason for this is that any field added to a form needs to be added b4 if form.accepts() so that validation can work , otherwise validation will not work in case of "crud" , accepting form is already done for you in web2py's code and actually b4 inserting the new field and thus validation w

[web2py] Possibly a bug in coding against an existing form

2010-02-28 Thread hamdy.a.farag
Hi Looking into this thread http://groups.google.com/group/web2py/browse_thread/thread/8c0479e1df9df3e3/be160c757aa666b8?lnk=gst&q=code+against+existing+form#be160c757aa666b8 I had the same problem: I had in my view a form : - f

[web2py] Re: Possibly a bug in coding against an existing form

2010-03-02 Thread hamdy.a.farag
OK, Thanks alot -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group

[web2py] deleting user groups

2010-03-03 Thread hamdy.a.farag
Hi there's a problem in removing users , one has to delete the special group (user_id )for the user so that all his permissions are dropped why not adding a functionality to delete the special user_group automatically ? -- You received this message because you are subscribed to the Google G

[web2py] Re: auth_group

2010-03-17 Thread hamdy.a.farag
Hi weheh if you've added this line to your db.py model auth.settings.create_user_groups = True then you'll have a group created automatically per registering a new user and called 'user_id' where id is the id of the registered user then you can add permissions on that group as you wish and if y

[web2py] Re: custom validation problem

2010-03-17 Thread hamdy.a.farag
Hi Mohammed, I faced a problem like this one b4 and simply as mdipierro said it was a logic problem try the validation function with the minimal code that works then add line by line and check whether it works or not then you'll detect when it fails Oh BTW if form.accepts(request.vars,session, o

[web2py] appliance typo

2010-03-29 Thread hamdy.a.farag
Hi in the appliacnce 'appliances' http://web2py.com/appliances/default/show/4 there's a typo in appadmin.py line 125 except: reponse.flash='unable to parse csv file' should be except: response.flash='unable to parse csv file' -- You received this message because you are subscribed to the Go

[web2py] Re: appliance typo

2010-03-30 Thread hamdy.a.farag
On Mar 30, 1:41 am, Richard wrote: > would be good not to have a catch all except too, which can mask other > errors. or catch them but in the same time log them via a logging system -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to t

[web2py] language file problem

2010-03-31 Thread hamdy.a.farag
Hi I'm having a problem that was repeated too much sometimes the translation file , got messy while updating it with new translations translations are shifted from their proper place and thus you got un proper translations This also may have some side effects like making the whole application fail

[web2py] Re: Errors with the new version

2010-04-04 Thread hamdy.a.farag
I also have some comments on the latest version in repo in auth.login() captcha = self.settings.login_captcha or self.settings.captcha this's had a bad effect for web applications having the login form in the index page This made the captcha appear in that form , the thing that had a bad effect

[web2py] Re: Errors with the new version

2010-04-04 Thread hamdy.a.farag
There's also another suggestion The crud.update() forms doesn't display the 'record deleted message' flash message in case of deleting records instead it displays 'record updated' in function update of the Crud class I suggest adding : if form.accepts(request.post_vars, _session, formname=_formn

[web2py] Re: Errors with the new version

2010-04-05 Thread hamdy.a.farag
rd or deleting it using crud.update() On Apr 4, 6:37 pm, mdipierro wrote: > Can you please email me a patch or the updated tools.py? Thanks > > Massimo > > On Apr 4, 5:07 am, "hamdy.a.farag" wrote: -- You received this message because you are subscribed to the Google Gr

[web2py] Re: Authentication: form just refreshes, won't validate login

2010-04-10 Thread hamdy.a.farag
Hi Keith Edmunds , This's most likely to happen if you've more than one form in the same page so the question is , do you've another form inside the page ? -- To unsubscribe, reply using "remove me" as the subject.

[web2py] a bug in sqlhtml

2010-04-11 Thread hamdy.a.farag
Hi There's a bug in sqlhtml preventing proper image storage in database in case of using dbio=False Massimo, I sent you a patch that fixed it , have you noticed it ? -- To unsubscribe, reply using "remove me" as the subject.

[web2py] Re: a bug in sqlhtml

2010-04-11 Thread hamdy.a.farag
There's likely a bug in sqlhtml preventing images to be stored correctly in db in case of using SQLFORM(db.table) where db.tale has a field of type 'upload' and the field is used to upload an image , this happens only when using if form.accepts(request,vars, session, dbio=False): blahblahblah

[web2py] Re: a bug in sqlhtml

2010-04-11 Thread hamdy.a.farag
sorry for the adds , I don't use may mail usually to post in the group -- To unsubscribe, reply using "remove me" as the subject.

[web2py] Re: a bug in sqlhtml

2010-04-11 Thread hamdy.a.farag
Hi Massimo, if this could break backward compatibility, The problem could be solved by doing the equality on the web application itself in the accepts() function but this has to be considered to be documented if you took that path -- To unsubscribe, reply using "remove me" as the subject.

[web2py] Re: a bug in sqlhtml

2010-04-11 Thread hamdy.a.farag
If this would be a problem, I already did solved it, as I could remember by doing something like form=SQLFORM(db.table) if form.accepts(...,dbio=False): request.vars.image = form.vars.image_newfilename .. btw: I guess db.table.insert(**form.vars) also is not working I've to do

[web2py] A bug in lazyT in languages.py

2010-04-21 Thread hamdy.a.farag
Hi when trying to get the rss feeds to work I made something like : 'title' : T('my_title') 'link' : '' 'description':T('my_description') 'created_on' : '', 'entries' But I gor that error " no rss, so I opened my generic.rss file and printed the exception error message I got the error : l

[web2py] Re: A bug in lazyT in languages.py

2010-04-21 Thread hamdy.a.farag
T('my_description')) >  'created_on' : '', >  'entries' > > On Apr 21, 7:04 am, "hamdy.a.farag" wrote: > > > > > Hi > > > when trying to get the rss feeds to work I made something like : > > > 'title

[web2py] Re: job

2010-04-26 Thread hamdy.a.farag
Hi Jason, you need to register there and complete an english language exam and pass before you're able to apply to jobs read the odesk help. On Apr 25, 7:27 am, Jason Brower wrote: > I tried applying for it, and it didn't do anything.  Why can't they just > give me an email. Sheesh. > Jason > >

[web2py] Re: web2py-zen

2010-04-28 Thread hamdy.a.farag
:) me

[web2py] Re: web2py-zen

2010-04-28 Thread hamdy.a.farag
Thanks In fact as I told you b4, I'm digging into this group to get the information which is wealthy . I also thought I could make it a surprise but I couldn't :)

[web2py:33117] datetime is not displayed correctly

2009-10-18 Thread hamdy.a.farag
Hi I've a problem displaying datetime when I make : Field("dateAndTimeOfCreation", 'datetime', requires=IS_DATETIME(), default= datetime.datetime.today()) this is displayed as : datetime.datetime(.., .., .., .., .., ..., ..) How can I make it appear normal without the "datetime.datetime" pre

[web2py:33122] Re: datetime is not displayed correctly

2009-10-18 Thread hamdy.a.farag
I'm making a profile to view companies that can be entered to the database and here's a part of my model (db.py) db.define_table("companies", Field("name", "string", requires=[IS_NOT_EMPTY(), IS_NOT_IN_DB(db, 'companies.name')]), Field("capital", "string", require

[web2py:33123] Re: datetime is not displayed correctly

2009-10-18 Thread hamdy.a.farag
I use slackware 12.2, firefox 3.5.3 web2py Version 1.67.2 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this g

[web2py:33126] Re: datetime is not displayed correctly

2009-10-18 Thread hamdy.a.farag
Thanks Mdipierro for your patience and help It worked ... :) thanks again --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubs

[web2py:33396] how to create custom decorators

2009-10-22 Thread hamdy.a.farag
Hi suppose I'm doing a controller file containing my custom decorators deco1(): deco2(): .. How to register my controllers so that , any where (different controllers) in my application I can use them as @deco1 myFunction(): - --~--~-~--~~--

[web2py:33415] Re: how to create custom decorators

2009-10-22 Thread hamdy.a.farag
thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.

[web2py:33484] difference between fields= [] and Fields = []

2009-10-22 Thread hamdy.a.farag
Hi, supposing I've a function in my controller as follows def new_recipe(): form = SQLFORM(db.recipe, fields= ['title','description']) return dict(form=form) which returns the form to the view where 2 fields are only seen by user my question is: when I changed 'fields' to 'Fields', I g

[web2py:33491] Re: difference between fields= [] and Fields = []

2009-10-22 Thread hamdy.a.farag
aha ... thank you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@go

[web2py:33563] is not it better if there's a more strict syntax checking ?

2009-10-24 Thread hamdy.a.farag
Hi After posting this post : http://groups.google.com/group/web2py/browse_thread/thread/d563b39812111a8d and I'm always finding somethings like this which causes problems here's another example import datetime db = DAL("mysql://root:t...@localhost/cockbook") db.define_table('category', Field('

[web2py:33903] doctesting

2009-10-28 Thread hamdy.a.farag
sorry for the inconvenience, this question may be repeated a friend of mine can't just post in the group (may be he's just not approved to join) but he's having a problem testing SQLFORM using doctesting So how can this be done ? def using_doc_testing(): ''' >>> contactForm1 = SQLFOR

[web2py:35715] text direction in authentication forms

2009-11-20 Thread hamdy.a.farag
Hi How can I set the text direction to follow the default orientation of the selected language in my system suppose my default language selected in system is english, then text flows from left right in user_name field and also in last name, mail, password if I turned my language to a Right to L

[web2py:35725] Re: text direction in authentication forms

2009-11-20 Thread hamdy.a.farag
Thank you for the trick :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsu

[web2py:35789] an error in page 219

2009-11-22 Thread hamdy.a.farag
Hi I don't know whether some one else reported this or not , and I'm sorry if so Manual, page 219 has an error : form.custom.labels[fieldname] , it should be form.custom.label [fieldname] labels is wrong and the right is label --~--~-~--~~~---~--~~ You received

[web2py:35793] Re: an error in page 219

2009-11-22 Thread hamdy.a.farag
couldn't edit the errata page, so I added a comment with the error --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe fro

[web2py:35913] How to multi-line session.flash

2009-11-24 Thread hamdy.a.farag
Hi How can I make response.flash display a message containing new line characters ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com T

[web2py:36332] sign in form , email field validation problem

2009-12-01 Thread hamdy.a.farag
Hi I got a problem using the sign in form I got the email field and password field Now email field is not validated as expected , when letting it empty I got the error message "enter a value" which I can't translate . if I entered any characters in it I got nothing looking into Auth() in the l

[web2py:36409] Re: sign in form , email field validation problem

2009-12-02 Thread hamdy.a.farag
Thanks for this But I've a comment for my application , the authentication uses email address and password and I make a label besides the text field where users enters his email address . The label just says "Enter your Email address" so I simply want user to know I want him to enter an email add

[web2py:36855] Re: if not logged in graceful redirect to login page

2009-12-09 Thread hamdy.a.farag
--Quote from web2py manual - auth.settings.login_next = URL(r=request, f='index') By default, the login page, after successful login, redirects the visitor to the referrer page (if and only if the referrer required login). If there is no referrer, it redirects the visitor to the page

[web2py:36941] Re: Recaptcha not working in Login

2009-12-10 Thread hamdy.a.farag
Hi ed I assume you upgraded your web2py to the latest svn version Now you can do : def login(): auth.settings.login_catpcha = Recaptcha (request,public_key,private_key) form = auth.login() see the auth.settings.login_captcha - not auth.settings.captcha- ? may be here's your problem I t

[web2py:36942] Re: Recaptcha not working in Login

2009-12-10 Thread hamdy.a.farag
what I can't understand actually is that : using latest svn version and removing lines : ''' if self.settings.login_captcha != None: form[0].insert(-1, TR('', self.settings.login_captcha, ''))''' "" from tools.py I managed to have ed's code running : so something li

[web2py:36954] Re: Recaptcha not working in Login

2009-12-10 Thread hamdy.a.farag
well, it worked for me and I was able to login as well may be some other guy can test it as well -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send

[web2py:37538] Re: Recaptcha not working in Login

2009-12-18 Thread hamdy.a.farag
mdipierro , you were absolutely right , it worked for me coz I just entered the right characters in recaptch and I was able to login , although it would have been worked if I entered any garbage characters as well since there's no validation actually on recaptcha sorry for not testing right in the

[web2py:37579] Re: SQLFORM, no-table, with fieldsets.

2009-12-19 Thread hamdy.a.farag
Hi There @mdipierro , whether SQLFORM was refactored or there will be a new kind of form , still this's important and needs to be of high priority I work in a team that faced many problems using the current SQLFORM 1st if you're work in agile environment , then you don't necessarily see the whol

[web2py:37582] Re: SQLFORM, no-table, with fieldsets.

2009-12-19 Thread hamdy.a.farag
well, suppose you've a form for registeration that's related to auth_user table Now you can register new users and no problem suppose after a while you need a page where manager can add special users to them , [firs_name, last_name , ..] but in the registration form you need a new field to b

[web2py:37664] Re: bug in recent versions of web2py related to unicode encoding in mail()

2009-12-22 Thread hamdy.a.farag
Hi there I'd the same problem I couldn't send arabic messages whatever I did and the encoding='utf-8' option seems also not working I tried all the above tricks but invain then I tried to convert both subject and message to utf-8 so I did it for subjet : subject = unicode(form.vars.subject) an

[web2py:37689] Re: bug in recent versions of web2py related to unicode encoding in mail()

2009-12-22 Thread hamdy.a.farag
thanks mdipierro I've a small comment on this, which I forgot to say last time in the regular [classic] case using something like : mail.send(to=., subject= form.vars.subject, message=form.vars.message) when sending arabic characters via subject and body this caused an exception on windows

[web2py:37726] Re: bug in recent versions of web2py related to unicode encoding in mail()

2009-12-22 Thread hamdy.a.farag
sure I will do it today and give you a feed back -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. Fo

[web2py:37732] Re: bug in recent versions of web2py related to unicode encoding in mail()

2009-12-22 Thread hamdy.a.farag
Thanks mdipierro It works very fine in both windows for internet explorer 8, firefox, chrome and for linux it worked fine on firefox I tested only arabic characters, only english characters, and mixed words between arabic and english BTW: Can you provide me for a patch for this bug so that I can

[web2py:37733] Re: bug in recent versions of web2py related to unicode encoding in mail()

2009-12-23 Thread hamdy.a.farag
Now every body can just do: mail.send(to=email=email, subject=contactForm.vars.subject, message=contactForm.vars.subject) AND unicode is handled by default -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web

[web2py] validation problems

2010-01-19 Thread hamdy.a.farag
Hi I'm having 2 problems : I've a problem translating a custom error message in the : IS_INT_IN_RANGE(v1, v2, error_message=T("enter a value between %(min) s and %(max)s",dict(min=str(v1), max=str(v2+1 it also fails to do : error = T("enter a value between %(min)s and %(max)s",dict(min=st

[web2py] Re: validation problems

2010-01-19 Thread hamdy.a.farag
I also have this problem: db.table_name.field.requires = IS_EXPR('%i <= value <= %i'%(5, 7)) FORM= .. Not working while doing print IS_EXPR('%i <= value <= %i'%(5, 7))(6) -> (6, None) so How can I get it work ? do I have to replace the 'value' keyword with something ? -- Y

[web2py] Re: validation problems

2010-01-19 Thread hamdy.a.farag
Hi sorry I didn't notice that I was trying to add the validation after defining the form But for other problems, let me be clear about them 1 - I want to have the error message be translated, in case of IS_INT_IN_RANGE(v1, v2, error_message=...) So I did the following error =

[web2py] Re: validation problems

2010-01-19 Thread hamdy.a.farag
Hi @ Densel , thanks for replying but I can't get it done replacing the , with % I keep having this error -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from th

[web2py] Re: validation problems

2010-01-19 Thread hamdy.a.farag
self.error_message = error_message % dict(min=self.minimum, max=self.maximum-1) TypeError: unsupported operand type(s) for %: 'lazyT' and 'dict' -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegro

[web2py] Re: validation problems

2010-01-19 Thread hamdy.a.farag
So this's a bug ? Is not any way to handle this ? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. F

[web2py] Re: validation problems

2010-01-19 Thread hamdy.a.farag
and for my other problem thanks for the link , but what I rellay need to do is to query database based on a value of another field and fetch a value out of there then compare it with the value in the current field so I need to do something like :- db.table.field = IS_EXPR('value< db (db.auth_user

[web2py] Re: validation problems

2010-01-20 Thread hamdy.a.farag
Thank you Denzel for replying for the IS_EXPR(), In fact I did my own validator that does what I need It's nice though to know about "onvalidation" which makes life easier For the other translation problem, I guess after all that error messages where ever they're should be made easy to translate

[web2py] suggestion for a feature

2010-01-21 Thread hamdy.a.farag
Hi Is not it nice to have toutes.py in my models/ so that I can have a route system on the application level and in the same time I can have something like: id = None if request.function == show: id = db(db.table.name == request.args(0)).select(db.table.id) [0].id routres_in = (...

[web2py] Re: validation problems

2010-01-21 Thread hamdy.a.farag
aha, sorry for the misunderstanding Thanks, -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For mor

[web2py] Re: validation problems

2010-01-22 Thread hamdy.a.farag
Hi >>So you can do >>IS_INT_IN_RANGE(v1, v2, error_message=T("enter a value between %(min)s and >>%(max)s")) >>or any other string containing the min and max mapping keys, @Denzel I can't get it working using this either I also have a nother question : In google chrome the upload field disp

  1   2   >