[web2py] wsgihandler.py not exist!

2013-09-06 Thread Dmitry Ermolaev
I install on MS Server2000 Apache 2.2 + python2.7 + web2py but wsgihandler.py not exit in c:/web2py folder and anywhere -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send

Re: [web2py] Add conditional sub-menu

2013-09-06 Thread 黄祥
*('Admin', False, URL('admin')) if (auth.user_id != None) and ((auth.has_membership(role = 'admin'))) else None* it's not worked it raise an error : TypeError: 'NoneType' object is not subscriptable should be *('Admin', False, URL('admin')) if (auth.user_id != None) and ((auth.has_membership

[web2py] Help with 5th ed. book example 11.2.1 not working (conditional fields in forms)

2013-09-06 Thread REM
I am trying out the 11.2.1 book example on p.504, and it just doesn't function at all. I've tried it with Firefox and Chromium and the behavior is the same. Instead of the spouse name field appearing when the box is checked, nothing happens. I've checked the book code against the web book code

[web2py] Re: How to process a custom register form?

2013-09-06 Thread Anthony
On Friday, September 6, 2013 7:51:54 PM UTC-4, Apple Mason wrote: > Oops, I do have form.custom.begin and form.custom.end. I had forgotten to > type it here. > > I also wanted a custom view for the registration, login, and whatever > else, so my understanding is that I can do this by using > fo

[web2py] Re: How to leverage web2py popularity and usage?

2013-09-06 Thread Brian Hauer
At least with respect to #6, it's not necessary to ask to be part of our project--we'd love to have web2py added! The quickest way to make sure that happens is to implement the tests and submit a pull request at the GitHub repository: https://github.com/TechEmpower/FrameworkBenchmarks/ You ca

[web2py] Re: github - please follow

