[web2py] Re: dependent drop down list

2010-06-02 Thread Neveen Adel
Hello tracey, you will define your action in default.py as : def fun(): return #whatever then in index.html: $('#country_state').change(function(){ $.ajax( 'fun', ['country_state'],'id_of the second drop down' ) } Iceberg send the following link :

[web2py] placeholder instead of image preview

2010-06-02 Thread annet
I have the following function: db.define_table('image', Field('company_id',db.company), Field('filename',writable=False,readable=False), Field('file',type='upload',default='',notnull=True,autodelete=True), migrate=False) The problem is that crud.update shows a placeholder for the

[web2py] sender's name in mail

2010-06-02 Thread Rohan
I want to add sender's name in emails. Currently I am able to send mails from ad...@example.com but sender's name is displayed as admin which is not conveying the proper information. Can I add senders' name to mail settings so that sender's name is displayed as Example Admin or XYZ instead of

[web2py] Re: sender's name in mail

2010-06-02 Thread Iceberg
Try specify your sender's name as: XYZ ad...@example.com On Jun2, 2:52pm, Rohan yourbuddyro...@gmail.com wrote: I want to add sender's name in emails. Currently I am able to send mails from ad...@example.com but sender's name is displayed as admin which is not conveying the proper

[web2py] Frivolous request for login/logout

2010-06-02 Thread weheh
I suppose there's no easy way to get your login message to say something like this: auth.messages.logged_in=T('Welcome ')+auth.user.username Without fully customizing the login controller. Right? Same goes for logout.

[web2py] Re: Newbie question on self-submitting form

2010-06-02 Thread NoNoNo
actually, what i was trying to achieve is provide a form to the visitor to input a page number if there are multi pages. The current problem is, when a page number is submitted, the visitor is not redirected to that page. I hope I made the question clear. Thank you. BTW, there is a CRUD to submit

[web2py] Re: Debian Packaging

2010-06-02 Thread Mark Breedveld
Hello everyone, I've took a look at build.opensuse.org and seems to be good. I haven't tested it, but because I do not have time for that. But I see how it works and packing web2py should not be a problem. Because it's mainly moving files around and checking depencies. But as far as I could see

[web2py] Re: Debian Packaging

2010-06-02 Thread Mark Breedveld
Ps. does anyone know how to contact dimo or his progress on the gluon packages? On 2 jun, 09:56, Mark Breedveld m.breedv...@solcon.nl wrote: Hello everyone, I've took a look at build.opensuse.org and seems to be good. I haven't tested it, but because I do not have time for that. But I see

[web2py] Re: Debian Packaging

2010-06-02 Thread Mark Breedveld
Correction his name was Dima On 2 jun, 09:57, Mark Breedveld m.breedv...@solcon.nl wrote: Ps. does anyone know how to contactdimoor his progress on the gluon packages? On 2 jun, 09:56, Mark Breedveld m.breedv...@solcon.nl wrote: Hello everyone, I've took a look at build.opensuse.org and

