[web2py] Date formatting in SQLFORM.factory

2017-01-16 Thread Saumil P
Hi all, we've found something interesting. Generally to format I use the "requires=IS_DATE('%m/%Y')" in the model but if you are using SQLFORM.factory instead of SQLFORM it appears to not format the date for which we had to format the date after the form was created. Thought we'd post here

[web2py] Conditional fields

2017-01-16 Thread Bishal Saha
I am trying to create a form which will have multiple forms and where the first form will have two radio buttons and one of them will work like - if it is selected then all the other fields of the other forms wont show and directly we can submit the whole form with null values to the other

[web2py] Help at counting comments of a post and restrict access to certain categories

2017-01-16 Thread 'N. Fischer' via web2py-users
Hi all, I am currently working with a friend on a web2py project. This is our first time, we do anything with web2py and we managed to build the reddit clone and do little improvements, Massimo Di Pierro did in his video tutorials, thank you at this point for your great videos. Now we want to

[web2py] OAuth and EVE Online

2017-01-16 Thread Tim Korb
FWIW... I have created a Web2Py OAuth module for authenticating via EVE Online (the multiplayer space game). A gist is located here . Comments and suggestions welcome. -- Resources: - http://web2py.com -

[web2py] Re: run web2y scheduler instances on 2 or more servers

2017-01-16 Thread Manjinder Sandhu
Hi Andrey/Niphlod, *Is there a way I can connect servers via SQLite?* *Regards,* *Manjinder* On Tuesday, 4 March 2014 20:52:31 UTC-8, Andrey K wrote: > > Thanks Niphlod, as usual very detail and great answer. Thank you a lot! > After you answer I have check the web and have found several tools

[web2py] About widget radio

2017-01-16 Thread Bishal Saha
I am new to web2py. I am finding it very hard to make a radio button whose values will be stored in the columns of the table in a MYSQL database. I havent used the widget in any of my forms so I dont know where to put the widgets syntax and how to run it . please help! -- Resources: -

[web2py] How to style SQLFORM.grid buttons?

2017-01-16 Thread Aubrey Moore
Hi, I am a noob using web2py for the first time. When I use SQLFORM.grid, all the buttons appear as black rectangles which I find kind of ugly (see attached screen shot). What is the best way of restyling these buttons? - Aubrey -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: mixing ldap Active Directory authentication and local authentication

2017-01-16 Thread Manuel Vio
Ciao Andrea, Just a workaround here, but I've noticed that ldap users have the field "registration_id" filled with username value, so I tried this code (in db.py): if auth.user and not auth.user.registration_id: auth.settings.actions_disabled = ['register', 'request_reset_password',

[web2py] Re: Admin console doesn't work on iPad (blank screen)

2017-01-16 Thread Donald McClymont
Indeed I can confirm I get the same experience. However if you change line 3 of the default.py such that EXPERMINTAL_STUFF is False then you should at least get back to the desktop version which looks to be fairly useable on an ipad but probably not anything much smaller. I don't have much in

[web2py] Re: Customising Calendar widgets in Start Date and End date of SmartGrid

2017-01-16 Thread Dave S
On Monday, January 16, 2017 at 1:10:53 PM UTC-8, Dave S wrote: > > > > On Monday, January 16, 2017 at 11:44:36 AM UTC-8, Paolo Caruccio wrote: >> >> Below link should work yet. >> >> http://sourceforge.net/projects/jscalendar/ >>

[web2py] Re: Customising Calendar widgets in Start Date and End date of SmartGrid

2017-01-16 Thread Dave S
On Monday, January 16, 2017 at 11:44:36 AM UTC-8, Paolo Caruccio wrote: > > Below link should work yet. > > http://sourceforge.net/projects/jscalendar/ > > > Within the

[web2py] Re: Getting more form, y'all

2017-01-16 Thread Dave S
On Tuesday, January 10, 2017 at 11:34:48 PM UTC-8, Dave S wrote: > > On Tuesday, January 10, 2017 at 3:04:13 PM UTC-8, Dave S wrote: > > >> Maybe replace the top part with? >> >> form = SQLFORM(db.QuarterMaster) >> if request.vars.PostDate: >> form.vars.PostDate =

[web2py] Re: 2012 R2 web2py installation

2017-01-16 Thread Dave S
On Monday, January 16, 2017 at 2:48:20 AM UTC-8, Andrea Fae' wrote: > > Hello, I symply installed: > - python 2.7.13 > - web2py 2.14.6 from source code on Windows 2012 R2 with IIS installed > > If I type from cmd > "python web2py.py" the GUI interface appears, it ask me the admin > password, I

[web2py] Re: Customising Calendar widgets in Start Date and End date of SmartGrid

2017-01-16 Thread Paolo Caruccio
Below link should work yet. http://sourceforge.net/projects/jscalendar/ Within the file you'll find the refrence and other original resources about jscalendar 1.0 of