2013-09-06 Thread Diego Carvallo
Talking about metrics and popularity, it could be a good thing to determine how BuiltWith and Wappalizer detect frameworks to create their usage trend graphs. Both have Chrome extensions that tell you the frameworks used in a certain web page but web2py is usually not detected (not even in my pa

[web2py] Re: Example of web2py integration with an AJAX grid (preferably jquery based) which updates backend db ?

2013-09-06 Thread Simon Ashley
Thanks, enjoy. Most of our forms are loaded and still works fine. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For

[web2py] Re: How to process a custom register form?

2013-09-06 Thread Apple Mason
Oops, I do have form.custom.begin and form.custom.end. I had forgotten to type it here. I also wanted a custom view for the registration, login, and whatever else, so my understanding is that I can do this by using form=auth.register() and form=auth.login(). Then in their respective views, I ca

[web2py] How to leverage web2py popularity and usage?

2013-09-06 Thread Diego Carvallo
I think that the bigger the active community the greater a framework gets. Like Symphony for example that in a few years has grown so big now it has its own plugin repository (Composer) and dozens of user forums. Regarding metrics, it could be a good thing to determine how BuiltWith and Wappali

[web2py] Re: How to change db servers (same underlying type)?

2013-09-06 Thread villas
What I would do is this: Replicate H1 as H2 using your favourite DB management tool. In web2py change the URI string to H2, set fake_migrate_all = True and, after ensuring all the new database table files are created, then set back to False. You can do everything inside web2py, if you wish,

[web2py] Re: Field value based on other field in Dal?

2013-09-06 Thread greenpoise
Worked! thanks!! On Friday, September 6, 2013 12:07:49 PM UTC-7, Anthony wrote: > > On Friday, September 6, 2013 2:13:44 PM UTC-4, greenpoise wrote: > >> since is a reference, shouldnt it be an integer? hmm..a bit confused..my >> data looks fine for now >> > > Yes, but you have it as a strin

[web2py] Re: Specifying onvalidation with auth.profile() prevents default onaccepts method

2013-09-06 Thread Anthony
I think you'd have to manually check and add the div because the password field isn't added to the form until after the error has been generated. Anthony On Friday, September 6, 2013 4:38:24 PM UTC-4, Mark Li wrote: > > Ahh ok, thanks Anthony. If the form is being processed before adding the >

[web2py] Re: How to process a custom register form?

2013-09-06 Thread Anthony
Did you also include form.custom.begin and form.custom.end (you need the latter, or the _formkey check will fail silently)? Anyway, if you just want to exclude some fields from the register form, you can set the readable and writable attributes to False within the user function: def user():

[web2py] Re: SQLFORM.grid - Create from list of objects

2013-09-06 Thread Massimo Di Pierro
We need more details but SQLFORM.grid is for displaying and editing tabular data from the database. On Friday, 6 September 2013 09:56:54 UTC-5, Gliese 581 g wrote: > > ** > > I am working on a project where we have a different subsystem whose API > returns a list of certain type of objects. >

[web2py] How to process a custom register form?

2013-09-06 Thread Apple Mason
The default register form has too many fields, so I created a slimmed-down custom one: register.html: Username: {{=form.custom.widget.username}} Email: {{=form.custom.widget.email}} Password: {{=form.custom.widget.password}} {{=form.custom.submit}} default.py: def register(): return d

Re: [web2py] github - please follow

2013-09-06 Thread Dave S
On Friday, September 6, 2013 10:50:54 AM UTC-7, Mariano Reingart wrote: > > I'm using hg-git extension to get the best of both worlds: > > http://hg-git.github.io/ > > It allows to work with git repos using mercurial tools. > Even you can maintain a mercurial repo and a github repo easily. >

Re: [web2py] github - please follow

2013-09-06 Thread Mariano Reingart
I'm using hg-git extension to get the best of both worlds: http://hg-git.github.io/ It allows to work with git repos using mercurial tools. Even you can maintain a mercurial repo and a github repo easily. For example, in .hg/hgrc configuring both repos: [paths] default = https://reing...@code.go

[web2py] Re: web2py_win.zip redundant file during extracted

2013-09-06 Thread Massimo Di Pierro
yes On Friday, 6 September 2013 01:09:39 UTC-5, 黄祥 wrote: > > hi, > > i've downloaded the latest web2py_win.zip during extracted the zip file, > it tells that the file > on web2py\applications\examples\static\epydoc\gluon.html__tag__-class.html > is already there. the file size is different. is

[web2py] web2py file dialog

2013-09-06 Thread Josh Wilczek
Is there a way to display a directory selection dialog from within web2py (something similar to tkFileDialog.askdirectory)? I can write a python script to do this, however, I am unable to replicate the behavior in web2py. From within web2py, I can import Tkinter, but I cannot import tkFileDia

[web2py] Re: web2py file dialog

2013-09-06 Thread Massimo Di Pierro
Short answer: no. you have to build it. This anyway does a lot of what you need: https://code.google.com/p/elfinder-web2py/ On Friday, 6 September 2013 10:19:59 UTC-5, Josh Wilczek wrote: > > Is there a way to display a directory selection dialog from within web2py > (something similar to tkFil

[web2py] Re: Specifying onvalidation with auth.profile() prevents default onaccepts method

2013-09-06 Thread Mark Li
Ahh ok, thanks Anthony. If the form is being processed before adding the extra element to the DOM, then is it possible to add an error like form.errors.confirm_password = "Must enter correct password" This would usually cause the error message to appear below the input row, but the confirm_pas

[web2py] web2py and file dialogs

2013-09-06 Thread Josh Wilczek
Is there a way to open a directory selection dialog through web2py (something similar to tkFileDialog.askdirectory)? I've noticed that Tkinter is able to be imported through web2py, but tkFileDialog is not ( No module named tkFileDialog). I've tried copying the tkFileDialog from my Python in

[web2py] Re: Field value based on other field in Dal?

2013-09-06 Thread Anthony
On Friday, September 6, 2013 2:13:44 PM UTC-4, greenpoise wrote: > since is a reference, shouldnt it be an integer? hmm..a bit confused..my > data looks fine for now > Yes, but you have it as a string (i.e., '2' instead of just 2). I was just suggesting: compute=lambda r: 1 if request.vars.til

[web2py] how to create rickshaw graph in the web2py

2013-09-06 Thread Pramod Jadhav
h -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt

[web2py] how to sms web app

2013-09-06 Thread tig
hi all! i am new to web2py and want to create an sms web app. my requirement is this; senders send sms messages and these get displayed on my web app. what get displayed are 1) the senders' message, 2) senders' mobile number with last four digits hidden in asterisk for privacy, and the date-tim

