[web2py] Re: Migrating Postgres to MySql

2016-09-16 Thread Joe Barnhart
Huh. Just tried db.export_to_csv_file() again and it wasn't nearly as slow as I thought before. It took about 2 minutes for a largish (but not my biggest) database, exported from Postgres. As a fun thing to try, I ran the same command under the most recent pypy and the same export took only

[web2py] Re: how to add alt tags to images

2016-09-16 Thread Dave S
On Friday, September 16, 2016 at 12:51:12 PM UTC-7, Anthony wrote: > > What are you expecting to see? The "alt" text should only display on > screen in case the image can't be loaded. > I think browsers for the blind do text-to-speech on the alt text. I haven't had to deal with that myself,

[web2py] Re: Smartgrid search: How do I search on integers and linked tables?

2016-09-16 Thread Luciano Laporta Podazza
On Tuesday, September 6, 2016 at 11:37:00 AM UTC-3, Massimo Di Pierro wrote: > > You can customize smartgrid and make your own search function. By default > you cannot. > Thanks Massimo! > > On Thursday, 1 September 2016 20:34:27 UTC-5, Luciano Laporta Podazza > wrote: >> >> Hello, >> >>

[web2py] booking/event calendar

2016-09-16 Thread icodk
Looking for a front end event/booking calendar to be used in web2py application. I actually found 49 on github (searching for javascript event calendar). Just before I try them all, would be thankful to hear others experience. Thanks -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Migrating Postgres to MySql

2016-09-16 Thread Joe Barnhart
I've been using PostgresSQL for my production site for quite awhile. My future improved site, however, will feature MySql for its database engine. (Not a diss on Postgres, it's just a lot easier to find hosting companies who will rent me a supported-and-maintained MySql instance.) I have

[web2py] Re: field in list test

2016-09-16 Thread Anthony
This is a quirk of Field objects. Field inherits from Expression, and the __eq__ method of Expression returns a Query object (rather than testing for equality and returning a boolean). So, if you do something like myfield == some_object, you do not actually get a test of whether myfield is

[web2py] Re: how to add alt tags to images

2016-09-16 Thread Alex Glaros
okay, never mind last question - I can see it looks correct from view-source -- 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 received this message

[web2py] Re: how to add alt tags to images

2016-09-16 Thread Alex Glaros
am I correct in that this highlighted part works in w2p for ADA compliance? {{=IMG(_src=URL('static', 'images/small_new_gov.png'), _alt='photo of government and citizens')}} thanks Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: how to add alt tags to images

2016-09-16 Thread Anthony
You need to set the "title" attribute to get text to pop up when you hover. If you inspect that "Register to Vote" button, you'll see it has both an "alt" attribute and a "title" attribute. Anthony On Friday, September 16, 2016 at 4:05:26 PM UTC-4, Alex Glaros wrote: > > maybe I'm not

[web2py] Re: Is it safe to use plain XMLHttpRequest instead of ajax() function?

2016-09-16 Thread Anthony
On Friday, September 16, 2016 at 7:58:26 AM UTC-4, Przemysław Loesch wrote: > > Massimo thank you very much for your answer. I have one more question a > bit out of the topic. > Is it a way to increase web2py efficiency when it is used only for > database transactions and user authorization? I

[web2py] Re: how to add alt tags to images

2016-09-16 Thread Alex Glaros
maybe I'm not understanding ADA requirements. What was expecting to see is the displayed text when you hover over the "register to vote button" at bottom of this page: http://www.insurance.ca.gov/ -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Is it safe to use plain XMLHttpRequest instead of ajax() function?

2016-09-16 Thread Anthony
On Friday, September 16, 2016 at 2:16:28 PM UTC-4, Dave S wrote: > > > You're going to have at least a minimal view (generic.json, frex) to > provide the headers and the HTTP 200. > You do not need a view in order to have headers set or return an HTTP response -- that can all be done from a

[web2py] Re: how to add alt tags to images

2016-09-16 Thread Anthony
What are you expecting to see? The "alt" text should only display on screen in case the image can't be loaded. Anthony On Friday, September 16, 2016 at 3:44:21 PM UTC-4, Alex Glaros wrote: > > Need add alt tags to images for ADA compliance > > Below doesn't seem to

[web2py] how to add alt tags to images

2016-09-16 Thread Alex Glaros
Need add alt tags to images for ADA compliance Below doesn't seem to display any alt info any suggestions appreciated Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: sqlite3 driver not found ((

