Re: [web2py] Re: could use some help ... mobile admin

2011-11-29 Thread Angelo Compagnucci
Get the trunk! If you want to use the admin app whitout setting aup https in a private environment, you have to comment out these lines in models/access.py: #elif not request.is_local and not DEMO_MODE: #raise HTTP(200, T('Admin is disabled because insecure channel')) 2011/11/30 Javier Quari

[web2py] Remove first and last name from Auth.

2011-11-29 Thread HittingSmoke
I'd like to remove the first and last name fields from auth but I can't seem to find an easy way to do this. It would seem a more common sense approach to me to keep the defaults to the basics (email, password and username) and let the user decide what to include in their app for optional fields.

Re: [web2py] default value in Model (define_table)

2011-11-29 Thread Bruno Rocha
May be #model db.define_table('mytable', ... Field('other_table_id','reference other_table', default=*request.args(0) or 0*,...), ... ) or # in controller before creating your forms db.mytable.default = request.args(0) or redirect('some place')* * -- Bruno Rocha [http://rochacbruno.com.b

Re: [web2py] default value in Model (define_table)

2011-11-29 Thread Bruno Rocha
On Wed, Nov 30, 2011 at 5:17 AM, lyn2py wrote: > default=request.args(0) > I do not recommend doing that in models because you can't know when you will receive or not the args, it i better to define it in the controller you are expecting this variable. But there is a workaround. *default=reque

[web2py] Current transaction aborted error when trying to save session in database

2011-11-29 Thread Rohan
web2py version: 1.98.2 I have two servers with shared database and I am trying to store session in database using session.connect(request, response, db=db, migrate=False) but session._try_store_in_db is throwing Internal Error from one of the servers but it works fine from second server.

[web2py] [flashback] web2py logo and layout has changed one year ago...

2011-11-29 Thread Bruno Rocha
A year ago we chose the new logo and put the new site up. Now Massimo are about to publish the new layout, which is a makeover of the site that was done a year ago. just for remembering The old-old website http://www.web2py.com.ar The pre-project for the new website: http://3.web2pysite.appspot.

[web2py] Re: GAE + Web2py

2011-11-29 Thread RAMKRISHAN BHATT BACK IN ACTION in bangalore
Thank you very much for your suggestion its working with us. Our team is able to develop such system now over web2py. Thanks to web2py ,because of that i am interdependent from application related resources like server ,cloud,databases.

[web2py] default value in Model (define_table)

2011-11-29 Thread lyn2py
If I have: #model db.define_table('mytable', ... Field('other_table_id','reference other_table',default=request.args(0),...), ... ) It works fine on the webpage (Views) and SQLFORM, but when I try to access the database from appadmin, it runs into an error: >> ValueError: invalid literal fo

[web2py] Re: Relative path in css for @font-face embedding

2011-11-29 Thread Anthony
Are you saying you're trying to use the URL function in a static CSS file? That's not possible. The URL function can only be used in web2py code -- in a model, controller, view, or imported Python module. Static files are, well, static -- they are served as is and not processed by the framework.

[web2py] Relative path in css for @font-face embedding