[web2py] Re: Disable change password after login

2017-01-16 Thread Leonel Câmara
Probably in a model, something like: if auth.is_logged_in() and auth.user.registration_id: auth.settings.actions_disabled.append('change_password') -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Disable change password after login

2017-01-16 Thread Andrea Fae'
Yes, but how? Where? Il giorno lunedì 16 gennaio 2017 17:03:22 UTC+1, Leonel Câmara ha scritto: > > Append "change_password" to auth.settings.actions_disabled if the user has > a registration_id > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Re: how to add "checked" to an input helper ?

2017-01-16 Thread António Ramos
I found my problem if i remove _value, _checked works otherwise dont work... Regards 2017-01-16 17:27 GMT+00:00 Gaurav Vichare : > INPUT(_name='delete', _type="checkbox", _id='delete', _checked="checked") -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: how to add "checked" to an input helper ?

2017-01-16 Thread Gaurav Vichare
something like this in controller checkbox = INPUT(_name='delete', _type="checkbox", _id='delete') if condition: checkbox['_checked'] = "checked" or in view {{ if condition: =INPUT(_name='delete', _type="checkbox", _id='delete', _checked="checked") else:

[web2py] Re: Issue with web2py load component

2017-01-16 Thread Gaurav Vichare
Got it! Thank You so much Anthony. On Sunday, January 15, 2017 at 11:34:39 PM UTC+5:30, Anthony wrote: > > You're router specifies only a BASE element, which will apply to *all > *applications, > including admin -- but it should only apply to your specific application. > So, change it to

[web2py] how to add "checked" to an input helper ?

2017-01-16 Thread António Ramos
how to add "checked" to an input helper ? i have this input and want to add a "checked" based on a condition {{=INPUT(_onclick="ajax('"+url+"',[],':eval')", _type="checkbox",_class="friendread",_id=friend["id"],_value=friend["company"],value=False)}} regards António -- Resources: -

[web2py] Re: Disable change password after login

2017-01-16 Thread Leonel Câmara
Append "change_password" to auth.settings.actions_disabled if the user has a registration_id -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You

Re: [web2py] Self-hosted web analytics solutions for Web2py

2017-01-16 Thread Richard Vézina
db[table_name][field].retrieve_file_properties(file_name)['path'] I think 'path' will give you relative path... You can remove ['path'] and see what other properties you can access that could sweet your needs. Good luck Richard On Sat, Jan 14, 2017 at 5:28 AM, Joe

[web2py] Re: Web2py app on Android/IOS with notifications

2017-01-16 Thread Leonel Câmara
You can do it using something like pyAPNs for iOS devices and python-gcm for android ones. I actually did it a while ago, and while it worked, I do not recommend it as I faced many problems in the beginning, and I would follow Anthony's suggestion nowadays. I will give you my code using these

[web2py] Admin console doesn't work on iPad (blank screen)

2017-01-16 Thread David Manns
My app is installed on PythonAnywhere. The PythonAnywhere environment includes the current web2py distribution 2.14.6 including the admin console. I simply added my init application to the PA setup web2py project. On desktop browsers on my PC the admin application works just fine. If I try to

[web2py] Disable change password after login

2017-01-16 Thread Andrea Fae'
Only for users with a value in "registration_id" I want di disable the change password function. How to do? Thank you -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: SQLFORM.grid, groupby and sum/count

2017-01-16 Thread Jurgis Pralgauskis
Hi, I think it echoes my isssues https://github.com/web2py/web2py/issues/1559 https://github.com/web2py/web2py/issues/1553 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] field.tablename vs field._tablename ?

2017-01-16 Thread Jurgis Pralgauskis
Hello, what is the difference? I see _tablename used in Field constructor, but not assigned.. in Table constructor I found field.tablename = field._tablename = tablename -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] SQLFORM.grid, groupby and sum/count

2017-01-16 Thread James Booth
Hey guys, I'm trying to create a SQLFORM.grid that will display the total number of entries for each 'user' in a certain time period. Basically, my model states that a user can only be in bursary_entries table once per day (This equates to a user swiping their ID card). I would like to be

Re: [web2py] Re: How to see the console output in a production environment?

2017-01-16 Thread António Ramos
I just create a table db.define_table('log', Field('msg'), Field('log_datetime','datetime',default=request.now)) then log=db.log.insert then somewhere in your code when you want to log just do log(msg="blablabla") instead of print 2017-01-16 7:51 GMT+00:00

[web2py] 2012 R2 web2py installation

2017-01-16 Thread Andrea Fae'
Hello, I symply installed: - python 2.7.13 - web2py 2.14.6 from source code on Windows 2012 R2 with IIS installed If I type from cmd "python web2py.py" the GUI interface appears, it ask me the admin password, I type and all is working If I type from cmd "python web2py.py -a 'password' and I