2016-09-16 Thread Dave S
On Friday, September 16, 2016 at 11:51:02 AM UTC-7, Dmitri Ermolaev wrote: > > I install pyDALL https://github.com/web2py/pydal > but same error (( > in python command line - erro is same - not found driver! > What does your connection string look like? /dps > > пятница, 16 сентября 2016

[web2py] Re: sqlite3 driver not found ((

2016-09-16 Thread Dmitri Ermolaev
I install pyDALL https://github.com/web2py/pydal but same error (( in python command line - erro is same - not found driver! пятница, 16 сентября 2016 г., 21:34:57 UTC+3 пользователь Dmitri Ermolaev написал: > > I try to install on Unix server - unpack .zip > and run apps - error: > Failure to

[web2py] Re: field in list test

2016-09-16 Thread Dave S
On Friday, September 16, 2016 at 9:41:28 AM UTC-7, Yoel Benitez Fonseca wrote: > > Does this make sense to you? > Yes. > > In [1]: fields = list() > > In [2]: f = db.item.id > > In [3]: f in fields > Out[3]: False > > In [4]: fields.append(f) > > In [5]: f in fields > Out[5]: True >

[web2py] sqlite3 driver not found ((

2016-09-16 Thread Dmitri Ermolaev
Failure to connect, tried 5 times: Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/pyDAL-16.8-py2.7.egg/pydal/base.py", line 455, in __init__ self._adapter = adapter(**kwargs) File

[web2py] Re: Is it safe to use plain XMLHttpRequest instead of ajax() function?

2016-09-16 Thread Dave S
On Friday, September 16, 2016 at 4:58:26 AM UTC-7, Przemysław Loesch wrote: > > Massimo thank you very much for your answer. I have one more question a > bit out of the topic. > Is it a way to increase web2py efficiency when it is used only for > database transactions and user authorization? I

[web2py] field in list test

2016-09-16 Thread Yoel Benitez Fonseca
Does this make sense to you? In [1]: fields = list() In [2]: f = db.item.id In [3]: f in fields Out[3]: False In [4]: fields.append(f) In [5]: f in fields Out[5]: True In [6]: f = db.item.headline In [7]: f in fields Out[7]: True I mean, the last value of 'f' is a fields object but a

[web2py] Re: Web2py Solr UI

2016-09-16 Thread Ron Chatterjee
I never used heystack so its interesting. How the heystack has advantage over this? query = SQLFORM.*build_query*(list_of_searchable_fields,search_text) On Thursday, September 15, 2016 at 6:51:25 PM UTC-4, Donald McClymont wrote: > > Massimo has also posted this as a starting point >

[web2py] Show Registration_Key attribute on grid

2016-09-16 Thread Oasis Agano
Im trying to add a registration_key to manage view so that the admin can approve a user in a view by just deleting the Pending CONTROLLER @auth.requires_login() @auth.requires_membership('Admin') def manageusers(): grid = SQLFORM.smartgrid(db.auth_user,user_signature=True) return

[web2py] Re: Is it safe to use plain XMLHttpRequest instead of ajax() function?

2016-09-16 Thread Przemysław Loesch
Massimo thank you very much for your answer. I have one more question a bit out of the topic. Is it a way to increase web2py efficiency when it is used only for database transactions and user authorization? I don't use web2py html helpers, forms, views processing etc. Complete GUI of my app is

[web2py] Re: avoiding duplicate field names

2016-09-16 Thread Alex Glaros
thanks Niphlod, you're right. Answer is right in the book. Works now. my_current_role_names = db(db.Role.role_owner_organization_FK == specificOrganizationID) db.Role.role_name.requires = IS_NOT_IN_DB(my_current_role_names, 'Role.role_name') -- Resources: - http://web2py.com -

[web2py] Re: Web2py - How to update a table field appending a string to an existing field value

2016-09-16 Thread Meinolf
I had tried that and tried it just now but still gives a None value in the rated_items.search_term field. maybe it's got to do with the table def; my table definition is as follows: db.define_table('rated_items', Field('search_term','string'), Field('user_id', 'reference auth_user',

[web2py] Re: avoiding duplicate field names

2016-09-16 Thread Niphlod
the query is right, but *requires=* *require *- excuse the repetition - a validator, not a query (those nifty IS_LENGTH() thingies) On Friday, September 16, 2016 at 5:18:30 AM UTC+2, Alex Glaros wrote: > > are there any simple mistakes in this syntax or am I approaching it wrong? > >