[web2py] how to sms web app

2013-09-06 Thread Ykä Marjanen
Hi, You need sms API service like textmagic. Then you create a basic application that reads text messages and displays them. The display part is well documented in web2py book. Ykä -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To uns

[web2py] Is it mandatory to add new html page for every new function ?

2013-09-06 Thread kranthi aeronaut
hii all , i am new to web2py , it seems that in web2py for every function we declare in default.py page , we should also create a new html page with same name of function , is this mandatory or is there any other way to implement the logic ?? -- --- You received this message because you are

[web2py] Re: github - please follow

2013-09-06 Thread Anthony
web2py does set the X-Powered-By response header to "web2py", so hopefully that provides them with enough of a clue. What else should we do? Anthony On Friday, September 6, 2013 11:49:50 AM UTC-4, Diego Carvallo wrote: > > Talking about metrics and popularity, it could be a good thing to > dete

Re: [web2py] web2py and file dialogs

2013-09-06 Thread Vinicius Assef
web2py runs server side. Aren't you making some confusion? On Fri, Sep 6, 2013 at 12:10 PM, Josh Wilczek wrote: > Is there a way to open a directory selection dialog through web2py > (something similar to tkFileDialog.askdirectory)? > > I've noticed that Tkinter is able to be imported through we

[web2py] Authorization and CRUD

2013-09-06 Thread אבי אברמוביץ
Hi, Is there an example in one of the web2py appliances for an app using the "Authorization and crud" method? And that line of code "crud.settings.auth = auth" should be added at top of the functions file? Thanks. -- --- You received this message because you are subscribed to the Google Gro

Re: [web2py] github - please follow

2013-09-06 Thread Richard Vézina
+1 On Fri, Sep 6, 2013 at 1:50 PM, Mariano Reingart wrote: > I'm using hg-git extension to get the best of both worlds: > > http://hg-git.github.io/ > > It allows to work with git repos using mercurial tools. > Even you can maintain a mercurial repo and a github repo easily. > For example, in .

[web2py] Re: Field value based on other field in Dal?

2013-09-06 Thread Anthony
Probably should remove the quotes from the 2, no? On Friday, September 6, 2013 12:59:36 PM UTC-4, greenpoise wrote: > > Ended up using lambda instead. > > Field('conversiontype','reference conversiontype',compute=lambda r: 1 > ifrequest > .vars.tileuse == '5' else '2'), > > > Thanks! > > > > On

[web2py] Custom form updating field not in view

2013-09-06 Thread SimonD
Hi, I have been working with an issue for a few hours, and can see what is happening, but I would like to better understand why this happens. Although I have a solution, some information or help as to why this is happening would be very useful. I would be sure that the answer is simple and proba

[web2py] Re: Is it mandatory to add new html page for every new function ?

2013-09-06 Thread Annet
Hi, In your functions you can set response.view='some_view.html' and then have multiple functions use 'some_view.html' Kind regards, Annet -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receivi

[web2py] Re: Field value based on other field in Dal?

2013-09-06 Thread greenpoise
Ended up using lambda instead. Field('conversiontype','reference conversiontype',compute=lambda r: 1 ifrequest .vars.tileuse == '5' else '2'), Thanks! On Thursday, September 5, 2013 7:25:32 PM UTC-7, greenpoise wrote: > > Thats exactly what I am looking! Thanks, will try and post Thanks Anth