[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

[web2py] Re: Debian Packaging

2010-06-02 Thread Mark Breedveld
Correction; I just find out how to build debian packages with build.opensuse.org http://wiki.opensuse.org/openSUSE:Build_Service_Debian_builds So now it seems is a very good plan. regards Mark Breedveld On 2 jun, 09:57, Mark Breedveld m.breedv...@solcon.nl wrote: Ps. does anyone know how to

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

2010-06-02 Thread Sverre
I have an upload field in the DB an want to display the original filename in a view. How can I do that?

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

2010-06-02 Thread Thadeus Burgess
Taken from http://web2py.com/book/default/section/7/2?search=original+filename Occasionally you may want to store the original filename in a database field. In this case, you need to modify the model and add a field to store it in: db.define_table('person', Field('name',

[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 Sverre
Not really. The information about the filename must be coded into the filename in the uploadfolder. But how to get the filename? On 2 Jun, 11:10, Thadeus Burgess thade...@thadeusb.com wrote: Taken fromhttp://web2py.com/book/default/section/7/2?search=original+filename Occasionally you may want

[web2py] Re: flawed architecture creating race condition for database writes

2010-06-02 Thread Carl
thanks Richard. I'm going to stick with a web2py solution and remodel my approach. Instead of creating the troublesome row at invite time I'm going to create it when a Candidate checks their invites. In the service I'm building each invite is unique to a Candidate so I won't have Candidates

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

2010-06-02 Thread Sverre
I want to hide fields in a form, depending on the values of a dropdown list. Has some a solution?

[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}} table

[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 hamdy.a.fa...@inbox.com wrote: assuming you've def index():     form = SQLFORM(db.tab)     if form.accepts(request.vars, session):        

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

2010-06-02 Thread Sverre
Thank you, that was the solution I've seached for. On 2 Jun, 13:21, hamdy.a.farag hamdy.a.fa...@inbox.com wrote: assuming you've def index():     form = SQLFORM(db.tab)     if form.accepts(request.vars, session):         response.flash = 'x'     records = db().select(db.tab.ALL)    

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

2010-06-02 Thread Mr admin
Here's a section of the book that explains how to do conditional fields on forms. http://web2py.com/book/default/section/10/2?search=spouse On Wed, Jun 2, 2010 at 6:14 AM, Sverre sverreodeg...@gmail.com wrote: I want to hide fields in a form, depending on the values of a dropdown list. Has

[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.id0) my_list = [row.name for row in db(query).select()] db.my_table.y.requires=IS_IN_LIST(my_list) if var not in

[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] routes to have userprofile pages

2010-06-02 Thread ChrisM
I searched through the list but couldn't find any discussion on this topic. Any ideas how the following can be achieved with routes.py www.appname.com\userprofilename I am guessing that there would need to be a db.auth lookup to match the userprofilename and then pass that to a generic

[web2py] variables turning into lists

2010-06-02 Thread Andrew Buchan
Hello, I've had this issue before, where a string which is passed as part of request.vars somehow becomes a list when the form is submitted. The way I got round it at the time was by doing: if isinstance(thread_id, list): thread_id = thread_id[0] However, that just doesn't feel right, and

[web2py] Web2py in Ireland

2010-06-02 Thread ChrisM
Calling all users in Ireland I would love to here from you. Regards Chrism

[web2py] Re: Invalid reset password

2010-06-02 Thread mdipierro
what database system? On Jun 2, 12:13 am, weheh richard_gor...@verizon.net wrote: Massimo, now we're getting somewhere. Thanks. However, I ran into this error: Traceback (most recent call last):   File C:\web2py\gluon\restricted.py, line 178, in restricted     exec ccode in environment  

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

2010-06-02 Thread Sverre
Thanks! On 2 Jun, 13:54, Mr admin mr.netad...@gmail.com wrote: Here's a section of the book that explains how to do conditional fields on forms. http://web2py.com/book/default/section/10/2?search=spouse On Wed, Jun 2, 2010 at 6:14 AM, Sverre sverreodeg...@gmail.com wrote: I want to

[web2py] Re: Frivolous request for login/logout

2010-06-02 Thread mdipierro
hmmm. let me think about it. On Jun 2, 2:04 am, weheh richard_gor...@verizon.net wrote: I suppose there's no easy way to get your login message to say something like this: auth.messages.logged_in=T('Welcome ')+auth.user.username Without fully customizing the login controller. Right? Same

Re: [web2py] Re: small modification in the welcome application

2010-06-02 Thread Álvaro Justen
On Wed, Jun 2, 2010 at 06:54, hamdy.a.farag hamdy.a.fa...@inbox.com wrote: 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)

[web2py] remove registration link in auth login page

2010-06-02 Thread ceriox
how i can remove the link to registration page in auth login page? i want only registered user can insert a new user

[web2py] Re: python 2.4 support

2010-06-02 Thread Cory Coager
Still looking for help if anyone has the answer.

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

2010-06-02 Thread mdipierro
edit views/default/user.html On Jun 2, 9:16 am, ceriox cer...@gmail.com wrote: how i can remove the link to registration page in auth login page? i want only registered user can insert a new user

[web2py] Re: python 2.4 support

2010-06-02 Thread mdipierro
Yes but you need to use virtualenv. Perhaps somebody else can help you more with that. Massimo On May 31, 11:37 am, Cory Coager ccoa...@gmail.com wrote: Sorry I should have been more clear, its a shared web host running python 2.4.  I do not have root access.  Will this still be possible?

[web2py] Re: routes to have userprofile pages

2010-06-02 Thread mdipierro
Can you explain more? On Jun 2, 8:00 am, ChrisM cjjmur...@gmail.com wrote: I searched through the list but couldn't find any discussion on this topic. Any ideas how the following can be achieved with routes.py www.appname.com\userprofilename I am guessing that there would need to be a

[web2py] Re: python 2.4 support

2010-06-02 Thread mr.freeze
Please read this thread: http://groups.google.com/group/web2py/browse_thread/thread/2b7800cfa079ad5f/28d4c440b2682476 On Jun 2, 9:35 am, Cory Coager ccoa...@gmail.com wrote: Still looking for help if anyone has the answer.

[web2py] Re: variables turning into lists

2010-06-02 Thread Iceberg
Did not look into your code. But this kind of situation usually is caused by a form receives variables from both GET and POST. In this case, request.vars.myvar=['blah', 'blah'], but request.get_vars.myvar='blah', and request.post_vars.myvar='blah'. So you can choose to use only one of it. On

[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

[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

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

2010-06-02 Thread Jason Brower
Actually... Could you just do a redirect if they are not logged in? Br jason - Original message - 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

[web2py] Clearing Database Tables

2010-06-02 Thread Aaron Crowe
What would the code be to delete either all entries in a database table or all entries in a given field within that table?

[web2py] gitignore

2010-06-02 Thread Doug Warren
Greetings, I'm setting up some git repositories for a web2py project where the staging and some dev will be done under linux while other developers will be done under win32. For simplicities sake, the pure python implementation of web2py will be checked in as well as the applications. win32

[web2py] Re: routes to have userprofile pages

2010-06-02 Thread ChrisM
For isntance I have RPX login which creates user profile for each logged in user. I would like to give each one of these users there own homepage (i.e. like twitter) which could be dynamically created. So I thought the first task was to see how thiscould be mapped, perhaps by querying db.profile

[web2py] Re: gitignore

2010-06-02 Thread Yarko Tymciurak
There are things here that are redundant, but you might want to check against http://code.google.com/p/web2py/source/browse/.hgignore In particular, I don't see that you have errors (but might want to); there is more, but I'll let you look thru it. - Yarko On Jun 2, 11:25 am, Doug Warren

[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,

Re: [web2py] Clearing Database Tables

2010-06-02 Thread Vasile Ermicioi
db(db.table.id 0).delete() no sure what you mean by entries in a given field

[web2py] Re: Frivolous request for login/logout

2010-06-02 Thread weheh
@hamdy.a.farag: swet. One of these days I have to memorize the bazillion or so auth.settings. On Jun 2, 12:53 pm, hamdy.a.farag hamdy.a.fa...@inbox.com wrote: in your model add something like def set_message(form):     session.flash = T('hello %(name)s', dict(name=auth.user and

[web2py] Re: Invalid reset password

2010-06-02 Thread weheh
sqlite On Jun 2, 9:25 am, mdipierro mdipie...@cs.depaul.edu wrote: what database system? On Jun 2, 12:13 am, weheh richard_gor...@verizon.net wrote: Massimo, now we're getting somewhere. Thanks. However, I ran into this error: Traceback (most recent call last):   File

[web2py] Re: Frivolous request for login/logout

2010-06-02 Thread Yarko Tymciurak
On Jun 2, 1:52 pm, weheh richard_gor...@verizon.net wrote: @hamdy.a.farag: swet. One of these days I have to memorize the bazillion or so auth.settings. or simply use an IDE / debugger which will do completions for you! On Jun 2, 12:53 pm, hamdy.a.farag hamdy.a.fa...@inbox.com

[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

Re: [web2py] Clearing Database Tables

2010-06-02 Thread Thadeus Burgess
db.table.truncate() -- Thadeus On Wed, Jun 2, 2010 at 1:05 PM, Vasile Ermicioi elff...@gmail.com wrote: db(db.table.id 0).delete() no sure what you mean by entries in a given field

Re: [web2py] Clearing Database Tables

2010-06-02 Thread Thadeus Burgess
And for a given field... db(db.table.id 0).update(field = None) -- Thadeus On Wed, Jun 2, 2010 at 2:04 PM, Thadeus Burgess thade...@thadeusb.com wrote: db.table.truncate() -- Thadeus On Wed, Jun 2, 2010 at 1:05 PM, Vasile Ermicioi elff...@gmail.com wrote: db(db.table.id

[web2py] Re: Clearing Database Tables

2010-06-02 Thread Yarko Tymciurak
On Jun 2, 2:04 pm, Thadeus Burgess thade...@thadeusb.com wrote: And for a given field... db(db.table.id 0).update(field = None) You can see all this in the count / delete / update section of http://www.web2py.com/book/default/section/6/5; The behavior of truncate (i.e., resetting counter)

[web2py] Re: Where can I download web2py 1.77.3?

2010-06-02 Thread mdipierro
Try http://web2py.com/examples/static/1.77.3/web2py_src.zip some version are there and some not. Those obviously buggy have been deleted. Anyway, I'd like to understand the problem. do you use apache? mod_wsgi? do you use the built-in web server? do you see memory leaks? do you have web2py cron

[web2py] Re: Where can I download web2py 1.77.3?

2010-06-02 Thread drayco
Thank's a lot Dr. Massimo do you use apache? Yes mod_wsgi? Yes do you use the built-in web server? No do you see memory leaks? No do you have web2py cron or on off? No This is the firts error: Traceback (most recent call last): File gluon/restricted.py, line 178, in restricted exec ccode

[web2py] Re: Where can I download web2py 1.77.3?

2010-06-02 Thread drayco
One of my user told me that He sent in 2 times new registers, and he didn't obtain answer. In previous versions of web2py, I never got this error. On Jun 2, 7:03 pm, drayco antrod...@gmail.com wrote: Thank's a lot Dr. Massimo do you use apache? Yes mod_wsgi? Yes do you use the built-in web

[web2py] Re: Where can I download web2py 1.77.3?

2010-06-02 Thread drayco
And I didn't need to restart apache because I had more than 6 user's simultaneously. With previous versions of web2py, I only obtained every hour without use of application Traceback (most recent call last): File gluon/restricted.py, line 178, in restricted exec ccode in environment File

[web2py] Re: Where can I download web2py 1.77.3?

2010-06-02 Thread drayco
And I didn't need to restart apache because I had more than 6 user's simultaneously. With previous versions of web2py, I only obtained every hour without use of application Traceback (most recent call last): File gluon/restricted.py, line 178, in restricted exec ccode in environment File

[web2py] Re: dependent drop down list

2010-06-02 Thread tracey
I tried but it still didn't work. What I did is I followed your posts with the same topic as mine. The function was not called. :( I spent a lot of times to work this out, but the problem is still unsolved. On Jun 2, 4:03 pm, Neveen Adel nevo.a...@gmail.com wrote: Hello tracey, you will

[web2py] Re: new stuff in trunk...

2010-06-02 Thread howesc
I use paypal Website Payments Standard and the *best* part about that is that while the user experience is crappy with the redirection, i *never* learn the user's credit card number, and therefore don't have to worry about regulations in how that info is handled (which extends to your server logs

[web2py] accounting appliance

2010-06-02 Thread iiijjjiii
I am considering developing a web2py small business Accounting application but I thought I check to see if anyone has created something already. I'm looking for General Ledger, Receivables and Payables, and possibly payroll. Anyone know of such an appliance or of someone developing one?

[web2py] Re: accounting appliance

2010-06-02 Thread mdipierro
I really like this: http://furius.ca/beancount/ It should be relative easy to convert it to that the input comes from a db table and the output is a python dict so that you can render it in views. If you can do this in one model and one controller files, it could be turned into an accounting

[web2py] Re: Where can I download web2py 1.77.3?

2010-06-02 Thread mdipierro
why is counting records select count(*) crashing your mysql database? It seems to me the problem is not the web2py version. On Jun 2, 7:03 pm, drayco antrod...@gmail.com wrote: Thank's a lot Dr. Massimo do you use apache? Yes mod_wsgi? Yes do you use the built-in web server? No do you

[web2py] Re: new download page

2010-06-02 Thread Christopher Steel
very nice! Thanks! On May 31, 10:31 pm, mdipierro mdipie...@cs.depaul.edu wrote: http://web2py.com/examples/default/download

Re: [web2py] Re: A basic problem about threading and time consuming function...

2010-06-02 Thread Doug Warren
I started looking at this a bit, you can find the specs for the Comet protocol, such as it is at http://svn.cometd.com/trunk/bayeux/bayeux.html It's built on top of JSON but isn't quite JSON-RPC. More of a publish/subscribe model. The latest version of 'cometd' just released a beta release

[web2py] translating controller names in response.menu items challenge

2010-06-02 Thread Christopher Steel
Can anyone think of a way around this chicken and egg scenario, or another way to get the desired results? Basically I want on the fly translations of content and controller names when a user changes languages. Now I can have one or the other... When translating controller names in

[web2py] Re: routes to have userprofile pages

2010-06-02 Thread Adi
You could use an argument. www.myapp.com/userprofile can be mapped to a controller/method like www.myapp.com/app/profiles/show/userprofile where app = application, profiles = controller, show = function, userprofile is an argument accessed by request.args(0) inside show. You can use it to query

[web2py] Install in the linode.com?

2010-06-02 Thread Ricardo Arg
How to install the web2py in linode.com in wsgi? thanks!