2011-11-29 Thread monotasker
I'm trying to use an embedded font referenced in a stylesheet. The only url that seems to work in the @font-face declaration (in my css file) is one that begins with the appname: /[appname]/static/[font folder]. It seems, though, like I can't generate the URL programmatically (with the URL help

[web2py] Re: How place the standard Register form in my front page?

2011-11-29 Thread Constantine Vasil
I did it with: form.custom.submit['_data-ajax'] = 'false' but how to do it for: {{=form_auth}}

[web2py] Re: Will jQuery Mobile keyup handler and Auto-completion work with web2py?

2011-11-29 Thread Anthony
This is just a client-side keyup event handler -- it doesn't impact the server-side framework. On Tuesday, November 29, 2011 6:28:08 PM UTC-5, Constantine Vasil wrote: > > I am using jQuery Mobile and here is a code for a keyup handler > directly from the source. > > The question is would it wor

[web2py] Re: How place the standard Register form in my front page?

2011-11-29 Thread Constantine Vasil
Answering to myself jQuery mobile has this option which can be set for each link: data-ajax="false" So basically if I add: My Business Category the hash is not generated. How to set this for {{=form.custom.submit}}?

[web2py] Re: Unable to define the right query to get the first matching record of each category in a group by expression

2011-11-29 Thread monotasker
When I've done date-related operations I've had to use the python datetime and calendar modules. They're both in the standard library so you can just do "import datetime, calendar" at the top of your model or controller. Then you could do a simple query for all the transactions on that budget in

[web2py] Re: How to rewrite reset_password link in the Email send for password retrieval?

2011-11-29 Thread Anthony
Is your registration form submitting to a function that processes it via auth.register()? If not, auth.settings.register_next probably won't do anything. If you're doing a custom registration submission, you'll need to handle any redirects yourself. Anthony On Tuesday, November 29, 2011 8:38:1

[web2py] Re: How to rewrite reset_password link in the Email send for password retrieval?

2011-11-29 Thread Anthony
On Tuesday, November 29, 2011 8:36:22 PM UTC-5, Constantine Vasil wrote: > > OK here is my setup: > > routes.py: > === > routers = dict( > BASE = dict( > default_application = 'myapp', > default_controller='default' > ), > ) > > ro

[web2py] Re: How place the standard Register form in my front page?

2011-11-29 Thread Constantine Vasil
I found the issue - I am using jQuery Mobile which adds a hash (#) to the link, when hash is present in the browser address bar hitting Submit does not work. Now the question is how to get rid from the hash?

[web2py] Re: How to rewrite reset_password link in the Email send for password retrieval?

2011-11-29 Thread Constantine Vasil
also after register I want a redirection to My Info too: I set this up auth.settings.register_next = URL('default', args='myinfo') but it does not redirects.

[web2py] Re: How to rewrite reset_password link in the Email send for password retrieval?

2011-11-29 Thread Constantine Vasil
OK here is my setup: routes.py: === routers = dict( BASE = dict( default_application = 'myapp', default_controller='default' ), ) routes_in = ( ('/myinfo', '/default/myinfo'), ) routes_out = (

Re: [web2py] Re: Problems with forms and firefox

2011-11-29 Thread Bruno Rocha
This was the issue: http://www.nczonline.net/blog/2009/11/30/empty-image-src-can-destroy-your-site/ and http://www.nczonline.net/blog/2010/03/16/empty-string-urls-in-html-a-followup/

[web2py] Re: computed field: update and images

2011-11-29 Thread pbreit
I'd be curious as well. That looks like my resize_image function. For now I've just been letting old images clutter up. Somehow you'd need to know the original filename to be able to delete it either in the resize_image function or perhaps a second computed function.

[web2py] Re: simulate a sub-domain from localhost?

2011-11-29 Thread pbreit
That's what I do on my Mac. In /etc/hosts I have: 127.0.0.1 pb-dev.pricetack.com Since I run web2py on port 8001 I access my dev site with "http://pb-dev.pricetack.com:8001/";

[web2py] Re: How to rewrite reset_password link in the Email send for password retrieval?

2011-11-29 Thread pbreit
I would suggest just leaving the default. The only way to get to a reset_password page is by clicking on a link so there's no benefit to "pretty-fying" it.

[web2py] Re: Unable to define the right query to get the first matching record of each category in a group by expression

2011-11-29 Thread pbreit
I'm not sure there's an easy way to do that in one query. I don't think grouping and ordering is going to work how you are expecting. Are you able to see what SQL gets generated for this query? Is running separate queries for each budget OK?

Re: [web2py] Re: could use some help ... mobile admin

2011-11-29 Thread Javier Quarite
On Tue, Nov 29, 2011 at 6:40 PM, Angelo Compagnucci < angelo.compagnu...@gmail.com> wrote: > I almost done the admin mobilization! > > I have to get rid of an error on design.html, when done, I'll send you > patches! > > Thanks! > > Is there a way to see an example? it sounds interesting and it co

Re: [web2py]

2011-11-29 Thread pbreit
You might look in to Nginx.

[web2py] Re: How to implement the simpler possible Sign Up system: email address/password?

2011-11-29 Thread pbreit
The Web2py default is to *not* use username for login. I think your problem is creating your own auth_user table instead of using the default table. To suppress first/last name collection, set readable/writable in a model or in user() function: db.auth_user.first_name.writable = db.auth_user.fi

Re: [web2py] Re: could use some help ... mobile admin

2011-11-29 Thread Angelo Compagnucci
I almost done the admin mobilization! I have to get rid of an error on design.html, when done, I'll send you patches! Thanks! 2011/11/29 Angelo Compagnucci : > I'm astonished, > > I'm trying to use admin from my rly old htc g1 with android > and it's totally usable and responsive! Great!

[web2py] Re: How to implement the simpler possible Sign Up system: email address/password?

2011-11-29 Thread Constantine Vasil
Great! I have to move on with this Sign Up now ;) Need to work on ajax auto-complete - could you please see my new posting?

[web2py] Will jQuery Mobile keyup handler and Auto-completion work with web2py?

2011-11-29 Thread Constantine Vasil
I am using jQuery Mobile and here is a code for a keyup handler directly from the source. The question is would it work under web2py? What about IE? http://jquerymobile.com/demos/1.0a2/#experiments/api-viewer/docs/keyup/index.html Show the event object for the keyup handler when a key is releas

[web2py] Re: How to implement the simpler possible Sign Up system: email address/password?

2011-11-29 Thread Anthony
Sure. On Tuesday, November 29, 2011 5:56:17 PM UTC-5, Constantine Vasil wrote: > > OK - if I simply comment out the username field it is OK now?

[web2py] Re: autocomplete widget a disaster on Internet Explorer

2011-11-29 Thread Anthony
I assume if you implement you're own, it should work fine. There's something wrong with the JS in the default autocomplete widget that causes problems with the UI in IE (i.e., it's a client-side problem, not a server-side problem). An alternative is http://dev.s-cubism.com/plugin_suggest_widget

[web2py] Re: autocomplete widget a disaster on Internet Explorer

2011-11-29 Thread Constantine Vasil
Hi guys I mentioned this post because I want to use autocomplete. How is the status of autocomplete with IE? Can I still implement my own and it to work in IE?

[web2py] Re: How to implement the simpler possible Sign Up system: email address/password?

2011-11-29 Thread Constantine Vasil
OK - if I simply comment out the username field it is OK now?

Re: [web2py] Re: could use some help ... mobile admin

2011-11-29 Thread Angelo Compagnucci
I'm astonished, I'm trying to use admin from my rly old htc g1 with android and it's totally usable and responsive! Great! I want mobile admin as soon as possible! There is a way to know the current porting status? What files left to be edited? I'll look myself and if I find the respons

[web2py] Re: How to implement the simpler possible Sign Up system: email address/password?

2011-11-29 Thread Anthony
Why are you defining your own auth_user table? auth.define_tables() will do that for you automatically. You only need to define your own if you want to customize it, and in that case, you can simply exclude the username field from your custom definition. On Tuesday, November 29, 2011 4:45:33 PM

[web2py] Re: How to implement the simpler possible Sign Up system: email address/password?

2011-11-29 Thread Constantine Vasil
It seems that commenting out 'username' is the only option #Field('username', type='string', # label=T('Username')),

Re: [web2py] Re: Problems with forms and firefox

2011-11-29 Thread Bruno Rocha
Finally the problem is solved, and it has not to be with web2py. I am using jqm (Jquery Modal Plugin) The sample code has {{=T("Close")}} where the src attr for img is filled dynamically by the plugin modal. Firefox was raising v

[web2py] Re: How to implement the simpler possible Sign Up system: email address/password?

2011-11-29 Thread Constantine Vasil
do I have to add: settings.login_userfield = 'email' or delete 'username' field?

Re: [web2py] Re: Problems with forms and firefox

2011-11-29 Thread Bruno Rocha
I found that the problem is somewhere in the new welcome layout. some lib there is changing the form encoding. If I try with .load http://labs.blouweb.com/movuca/article/show.load/2/vegetarian-cheese The comments works ok with any browser. Now I have to find what lib or html tag is doing that,

[web2py] Re: How to implement the simpler possible Sign Up system: email address/password?

2011-11-29 Thread Constantine Vasil
In db.py I have implemented it. Still when the Register form shows up there is a username present, note I added this: auth.define_tables(username=False) db.define_table('auth_user', Field('username', type='string', label=T('Username')), Field('first_name', type='string',

[web2py] Re: GAE and 'cannot set memcache' error

2011-11-29 Thread Constantine Vasil
>a fall-back plan How you would do it in web2py?

[web2py] Wizard builder

2011-11-29 Thread bluemoth
Hi all, I'm involved with a project that requires many wizards to collect information. I could build these wizards by hand or develop a module to generate them. It needs to be slick i.e. loads each step using AJAX, given certain answers show or hide questions, client-side and server-side validatio

Re: [web2py] deploying with uWSGI

2011-11-29 Thread Vasile Ermicioi
compared to rocket, and apache+mod_wsgi, uwsgi uses less memory and is more recommended for production as many use it either with web2py or django, you can google to find out is also have much more options to use to make it run at is best for your case I use version 0.9.8.6 on webfaction using thi

[web2py] Re: GAE Caching and Views

2011-11-29 Thread howesc
Constantine, do you mind sharing what and how you are serializing things with protocol buffers? perhaps we can adapt what you are doing into the web2py GAE caching core. JT - thanks for the nice writeup. i'm working on optimizing some web2py apps for customers now, and should be using your te

[web2py] app slow to death (sorry double post because empyt object)

2011-11-29 Thread Richard
Hello, Here my configuration : Apache2, wsgi, web2py, ubuntu 10.04.3, postgres I just made a load test and my app was slow to death... I look into CPU usage, process, memory, disk acces and I found that only the CPU can be incriminated... Total CPU usage never exceed 45%, but the apache2 process

[web2py]

2011-11-29 Thread Richard
Hello, Here my configuration : Apache2, wsgi, web2py, ubuntu 10.04.3, postgres I just made a load test and my app was slow to death... I look into CPU usage, process, memory, disk acces and I found that only the CPU can be incriminated... Total CPU usage never exceed 45%, but the apache2 process

[web2py] Re: GAE and 'cannot set memcache' error

2011-11-29 Thread howesc
nothing is mentioned here on detecting the service status: http://code.google.com/appengine/docs/python/memcache/clientclass.html perhaps it's just a matter of catching the exception. i have not been paying close enough attention to know how often there might be service disruptions, but none o

[web2py] Re: How to implement the simpler possible Sign Up system: email address/password?

2011-11-29 Thread Constantine Vasil
Yes, this was just brainstorming - the user usually have one or two email addresses and usually they remember them ;) Bottom line email address/password is the simpler and quicker way to Sign Up users - he need to enter just three lines. Could not be more simpler.

Re: [web2py] Re: Web2py based STARTUP: Linkfindr.com

2011-11-29 Thread Kuba Kucharski
@anthony for now Linkfindr IE compatibility is not my prio ;) @lyn2py it took 3 months @massimo I thanked Yarko because he helped me a lot more than 3 years ago when I was a beginner with web2py, I wasn't aware about current top 10, I wrote this email really fast, looks like I haven't given i

[web2py] Re: How to implement the simpler possible Sign Up system: email address/password?

2011-11-29 Thread Anthony
On Tuesday, November 29, 2011 1:28:33 PM UTC-5, Constantine Vasil wrote: > > Basically the solution is like this: > > from gluon.tools import Auth > auth = Auth(db) > auth.define_tables(username=False) > db.auth_user.first_name.writable = db.auth_user.first_name.readable = > False > db.auth_user.l

Re: [web2py] How to implement a function to choose from a really long list of categories?

2011-11-29 Thread Constantine Vasil
I looked at it and it is .js code. I am developing for mobile with jQuery Mobile and am not sure it will play nicely with jQuery Mobile. I believe a pure Ajax is more appropriate but I have this rendering issue with injected HTML after the page is already build. jQuery Mobile does not fires at t

[web2py] Re: Create a simple drop down list

2011-11-29 Thread Anthony
I'm not sure, but what's the use case? SQLFORM.factory is for creating forms, not database tables. What would be the result of any linking? On Tuesday, November 29, 2011 1:14:18 PM UTC-5, Constantine Vasil wrote: > > = > Instead, though, you

[web2py] Re: How to implement the simpler possible Sign Up system: email address/password?

2011-11-29 Thread Constantine Vasil
Basically the solution is like this: from gluon.tools import Auth auth = Auth(db) auth.define_tables(username=False) db.auth_user.first_name.writable = db.auth_user.first_name.readable = False db.auth_user.last_name.writable = db.auth_user.last_name.readable =False This will leave only email addr

[web2py] Re: How to implement a function to choose from a really long list of categories?

2011-11-29 Thread Constantine Vasil
>I've had problems with the UI display in IE And yes IE is a big issue. I had issues witch clicking on Buttons and Submit - does web2py has these issues?

[web2py] Re: Create a simple drop down list

2011-11-29 Thread Constantine Vasil
= Instead, though, you might want to explicitly link the two tables: db.define_table('t_ab_distribution', Field('f_distributionname'), format='%(f_distributionname)') db.define_table('t_ab_recipient', Field('f_distribution', db.t

[web2py] Re: clean upload notnull field after being set

2011-11-29 Thread Anthony
On Tuesday, November 29, 2011 12:54:45 PM UTC-5, thodoris wrote: > > Thanx for the reply, > > Well, whenever i put the cursor on the text area a popup window opens > to choose the file, so i can't edit the text. > You're right -- I guess it depends on the browser. In IE, you can delete the filenam

[web2py] Re: How place the standard Register form in my front page?

2011-11-29 Thread Constantine Vasil
Hi Massimo, >You are asking to make a guess about your code. It is a lot of code and the main point is I use GAE datatable. In order to use web2py I use SQLFORM.factory, then in form.process(formname='myinfo').accepted I get the values, assign to GAE table instance and use GAE .put() to store

[web2py] Re: Create a simple drop down list

2011-11-29 Thread Anthony
What do you mean by linking factory tables? Is it one factory or two? What would the linking do? Can you detail an example? On Tuesday, November 29, 2011 12:48:15 PM UTC-5, Constantine Vasil wrote: > > I am using SQLFORM.factory not a read database for different reasons. > > The question is can I

[web2py] Re: GAE Caching and Views

2011-11-29 Thread Constantine Vasil
>not picklable there is a way to serialize with protocol buffers. I am using it in my code but it better be implemented in the web2py core as a 'gae' dependency.

[web2py] Re: clean upload notnull field after being set

2011-11-29 Thread thodoris
Thanx for the reply, Well, whenever i put the cursor on the text area a popup window opens to choose the file, so i can't edit the text. About the solution with Javascript, how can i reference the field that i want to clear? I could do something like: form.append(INPUT(_type="button", _value="C

[web2py] deploying with uWSGI

2011-11-29 Thread peter
A very simple and light way of deploying web2py is to use uwsgi both to handle the uwsgi communication and also act as a server. Once one has installed uwsgi it is as simple as uwsgi --pythonpath /opt/web-apps/web2py --module wsgihandler --http : 80 -s /tmp/we2py.sock One should ensure that /tmp

[web2py] Re: How place the standard Register form in my front page?

2011-11-29 Thread Massimo Di Pierro
You are asking to make a guess about your code. Coding from scratch I would do this: auth=Auth(db) auth.settings.extra_field['auth_user']=[Field('phone_number',default=None)] auth.define_tables() if auth.user and not auth.user.phone_number: session.flash='we need your phone number' redir

[web2py] Re: Create a simple drop down list

2011-11-29 Thread Constantine Vasil
I am using SQLFORM.factory not a read database for different reasons. The question is can I link two SQLFORM.factory tables (virtual tables so to say) to achieve the same effect?

[web2py] Re: How to implement a function to choose from a really long list of categories?

2011-11-29 Thread Constantine Vasil
Autocomplete is useful if the users know what they are looking for, usually they don't. So they have to browse. I am using jQuery Mobile and had an issues with Ajax solution before - when the list is fetched it is not displayed correctly - it does not renders in the same way as rest of the pag

[web2py] Re: Error using LOAD in custom module

2011-11-29 Thread Massimo Di Pierro
Yes but this list gets almost 50% more traffic than the django google group and the rails google group. ;-) On Nov 29, 10:34 am, monotasker wrote: > Thanks Massimo. I'm continually amazed at how responsive you and the other > devs are. Maybe that's possible in part because web2py is still (in > c

Re: [web2py] web2py shell

2011-11-29 Thread chandrakant kumar
This solved the problem, actually i was trying to test the code before using it in app, kind of like dbshell in Rails. On Tue, Nov 29, 2011 at 6:49 PM, Ross Peoples wrote: > You typically have to use the web2py shell: > > python web2py.py -S appname -M > > If you are trying to use gluon libraries

Re: [web2py] How to implement a function to choose from a really long list of categories?

2011-11-29 Thread Jim Steil
+1 for the suggest widget. I too have had display issues with the web2py autocomplete widget. -Jim On 11/29/2011 11:10 AM, Bruno Rocha wrote: http://dev.s-cubism.com/plugin_suggest_widget http://dev.s-cubism.com/plugin_lazy_options_widget On Tue, Nov 29, 2011 at 3:02 PM, Constantine Vas

[web2py] Re: Unable to define the right query to get the first matching record of each category in a group by expression

2011-11-29 Thread Manakel
Hello, Simply adding the last() at the end does not work. It gives me the last operation of the full request (whatever the budget) But i need each last operation for each budget. On 29 nov, 17:43, monotasker wrote: > If you just need the last row from your (ordered) select object, you can > ju

[web2py] Re: Unable to define the right query to get the first matching record of each category in a group by expression

2011-11-29 Thread Manakel
Mistakes from my side. It should be read But i would like to get the line with "Mensualité No..." instead of the line with "AGIO PRETS" for the LOGEMENT_PRET budget because the last operation by date is the ID BUDGET AMOUNT DATE TITLE 1 LOGEMENT_PRET 990.0 2011-11-29 Mensualité No... 980.0 an

[web2py] Re: Create a simple drop down list

2011-11-29 Thread Anthony
Not sure what you mean. On Tuesday, November 29, 2011 12:06:16 PM UTC-5, Constantine Vasil wrote: > > Hi Anthony, > > how can I link a virtual tables from a factory? > > Regards, > --Constantine >

[web2py] Re: How to implement a function to choose from a really long list of categories?

2011-11-29 Thread Anthony
How about using the autocomplet widget: http://web2py.com/book/default/chapter/07#Autocomplete-Widget. It makes Ajax calls as you type to retrieve matching items, so the whole list doesn't have to load with the page (or at all). I've had problems with the UI display in IE, so an alternative is

Re: [web2py] How to implement a function to choose from a really long list of categories?

2011-11-29 Thread Bruno Rocha
http://dev.s-cubism.com/plugin_suggest_widget http://dev.s-cubism.com/plugin_lazy_options_widget On Tue, Nov 29, 2011 at 3:02 PM, Constantine Vasil wrote: > I have a long list of categories which the user has to add to his My Info. > > The issue is the list is very long - about 500 categories an

[web2py] Re: How to rewrite reset_password link in the Email send for password retrieval?

2011-11-29 Thread Constantine Vasil
Hi Anthony, Thank you, absolute URLs explains how it will work. Regards, --Constantine

[web2py] Re: Create a simple drop down list

2011-11-29 Thread Constantine Vasil
Hi Anthony, how can I link a virtual tables from a factory? Regards, --Constantine

[web2py] How to implement a function to choose from a really long list of categories?

2011-11-29 Thread Constantine Vasil
I have a long list of categories which the user has to add to his My Info. The issue is the list is very long - about 500 categories and counting. How it would be the best approach to make this list to load in the HTML really quick? Loading this long list takes considerable time especially on mo

[web2py] Re: How to rewrite reset_password link in the Email send for password retrieval?

2011-11-29 Thread Anthony
Yes, but in emails you need absolute URLs, including the host, so use URL(..., host=True). That will add the current host (you can also specify the host explicitly). There is also a 'scheme' argument, so you could specify scheme='https', for example. Anthony On Tuesday, November 29, 2011 11:29

[web2py] Re: Refresh select widget via Ajax before form submission

2011-11-29 Thread monotasker
Ah, great. At first glance those look like they might do the trick.

[web2py] Re: some ideas on built-in emphasis on client-side processing for web2py

2011-11-29 Thread Constantine Vasil
On mobile browser is slow. This is better to be made on the server which is fast.

[web2py] Re: Unable to define the right query to get the first matching record of each category in a group by expression

2011-11-29 Thread monotasker
If you just need the last row from your (ordered) select object, you can just add ".last()" to the end of your query: db(db.operations.date.month() == current_month).select(db. operations.date,db.operations.budget,db.operations.title,db.operations.amount,groupby=db.operations.budget,orderby= ~db

[web2py] Re: How place the standard Register form in my front page?

2011-11-29 Thread Constantine Vasil
Here is a better description for what I want to accomplish. Basically the business logic is this: I need a quick registration and then redirection to a form with option to enter more information. 1) Register with the minimum requirements - email address/password 2) Redirect to My Info form at /m

[web2py] Re: Error using LOAD in custom module

2011-11-29 Thread monotasker
Thanks Massimo. I'm continually amazed at how responsive you and the other devs are. Maybe that's possible in part because web2py is still (in comparison to Django or Drupal) a small community, but it's much appreciated.

Re: [web2py] Error using LOAD in custom module

2011-11-29 Thread monotasker
Thanks. Yes, I'll release the plugin as soon as I'm happy with how it works. I'll announce it on the list here when the time comes (hopefully in the next couple of weeks).

[web2py] Re: How to rewrite reset_password link in the Email send for password retrieval?

2011-11-29 Thread Constantine Vasil
so URL() will work on generating the email link too?

[web2py] Re: How to implement the simpler possible Sign Up system: email address/password?

2011-11-29 Thread Constantine Vasil
Hi Massimo - that was a great recommendation, thank you!

[web2py] Unable to define the right query to get the first matching record of each category in a group by expression

2011-11-29 Thread Manakel
Hello, I'm writing my first app with Web2py. So far, i'm very impressed. But i'm facing a problem of query design: I have the following model for "operations" DATE BUDGET TITLE AMOUNT where the possible values for budget are defined in a "budget_types" table (budget is a reference field) I need

[web2py] Re: How to rewrite reset_password link in the Email send for password retrieval?

2011-11-29 Thread Anthony
You should always use the URL() function to construct your URLs (especially if you are using routes.py). Anthony On Tuesday, November 29, 2011 1:28:11 AM UTC-5, Constantine Vasil wrote: > > > The email I receive has this link: > /**default/user/reset_password/**1322547476-0ee03b96-5410-4a61-** >

[web2py] Re: How to implement the simpler possible Sign Up system: email address/password?

2011-11-29 Thread Massimo Di Pierro
I would recommend you simply do db.auth_user.first_name.writable = db.auth_user.first_name.readable = False db.auth_user.last_name.writable = db.auth_user.last_name.readable = False and leave everything else alone. On Nov 29, 9:36 am, Constantine Vasil wrote: > How you would exclude First Name

[web2py] Re: Fwd: How disable date widget?

2011-11-29 Thread Massimo Di Pierro
sorry it took me a while SQLFORM.widgets.string.widget and SQLFORM.widgets.date.widget are the same. what you want is to eliminate the datepicker popup. Technically that is not part of the widget but handled by the JS in the page. try this, immediately after you insert the form or field: j

[web2py] Re: How to implement the simpler possible Sign Up system: email address/password?

2011-11-29 Thread Constantine Vasil
How you would exclude First Name and Last Name?

[web2py] Re: clean upload notnull field after being set

2011-11-29 Thread Anthony
Unless you're using a special widget, once you select a file for upload, the browser should simply put the filename in the string field next to the browse button. You should be able to put the cursor in that string field and delete the filename. As an alternative, I suppose you could add a butt

[web2py] clean upload notnull field after being set

2011-11-29 Thread thodoris
Hello, I have this Field Field('cover','upload',notnull=False,autodelete=True), When the form is displayed you click on browse you can select the file. But once a file is selected you cannot undo your choice. There is always the choice to reload the page that holds the form and clean the field b

[web2py] Re: SQLFORM, DAL and Hidden Fields - a way or a better way?

2011-11-29 Thread Anthony
auth.user_id returns None if the user isn't logged in. On Tuesday, November 29, 2011 9:51:21 AM UTC-5, lyn2py wrote: > > Here's the code: > > #model > db.define_table('discussion', > Field('title', 'string', length=255, required=True), > Field('description', 'text', required=True), > Field('

Re: [web2py] Re: Problems with forms and firefox

2011-11-29 Thread Bruno Rocha
I am sure it is not ckeditor because I tested without it. may be it is a problem in current or in custom_importer. note that my form is built in a module. I will try to build the form in controller for test. thanks again. http://zerp.ly/rochacbruno Em 29/11/2011 12:02, "DenesL" escreveu: > >

Re: [web2py] Re: SQLFORM, DAL and Hidden Fields - a way or a better way?

2011-11-29 Thread Bruno Rocha
is the user logged in? http://zerp.ly/rochacbruno Em 29/11/2011 12:51, "lyn2py" escreveu: > Here's the code: > > #model > db.define_table('discussion', > Field('title', 'string', length=255, required=True), > Field('description', 'text', required=True), > Field('created_by', 'reference auth_u

[web2py] Re: How to implement the simpler possible Sign Up system: email address/password?

2011-11-29 Thread DenesL
On Nov 28, 11:51 pm, Constantine Vasil wrote: > Hi Anthony, > > Yes I don't want to mess it up - the most important - > I don't want 'username'. I want the email to be the username. > > How to do that? from gluon.tools import Auth auth = Auth(db) auth.define_tables(username=False) # book chapt

[web2py] Re: SQLFORM, DAL and Hidden Fields - a way or a better way?

2011-11-29 Thread lyn2py
Here's the code: #model db.define_table('discussion', Field('title', 'string', length=255, required=True), Field('description', 'text', required=True), Field('created_by', 'reference auth_user', default=auth.user_id, writable=False, readable=False), Field('modified_by', 'reference auth_use

Re: [web2py] web2py shell

2011-11-29 Thread Jim Steil
Here is what I use in my scripts to access DAL from a regular Python script using MySQL database: import sys sys.path.append('path_to_web2py') from gluon import DAL db = DAL('mysql://username:password@servername/databasename',folder='path_to_the_databases_folder_of_my_application', auto_import

[web2py] Re: SQLFORM, DAL and Hidden Fields - a way or a better way?

2011-11-29 Thread Massimo Di Pierro
On Nov 29, 7:58 am, lyn2py wrote: > Clarification Needed! > > If I use default=some_value, writable=False, readable=False, the field > does not appear on the form at all, and does not autofill with the > default value either, is that the correct behavior? If a field value is not provided it is

[web2py] Re: SQLForm.grid - How do I use it properly?

2011-11-29 Thread Massimo Di Pierro
gird(,...user_sigature=fFalse) than do your own authentication outside the function. On Nov 29, 5:10 am, Rahul wrote: > All, >    How do I view SQLForm.grid View, Edit or Delete forms without using > auth? I have implemented my own custom authorization mechanism which > does not use web2py auth

  1   2   >