[web2py] Re: Field value based on other field in Dal?

2013-09-06 Thread greenpoise
since is a reference, shouldnt it be an integer? hmm..a bit confused..my data looks fine for now On Friday, September 6, 2013 10:36:03 AM UTC-7, Anthony wrote: > > I suppose it gets converted to an integer upon insert, but you might as > well just start with an integer. > > Anthony > > On Frid

[web2py] Re: Field value based on other field in Dal?

2013-09-06 Thread Anthony
I suppose it gets converted to an integer upon insert, but you might as well just start with an integer. Anthony On Friday, September 6, 2013 1:32:32 PM UTC-4, greenpoise wrote: > > it worked w quotes on..couldnt tell you which is right though > > > > > On Friday, September 6, 2013 10:03:40 A

[web2py] Re: Field value based on other field in Dal?

2013-09-06 Thread greenpoise
it worked w quotes on..couldnt tell you which is right though On Friday, September 6, 2013 10:03:40 AM UTC-7, Anthony wrote: > > Probably should remove the quotes from the 2, no? > > On Friday, September 6, 2013 12:59:36 PM UTC-4, greenpoise wrote: >> >> Ended up using lambda instead. >> >>

Re: [web2py] default error message instad of custom one in SQLFORM

2013-09-06 Thread Richard Vézina
Where do you set the IS_NOT_EMPTY() validator? Do you redefine you validator for this field in you controller?? Something like this # model Field('youfield', 'type', requires=IS_NOT_EMPTY(error_message='Enter your last name')) # If you do that in the controller db.yourtable.yourfield.requires=IS_

[web2py] Routing A Subdomain (on Openshift)

2013-09-06 Thread Charles Law
We have a site with a subdomain that correctly gets forwarded to web2py on openshift, but the page it hits is our default home page. We want the subdomains to go ti different functions on our default controller, but we can't figure out how to do that with routes. Included below is the current

[web2py] Re: Is it mandatory to add new html page for every new function ?

2013-09-06 Thread dhmorgan
for any function, you can specify the template to be used to render the data you return; a couple of helpful bits from the book can be found at: http://www.web2py.com/books/default/search/29?search=response.view%2C+vars%29

Re: [web2py] Re: github - please follow

2013-09-06 Thread Richard Vézina
Done! Prefer hg too! Richard On Fri, Sep 6, 2013 at 11:49 AM, Diego Carvallo wrote: > Talking about metrics and popularity, it could be a good thing to > determine how BuiltWith and Wappalizer detect frameworks to create their > usage trend graphs. Both have Chrome extensions that tell you th

[web2py] default error message instad of custom one in SQLFORM

2013-09-06 Thread Annet
In my table definitions I have validators like this one: IS_NOT_EMPTY(error_message='Enter your last name') In appadmin: http://127.0.0.1:8000/dbModel/appadmin/insert/db/register# when I leave the field last_name empty and submit the form the error_message is being displayed, however, in the fo

[web2py] Re: "required" class for required fields

2013-09-06 Thread mr.freeze
Hi Massimo, have you had a chance to look at this? I am just wondering if I need to create a workaround outside of the framework or if this will be incorporated. No worries either way. On Sunday, August 25, 2013 9:23:39 PM UTC-5, Massimo Di Pierro wrote: > > Please open a ticket with your patch

[web2py] SQLFORM.grid - Create from list of objects

2013-09-06 Thread Gliese 581 g
** I am working on a project where we have a different subsystem whose API returns a list of certain type of objects. I want it to be displayed on my form. Can I use SQLForm.grid for this? Please suggest. -- --- You received this message because you are subscribed to the Google Groups

[web2py] ask concept and how to achieve it using web2py

