Re: [web2py] VSCODE with linter + debugging in WEB2PY

2022-11-27 Thread Alex Glaros
vscode is not understanding where web2py syntax is defined. I get following error Exception has occurred: NameError name 'request' is not defined File " C:\alex\alt_w2p_06_source\web2py\applications\lower_case_8\models\db.py", line 8, in if request.global_settings.web2py_version < "2.14.1": I

[web2py] Re: where is the path specified that points to python.exe

2022-11-27 Thread Alex Glaros
I mean where in the Web2py source code or settings can I tell web2py which instance of python to use. Where can I type the path? On Saturday, November 26, 2022 at 2:24:32 PM UTC-8 Arglanir wrote: > sys.executable should be your friend. > > Le samedi 26 novembre 2022 à 08:42:52 UTC+1,

[web2py] where is the path specified that points to python.exe

2022-11-25 Thread Alex Glaros
where is the path specified that points to python.exe? Am using Windows source code for For Python 3.7 -- 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) ---

[web2py] How to measure performance?

2022-01-15 Thread Alex Glaros
I put start-time capture at top of view, and end time-capture at bottom of view. Start and end time are always result in identical values but seems that end time should be different. In view I have: {{startTime = request.now}} [this is a top of view] {{for a in ...takes a few seconds to

[web2py] Re: How to add another field to select clause?

2020-11-28 Thread Alex Glaros
alexg...@gmail.com wrote: > >> using Postgres >> >> On Thursday, November 26, 2020 at 11:18:00 PM UTC-8 Alex Glaros wrote: >> >>> How to add db.role_member.id within select clause as highlighted below? >>> >>> If I leave it out, it runs fine

[web2py] Re: How to add another field to select clause?

2020-11-27 Thread Alex Glaros
using Postgres On Thursday, November 26, 2020 at 11:18:00 PM UTC-8 Alex Glaros wrote: > How to add db.role_member.id within select clause as highlighted below? > > If I leave it out, it runs fine. If I add it, I get error: > class 'psycopg2.errors.GroupingError'> column "

[web2py] How to add another field to select clause?

2020-11-26 Thread Alex Glaros
How to add db.role_member.id within select clause as highlighted below? If I leave it out, it runs fine. If I add it, I get error: class 'psycopg2.errors.GroupingError'> column "role_member.id" must appear in the GROUP BY and if I make it appear in the group by section as suggested by the

[web2py] Re: How to sort a join by count

2020-11-20 Thread Alex Glaros
) AS person_list' >>>>>>>>>> groupby = db.PERSON-PROJECT-PRIORITY.project_fk, >>>>>>>>>> ) >>>>>>>>>> >>>>>>>>>> суббота, 14 ноября 2020 г. в 09:40:17 UTC+3, alexg...@gmail.c

[web2py] How to pass variables to db.executesql?

2020-11-19 Thread Alex Glaros
for example where mytable.id = someWeb2PyVariable thanks, Alex Glaros -- 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 sort a join by count

2020-11-14 Thread Alex Glaros
>> person_fk >>>>>>> project_fk >>>>>>> >>>>>>> prioritySet = db((db.PERSON.id == >>>>>>> PERSON-PROJECT-PRIORITY.person_fk) & (PROJECT.id == >>>>>>> PERSON-PROJECT-PRIORITY.project_fk)).select() >>

[web2py] Re: How to sort a join by count

2020-11-14 Thread Alex Glaros
rson_fk >>>>> project_fk >>>>> >>>>> prioritySet = db((db.PERSON.id == PERSON-PROJECT-PRIORITY.person_fk) >>>>> & (PROJECT.id == PERSON-PROJECT-PRIORITY.project_fk)).select() >>>>> >>>>

[web2py] Re: How to sort a join by count

2020-11-14 Thread Alex Glaros
ou have additional time, how to write so output looks like: >> >> Paint-the-house (10) Tom, Sue, Tony, Ted, Mary, Fred, Sal, Chris, Ed, >> Sally >> Plant-a-garden (5) Harry, George, Joanne, Tony, Janet >> Clean-out-garage (2) Clyde, Jane >> >> Thanks, >>

[web2py] How to sort a join by count

2020-11-13 Thread Alex Glaros
ooks like: Paint-the-house (10) Tom, Sue, Tony, Ted, Mary, Fred, Sal, Chris, Ed, Sally Plant-a-garden (5) Harry, George, Joanne, Tony, Janet Clean-out-garage (2) Clyde, Jane Thanks, Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/we

[web2py] big data "out of memory" error

2019-08-12 Thread Alex Glaros
clone kept the requires statements: requires = IS_IN_DB(db, 'my_big_tables.id' ... and still ran fast so can the "reference my_big_tables" statement be safely, and completely eliminated from db.py? The "reference" statement really slows things down. thanks, Alex Glaros -

[web2py] backup page when site is broken

2019-05-19 Thread Alex Glaros
ough a SSL service and my routes.py looks like: #!/usr/bin/python # -*- codingf-8 -*- routers = dict( # base router BASE=dict( default_application='myDomain', domains={'www.myDomain':'myDomain'} ), ) thanks, Alex Glaros -- Resources: - http://web2py.com - http://web2p

Re: [web2py] Re: error connecting to postgrsql when running web2py from source on windows

2019-04-08 Thread Alex Glaros
ms\Python\Python37\Scripts > > (and if you have other python versions installed, use pip3 or even pip3.7 ) > > Cheers, > Nico > > Il giorno lun 8 apr 2019 alle ore 07:15 Alex Glaros > ha scritto: > >> How to pip install psycopg2? I get the following error: >>

[web2py] Re: pycharm "No python interpreter selected"

2019-04-07 Thread Alex Glaros
I installed source version of web2py windows and that worked. I guess windows binary doesn't have a path to python.exe -- 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: error connecting to postgrsql when running web2py from source on windows

2019-04-07 Thread Alex Glaros
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> thanks, Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (D

[web2py] Re: pycharm "No python interpreter selected"

2019-04-06 Thread Alex Glaros
my understanding is that it is looking for a file name python.exe but the binary version of windows web2py does not have that file. Do I just point to the gluon directory? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)

[web2py] Re: pycharm "No python interpreter selected"

2019-04-06 Thread Alex Glaros
I see this attached. What value am I supposed to specify? -- 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 because you are

[web2py] Re: pycharm "No python interpreter selected"

2019-04-06 Thread Alex Glaros
same question with Wing IDE, what do I enter for python path? -- 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 because you are

[web2py] pycharm "No python interpreter selected"

2019-04-06 Thread Alex Glaros
I have community version of pycharm and windows 10 binary version of web2py. Pycharm: "No python interpreter selected" How to resolve this? thanks Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source cod

[web2py] Re: How to create a nested json dictionary by loading data from a flat, parent-referencing list?

2019-03-21 Thread Alex Glaros
Works like a charm, thanks so much! -- 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 because you are subscribed to the Google

[web2py] Re: How to create a nested json dictionary by loading data from a flat, parent-referencing list?

2019-03-21 Thread Alex Glaros
It kind of works but adds a an opening and closing bracket "[" that surrounds the whole data like this: var datascource = [{"id": 2, "name": "Fred", all the rest of the data for the whole process}]; If I paste the json directly into the JavaScript function and manually delete the

[web2py] Re: How to create a nested json dictionary by loading data from a flat, parent-referencing list?

2019-03-20 Thread Alex Glaros
"as_trees" works great, but but how to remove the "Row<" verbiage from the result? You mentioned "serialize the result into json". Can you please show example? At the current stage, the data looks like this: [, , etc thanks, Alex Glaros -- Reso

[web2py] Re: How to create a nested json dictionary by loading data from a flat, parent-referencing list?

2019-03-08 Thread Alex Glaros
The manual’s example uses a single, self-referencing table. What would be the syntax for joined, parent/child tables? I get an AttributeError. Not sure if the parent_name formation is the problem roots = db((db.role_member.id > 0) & (db.role_member.object_super_object_fk ==

[web2py] How to create a nested json dictionary by loading data from a flat, parent-referencing list?

2019-03-07 Thread Alex Glaros
Miao', 'title': 'department manager' }, { 'name': 'Chun Miao', 'title': 'department manager' } ] }; Could Pandas be used to convert the data? thanks, Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: 2.18.1 is OUT

2019-02-24 Thread Alex Glaros
am on Windows -- 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 because you are subscribed to the Google Groups "web2py-users"

[web2py] Re: 2.18.1 is OUT

2019-02-24 Thread Alex Glaros
ed reportlab.platypus',), ) In file: C:\alex\alt_w2p_03\web2py_win\web2py\applications\engagement_squared\controllers/default.py 1. at 0AF57338, file "C:\alex\alt_w2p_03\web2py_win\web2py\applications\engagement_squared\controllers/default.py", line 11> thanks, Alex Glaros -- R

[web2py] off topic - npm for visualization dependencies and set up

2019-02-24 Thread Alex Glaros
that mean it's also available for regular database work if I find any further use for it such as non-ACID transactions and searches? thanks, Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com

[web2py] Re: How to preserve line breaks in text field

2019-01-16 Thread Alex Glaros
story.append(Paragraph(escape(text), styles["Normal"])) On Tuesday, January 15, 2019 at 8:15:50 AM UTC-8, Alex Glaros wrote: > > When converting to PDF, line breaks from a text field are collapsed. How > to retain the line breaks? Here is the PDF-cr

[web2py] How to preserve line breaks in text field

2019-01-15 Thread Alex Glaros
also tried db.client_controlled_documentation_stakeholder_content.client_controlled_documentation_stakeholder_content_narrative_description.represent = lambda v, r: DIV(v, _style='white-space:nowrap') Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source cod

[web2py] how to wrap column titles in grid?

2018-11-23 Thread Alex Glaros
past due thanks Alex Glaros -- 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 because you are subscribed to the Google Groups &qu

[web2py] Re: off topic: pg_dump syntax for pythonanywhere

2018-11-04 Thread Alex Glaros
Alexandra, I have not used it recently and only have my notes below: pg_dump --host=yourPythonAnywhereDbName.postgres.pythonanywhere-services.com --dbname=postgres_myDbName --(note: I don't know how to handle password) --port=10097 --username=yourPythonAnywhereRole --format=c

[web2py] sidebars still used in 2.17.2?

2018-10-29 Thread Alex Glaros
okay, guess I'll this use BS4 to create web page columns - https://getbootstrap.com/docs/4.0/layout/grid/ One of three columns One of three columns One of three columns -- Resources: - http://web2py.com -

[web2py] sidebars still used in 2.17.2?

2018-10-29 Thread Alex Glaros
Also, where is this linked from? It’s in the welcome site: \web2py\applications\examples\views\default\support.htm -- 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

[web2py] sidebars still used in 2.17.2?

2018-10-28 Thread Alex Glaros
}} {{include 'default/personal_connections_menu.html'}} {{end}} {{block right_sidebar}} {{end}} {{extend 'layout.html'}} thanks, Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p

[web2py] non-SMS 2FA

2018-08-01 Thread Alex Glaros
I've read that two-factor authorization using SMS is insecure <https://www.wired.com/story/two-factor-authentication-apps-authy-google-authenticator/> . Is there available, or has anyone installed google authentictor or authy on their sites? thanks Alex Glaros -- Resources:

Re: [web2py] Required field label

2018-06-22 Thread Alex Glaros
s = SQLFORM.factory(db.role_member_status_instance, labels={'role_member_status_fk':P('Role Member Status', B('*',_style= 'color:Red;font-size:140%'))}) thanks Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google

[web2py] css missing on startup page for Version 2.16.1-stable+timestamp.2017.11.14.05.54.25 (Running on Roc

2017-12-10 Thread Alex Glaros
is there any css missing on startup page for windows: Version 2.16.1-stable+timestamp.2017.11.14.05.54.25 (Running on Rocket 1.2.6, Python 2.7.9) see top links and whited out button on attached thanks Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation

[web2py] Re: Glyphicons not showing

2017-12-07 Thread Alex Glaros
>From another thread here: Bootstrap 4 dropped the bootstrap 3 included glyphicons. You need to use fontawesome or something like that and give a ui dict to grid with the proper classes to use. Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - h

[web2py] Re: Upgrade Web2py version button broken on PythonAnywhere admin console

2017-11-07 Thread Alex Glaros
it looks like a web2py administrator wrote the "reload" button for pythonAnywhere, so I emailed Massimo to ask to help them fix it in the mean time, is there a way to manually reload, such as stopping ngnx/flushing/re-starting nginx? I think that is the only other way I could, for example,

[web2py] Re: Upgrade Web2py version button broken on PythonAnywhere admin console

2017-11-07 Thread Alex Glaros
> > > You do not have a CNAME set up for your domain. Check this help page > for more information > about how to set it up correctly. > > pythonAnywhere said: if you're using cloudflare for your DNS, then you will see that yellow DNS error

[web2py] Re: Upgrade Web2py version button broken on PythonAnywhere admin console

2017-11-06 Thread Alex Glaros
I cannot restart the app because I get this PythonAnywhere error: You do not have a CNAME set up for your domain. Check this help page for more information about how to set it up correctly. But the domain name seems to be working:

[web2py] How to upgrade web2py version on PythonAnywhere

2017-11-06 Thread Alex Glaros
waiting for that to be fixed, what workarounds are there? Should I delete web2py folder contents and upload web2py from scratch using latest Linux version? Or are there special procedures to uploading web2py source code to PythonAnywhere? thanks Alex Glaros -- Resources: - http://web2py.com

Re: [web2py] Re: migrating database and updating it

2017-10-24 Thread Alex Glaros
) Maybe I read it wrong but looks like you changed DAL first on the new instance, then imported Postgres db. Of course keep your Postgres archive as permanent backup. Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code

[web2py] Re: maybe too many db connections todb on pythonanywhere

2017-10-20 Thread Alex Glaros
there are a lot of fixes if search on your error string, plus max_connections parm info is at Postgres https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server what is your max_connections set to now? Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] redis server set up

2017-10-08 Thread Alex Glaros
cloud, what are the vars you use to connect? Examples? thanks Alex Glaros -- 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 detect if any view exists

2017-10-05 Thread Alex Glaros
can you give me a tip on checking file system? {{myCurrentPage=str(request.function) + '.html'}} I tried {{if URL('default', myCurrentPage):}} {{include 'default/menu_favorites.html'}} {{pass}} and {{if request.folder,'default', myCurrentPage:}} {{include

[web2py] how to detect if any view exists

2017-10-05 Thread Alex Glaros
if there is a view yet or not? not that important but would like to prevent this appearing if anyone besides myself is programming on the app. As soon as the view is created, the error goes away. thanks Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation

[web2py] Re: syntax error in list join-to-db?

2017-10-02 Thread Alex Glaros
you're right, thanks Anthony (should have named it myQuery) myQuery = db.auth_user.id.belongs(session.myConnectionsSet) -- 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: syntax error in list join-to-db?

2017-10-02 Thread Alex Glaros
oops, used this to create query: mySet = db(db.auth_user.id.belongs([session.myConnectionsSet]))._select() same error result -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] syntax error in list join-to-db?

2017-10-02 Thread Alex Glaros
to db, which causes error: mySet = db.auth_user.id.belongs([session.myConnectionsList]) * unhashable type: 'list'* see anything I'm doing wrong? thanks Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code

Re: [web2py] Re: "object_type" reserved word in web2py?

2017-09-26 Thread Alex Glaros
it is a key table in my app and would be difficult to rename in the future if there were naming issues thanks Anthony Alex On Tue, Sep 26, 2017 at 7:07 AM, Anthony <abasta...@gmail.com> wrote: > No, why do you ask? > > > On Tuesday, September 26, 2017 at 1:30:43 AM UTC-4,

[web2py] "object_type" reserved word in web2py?

2017-09-25 Thread Alex Glaros
"object_type" reserved word in web2py? thanks Alex Glaros -- 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 b

[web2py] Re: DAL changes in 2.15.4 regarding Postgres - upper case table names

2017-09-13 Thread Alex Glaros
lower case with underscores is PEP 8 recommended so I'll rename all tables and my question becomes moot -- 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) ---

[web2py] DAL changes in 2.15.4 regarding Postgres - upper case table names

2017-09-13 Thread Alex Glaros
, it no longer handles the upper/lower case differences. Are there parameters I can change, or methods to handle this? As of now the only recourse seems to go through db.py tables and change all upper case to lower case to match Postgres definitions. thanks Alex Glaros -- Resources: - http

[web2py] Re: how to set migrate = False in db.auth_user extra fields?

2017-09-10 Thread Alex Glaros
any way to specifically target auth_user (or any of the auth tables)? -- 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 because

[web2py] how to set migrate = False in db.auth_user extra fields?

2017-09-09 Thread Alex Glaros
1. it is best practice to set: fake_migrate = False, migrate = False for every production table, correct? 2. how to do that for db.auth_user extra fields? thanks Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: dumb question about sessions server used to store tables in order to avoid hits to db

2017-09-07 Thread Alex Glaros
sounds great! -- 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 because you are subscribed to the Google Groups "web2py-users"

[web2py] dumb question about sessions server used to store tables in order to avoid hits to db

2017-09-07 Thread Alex Glaros
in order to reduce hits to the db? (Db would only be accessed if there was any change to the tables represented by session vars.) Would this improve performance? My conceptual understanding could be so far off that this question doesn't make sense... thanks Alex Glaros -- Resources: - http

[web2py] Re: how to save controller vars into a field?

2017-09-07 Thread Alex Glaros
It worked! Thanks Pbreit on my desktop, it skiped the port part of the address 8000 so had to add to use w2p URL format: bookmark = request.get_vars.bookmark.rsplit('/', 1)[-1] -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: how to save controller vars into a field?

2017-09-06 Thread Alex Glaros
am still having trouble making it work What data structure type do I vars in so that user can return next day and have bookmarks work? Right now is stored in "string" field in a regular table. Tried "json" field type but Postgres rejected. Is it supposed be some sort of dictionary field?

[web2py] how to save controller vars into a field?

2017-09-05 Thread Alex Glaros
t:right;padding:10px;margin:10px;text-transform: capitalize;')}} Cannot predict what vars will be required because the bookmarks function appears on all pages and some pages have different var requirements. So would like to just get all of them generically via request.get_vars thanks

[web2py] Re: ubiquitous bookmarks menu

2017-09-05 Thread Alex Glaros
thanks Leonel and Anthony the knowledge and timeliness of responses is just great Alex -- 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

[web2py] Re: ubiquitous bookmarks menu

2017-09-05 Thread Alex Glaros
are there any performance considerations that would justify putting in session vars instead? -- 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

[web2py] ubiquitous bookmarks menu

2017-09-05 Thread Alex Glaros
html page. How do other people handle this? thanks Alex Glaros -- 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 because you

[web2py] Re: how to pass table name to controller?

2017-09-04 Thread Alex Glaros
well, maybe it is usable, but is this a hack that could be formatted better? specificTableToSearchMembersFromID = str(specificTableToSearchMembersFromID) + '.id' db.Role.object_super_object_FK.requires = IS_IN_DB(db(specificTableToSearchMembersFromID > 0),

[web2py] Re: how to pass table name to controller?

2017-09-04 Thread Alex Glaros
still could use some advice to make it work in usable way does the var need special braces or syntax to be recognized? db.Role.object_super_object_FK.requires = IS_IN_DB(db ([ specificTableToSearchMembersFromID]), -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: how to pass table name to controller?

2017-09-01 Thread Alex Glaros
well, I got a variable to work at least: specificTableToSearchMembersFromID = 'cost_center.id>0' db.Role.object_super_object_FK.requires = IS_IN_DB(db(specificTableToSearchMembersFromID), 'cost_center.super_object_fk', '%(cost_center_title)s', zero = T('choose one')) -- Resources: -

[web2py] Re: how to pass table name to controller?

2017-09-01 Thread Alex Glaros
sorry, should have mentioned that I tried that and every combination possible -- 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] how to pass table name to controller?

2017-09-01 Thread Alex Glaros
= 'cost_center.id' db.Role.object_super_object_FK.requires = IS_IN_DB(db ([ specificTableToSearchMembersFromID]), 'cost_center.super_object_fk', '%(cost_center_title)s', zero = T('choose one')) 'DAL' object has no attribute 'db.cost_center.id' thanks Alex Glaros -- Resources: - http

[web2py] Re: how to make check box appear to enable multiple selections

2017-08-30 Thread Alex Glaros
this was wrong: widget=SQLFORM.widgets.multiple.widget this works widget=SQLFORM.widgets.checkboxes.widget -- 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)

[web2py] how to make check box appear to enable multiple selections

2017-08-30 Thread Alex Glaros
B(db( limited_choices), 'ObjectType.object_type_table_name', '%(object_type_table_name)s', multiple=True, zero = T('choose one')), widget =SQLFORM.widgets.multiple.widget)) if form.process().accepted: response.flash = form.vars.object_type_table_name Thanks, Alex Glaros -- Resources: -

Re: [web2py] Re: warning for postgres users: current contrib/pg8000 is old and causes weird postgres errors

2017-08-22 Thread Alex Glaros
did it update pg8000 too? thanks Gualter Alex -- 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 because you are subscribed to

[web2py] Re: warning for postgres users: current contrib/pg8000 is old and causes weird postgres errors

2017-08-22 Thread Alex Glaros
Thanks Gualter. I do have the paid account but web2py versions are not automatically updated on pythonAnywhere, so was looking for any tips, if needed. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: warning for postgres users: current contrib/pg8000 is old and causes weird postgres errors

2017-08-21 Thread Alex Glaros
anyone know which to use for pythonAnywhere.com? how to update on pythonAnywhere.com? thanks Alex Glaros -- 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

[web2py] Re: web2py deployment strategies

2017-07-20 Thread Alex Glaros
any performance advantage to moving controller files out of default.py into their own file? -- 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

[web2py] Re: web2py deployment strategies

2017-07-20 Thread Alex Glaros
Jim, regarding "That said, if you've got 500 tables in your app, you probably don't want to use the web2py default table instantiation on every request." 1. did you mean to put db.py model tables into categorized sub tables - e.g., accounting_related_tables.py, email_related_tables.py,

[web2py] Re: how to calculate time difference in hours, between two dates?

2017-07-18 Thread Alex Glaros
worked Dave! Thanks. nullBottle = db(db.InternalMessage.bottleneck_resolve_date == None).select() for r in nullBottle: db(db.InternalMessage.id == r.id).update(bottleneck_delay_time = (request.now - r.created_on).seconds/3660) -- Resources: - http://web2py.com -

[web2py] how to calculate time difference in hours, between two dates?

2017-07-18 Thread Alex Glaros
('bottleneck_delay_time', 'integer', label = 'Bottleneck Delay Time In hours')) CONTROLLER from datetime import timedelta db(db.InternalMessage.bottleneck_resolve_date == None).update(bottleneck_delay_time = (timedelta(request.now) - timedelta(db.InternalMessage.created_on))) thanks Alex Glaros

[web2py] Sacramento-area web2py programmers?

2017-07-17 Thread Alex Glaros
who else lives around Sacramento besides Joe? You're invited for dinner and talk some weekend at my house in Winters, CA (near Davis) thanks, Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https

[web2py] https://observatory.mozilla.org

2017-05-05 Thread Alex Glaros
is https://observatory.mozilla.org providing bogus results? thanks, Alex Glaros Host: web2py.com Scan ID #: 3686681 Test Time: May 5, 2017 5:36 PM Test Duration: 3 seconds Score: 0/100 Tests Passed: 5/11 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http

[web2py] Re: CKEditor CDN

2017-04-16 Thread Alex Glaros
"basic" works to fix sanitation problem https://cdn.ckeditor.com/4.6.2/basic/ckeditor.js";> -- 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

[web2py] Re: CKEditor CDN

2017-04-16 Thread Alex Glaros
thanks Dave, below worked, but sanitize=True removes tables and other elements that user creates so I have to read documentation on how to remove those buttons from the toolbar. https://cdn.ckeditor.com/4.6.2/standard/ckeditor.js";> What is your name?

[web2py] Re: CKEditor CDN

2017-04-14 Thread Alex Glaros
Dave, there's a gap in my skill level to understand your question. Can I please ask for an example? -- 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

[web2py] Re: CKEditor CDN

2017-04-14 Thread Alex Glaros
I think is the same. Works great, but once I have the edited content, I don't know how to load it into the table -- 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

[web2py] Re: CKEditor CDN

2017-04-14 Thread Alex Glaros
Not sure what you mean, I don't want to use the plug-in any more; just use the CDN. Whatever it take to do that, I'll change, unless security is not good. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: CKEditor CDN

2017-04-14 Thread Alex Glaros
gap in my understanding: how to get var "z", textarea content into w2p field person.summary_self_description ? When I used to use ckEditor as a plug-in, looked like this in controller: def ckedit(field, value): return TEXTAREA(_id = str(field).replace('.','_'), _name = field.name,

[web2py] Re: CKEditor CDN

2017-04-14 Thread Alex Glaros
It's looking better Michael but based on code example below, could you please help with: 1. Remind me how to get the updated text from textarea back into the table 2. the fromat_tags parm,, seems that purpose is to limit what user can do? If yes, don't seem to make the rest of the tags

[web2py] CKEditor CDN

2017-04-13 Thread Alex Glaros
CKEditor is now available from CDN: http://cdn.ckeditor.com/ can someone please provide example of how to integrate into w2p? is it safe, if not, way to sanitize? thanks, Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: Rocket server -- no blacklist for intrusive "clients"?

2017-03-28 Thread Alex Glaros
Cloudflare SSL will do that for you with their free version https://support.cloudflare.com/hc/en-us/articles/201897700-Step-4-Recommended-First-Steps-for-all-Cloudflare-users does a lot of other things too, e.g., encrypt email addresses displayed on your website Alex Glaros -- Resources

[web2py] Re: how to display field names and values within for loop?

2017-03-10 Thread Alex Glaros
finally, this worked perfectly, thanks Dave {{for f in db.Organization:}} {{=f.label}} {{=specificOrganization[f]}} {{=f.comment}} {{pass}} -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: how to display field names and values within for loop?

2017-03-10 Thread Alex Glaros
actually, this part works to display the label or comment {{for f in db.Organization:}} {{=f.label}} {{pass}} So all I need is a little help displaying the value in a loop, something like this psudo code specificOrganization = db.Organization(10) #just picked any record for convenience

[web2py] Re: how to display field names and values within for loop?

2017-03-10 Thread Alex Glaros
What is almost perfect is how w2p form displays a record (vertically with values) 1. Converts hyphens to spaces in field name, bolded 2. Displays label for field name, bolded 3. Displays comments for field name the problem with using a form to display field values is: a. not sure if record

[web2py] Re: how to display field names and values within for loop?

2017-03-09 Thread Alex Glaros
Will your example provide both field name and field value? am reveiving error CONTROLLER: supRows = db(db.Organization.id == 1).select() {{#returns locals}} VIEW: {{for record in supRows:}} {{=record.field}} {{pass}} Error ticket for "ES3"Ticket ID

[web2py] Re: how to display field names and values within for loop?

2017-03-09 Thread Alex Glaros
also, is there a way to 1. leave out the table name and just display field name 2. use the field label name instead of the raw/real field name? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] how to display field names and values within for loop?

2017-03-09 Thread Alex Glaros
I'd like to display column names and values vertically is there any way to write as expressed in this psudo code? {{for f in db.someTableRecord:}} {{=f}} {{=value_of_the_field}} {{pass}} thanks Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http

[web2py] Re: user-created documentation

2017-03-07 Thread Alex Glaros
thanks Marlysson, other than someone having already done something like this, this is about as good as answer I can expect, considering such a vague question :-) Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] user-created documentation

2017-03-06 Thread Alex Glaros
ide. Just wondering if there are any ideas to improve this without requiring users to learn Sphinx or more complicated methods. thanks, Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.co

  1   2   3   4   5   6   7   8   9   >