2013-09-06 Thread 黄祥
hi, i want to ask the concept, let say : i have 2 locations name : location a & location b, and then i want to transfer the stock from location a to location b. in the stock table i define field location, which is refer to table branch, and then i create another table for record those stock mov

[web2py] Re: Is it mandatory to add new html page for every new function ?

2013-09-06 Thread Anthony
You can use the generic.html view, though it has limitations regarding how it will display your data. If you have a number of functions that all need to use the same view, you can simply specify the view explicitly: def some_function(): response.view = 'default/my_common_view.html' Or in a

[web2py] Re: TypeError: %d format: a number is required, not dict

2013-09-06 Thread Annet
I downloaded web2py from: https://github.com/web2py/web2py/ And tested my application, I still get the same error. Kind regards, Annet. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving em

Re: [web2py] Re: @auth.requires_membership of more than one group

2013-09-06 Thread António Ramos
+1 2013/9/6 Anthony > > @auth.requires(auth.has_**membership('group1') or >> auth.has_membership('group2')) >> >> Is this the best practice? >> > > Better: > > @auth.requires(lambda: auth.has_membership('group1') or auth. > has_membership('group2')) > > That way the has membership queries only

[web2py] Re: @auth.requires_membership of more than one group

2013-09-06 Thread Anthony
> @auth.requires(auth.has_membership('group1') or > auth.has_membership('group2')) > > Is this the best practice? > Better: @auth.requires(lambda: auth.has_membership('group1') or auth.has_membership( 'group2')) That way the has membership queries only get run when the decorated function is

[web2py] Re: Specifying onvalidation with auth.profile() prevents default onaccepts method

2013-09-06 Thread Anthony
You are adding an element to the form DOM after the form has been processed, so the new field will not get added to form.vars. However, in your onvalidation function, you should be able to replace form.vars.confirm_password with request.vars.confirm_password. Anthony On Friday, September 6, 20

[web2py] Re: Example of web2py integration with an AJAX grid (preferably jquery based) which updates backend db ?

2013-09-06 Thread Tim Richardson
On Tuesday, 3 September 2013 10:10:59 UTC+10, Tim Richardson wrote: > > Can anyone provide tutorial/example of a web2py implementation of an AJAX > grid which updates records? web2py slices has jqgrid in read only mode, > (although the example doesn't work out of the box anymore). > My learning

[web2py] Re: @auth.requires_membership of more than one group

2013-09-06 Thread António Ramos
I´m here to help me. @auth.requires(auth.has_membership('group1') or auth.has_membership('group2')) Is this the best practice? 2013/9/6 António Ramos > page 449 of the english pdf book > > it better to pass a callable than a condition > > mssing "is" ??? > > > 2013/9/6 António Ramos > >> de

[web2py] Re: @auth.requires_membership of more than one group

2013-09-06 Thread António Ramos
page 449 of the english pdf book it better to pass a callable than a condition mssing "is" ??? 2013/9/6 António Ramos > decorating my function with 2 @auth.requires_membership > > @auth.requires_membership('group1') > @auth.requires_membership('group2') > def myfunc() > return res > > does n

[web2py] @auth.requires_membership of more than one group

2013-09-06 Thread António Ramos
decorating my function with 2 @auth.requires_membership @auth.requires_membership('group1') @auth.requires_membership('group2') def myfunc() return res does not work with only one @auth.requires_membership it works What is the best practice? If i need to check more than one group membership

[web2py] Re: wizard issue? (db.define_table settings for the "db.auth_user is missing)

2013-09-06 Thread אבי אברמוביץ
Yes, thanks. On Friday, September 6, 2013 2:40:38 AM UTC+3, Massimo Di Pierro wrote: > > I think you want this: > http://www.web2py.com/books/default/chapter/29/09/access-control?search=extra_fields > > On Thursday, 5 September 2013 07:44:02 UTC-5, אבי אברמוביץ wrote: >> >> >> Thanks , not sure I