[web2py] Re: how to get currently logged in user name for the component embedded in the wiki text area

2018-09-03 Thread 98ujko9
I think I have answered myself. This does the job: db.define_table('comments', Field('logged_in_user', 'reference auth_user', default=auth.user_id), Field('user_comment', 'text',requires=IS_NOT_EMPTY()), ) On Monday, September 3, 2018 at 12:02:24 PM

[web2py] how to get currently logged in user name for the component embedded in the wiki text area

2018-09-03 Thread 98ujko9
i am getting the error: 'NoneType' object has no attribute 'first_name'. Field('logged_in_user', 'string',auth.user.first_name), AttributeError: 'NoneType' object has no attribute 'first_name' the site is behind the login page and even when I attempt to go the homepage (can't open the site

[web2py] Re: SQLFORM.smartgrid - Query Not Supported: (1066, "Not unique table/alias: 'a_table'")

2018-05-14 Thread 98ujko9
I am a weekend coder and my queries probably need to be redesigned. I was trying to move everything to a newer environment and immediately weak areas fail first. In time I should be able to sort things out. I do enjoy working with web2py . Thanks for your input. On Monday, May 14, 2018 at 10:48

[web2py] Re: SQLFORM.smartgrid - Query Not Supported: (1066, "Not unique table/alias: 'a_table'")

2018-05-12 Thread 98ujko9
db stats for 2.16.11 SELECT `labour`.`lab_description`, `labour`.`lab_id` FROM `labour` WHERE ((`labour`.`lab_id` IS NOT NULL) AND (`labour`.`lab_term_date` IS NULL)) ORDER BY `labour`.`lab_description`, `labour`.`lab_id`; 1.11ms --- db stats for 2.9.11 SET FOREIGN_KEY

[web2py] SQLFORM.smartgrid - Query Not Supported: (1066, "Not unique table/alias: 'a_table'")

2018-05-12 Thread 98ujko9
After update from web2py 2.9.11 (mysql 5.6.37) to web2py 2.16.11 (mysql 5.6.40) the SQLFORM.smartgrid shows zero results and at the top right displays a message: Query Not Supported: (1066, "Not unique table/alias: 'labprice'"). This same code works in 2.9.11: db.labprice._common_filter = l

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-29 Thread 98ujko9
I use the stock Rocket server that comes with web2py and I restart it after changing the routes.py. I must say that I don't fully understand the big picture of how the apps the compiler and the operating system cooperate. One time I uploaded a site to GAE with two separate apps but the tables

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-28 Thread 98ujko9
I removed routes_in and routes_out. The routes.py file in the site's root looks like so: routers = dict( # base router BASE=dict( default_application='init', ), stock=dict( default_function='index', functions=dict( default=['index','call','down

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-28 Thread 98ujko9
Big thank you! This works. One little detail emerged though. Now that I replaced the pattern router.py (having my line in routes_out as above) in my site root with the parameter rewrite method my URL shows 'default': https://192.168.1.25:8000/stock

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-28 Thread 98ujko9
No, the name 'index' withing 'showcase' is idle. On Monday, August 28, 2017 at 9:56:13 AM UTC-4, Anthony wrote: > > Do you have a /showcase/index function? > > On Monday, August 28, 2017 at 2:03:40 AM UTC-4, 98u...@gmail.com > wrote: >> >> I chose pattern-based rewrite because I don't know bette

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-27 Thread 98ujko9
I chose pattern-based rewrite because I don't know better. I am temporary part time web coder relying on web2py book 100% with understanding at about 60%. Being a mature person I am fond of eloquence in life as well as in URL's however complexity has its price. I sense from what you are saying

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-27 Thread 98ujko9
I chose pattern-based rewrite because I don't know better. Please know that I am only temporary part time web coder relying on web2py book 100% with understanding at about 60%. Being a mature person I am fond of eloquence in life as well as in URL's however complexity has its price. I sense fr

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-27 Thread 98ujko9
I could make "asset" function the default for the "showcase" controller however I am not sure how as I am already using renamed routes.patterns.example.py in the root of the website (multiple apps) to rewrite one URL (works nicely): routes_out = ( ('/stock/default/index','/stock'),# <== my

[web2py] how to rewrite an URL to drop a function name showing in the address bar

2017-08-26 Thread 98ujko9
How can I rewrite the URL (to drop asset): https://192.168.1.25:8000/stock/showcase/asset/2017-Some-fridge?id=79&_signature=c2e7899530c858f1b478cb7ea5f03bb30d4f68e1 to look like: https://192.168.1.25:8000/stock/showcase/2017-Some-fridge?id=79&_signature=c2e7899530c858f1b478cb7ea5f03bb30d4f68e1 the

[web2py] uuid field in CRUD call as record_id argument

2017-06-27 Thread 98ujko9
Hello, I have not seen mention of this anywhere. Perhaps my question is a superfluous. If a table contains uuid field type can it be used as a record_id for an argument in CRUD update call. It looks that it cannot. Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation

[web2py] Re: gae issue when using two independent apps with same data model under one project

2017-06-19 Thread 98ujko9
Thank you for your input. By creating a separate project the issue goes away. However it seems to me that in this way more resources are consumed. Such discussion would be beyond my competence level. Thanks On Monday, June 19, 2017 at 8:29:14 AM UTC-4, Karoly Kantor wrote: > > You can definitely

[web2py] gae issue when using two independent apps with same data model under one project

2017-06-16 Thread 98ujko9
Hello, I uploaded a simple web2py app named 'mynotes', (based on markmin app example) to gae under a project 'projectnotes' to keep my notes in. Very simple model: db.define_table('tblpage', Field('page_title','string',label='Title'), Field('page_text','text',label

[web2py] Re: dev_appserver does not allow login to my web2py app from LAN client

2017-06-14 Thread 98ujko9
My mistake! Please forgive me for wasting your time. I can't replicate that situation where I received above mentioned message. Suddenly I can do everything that I want. Working with web2py is fun! On Thursday, June 15, 2017 at 12:21:11 AM UTC-4, Anthony wrote: > > It's still not clear what is

[web2py] Re: dev_appserver does not allow login to my web2py app from LAN client

2017-06-14 Thread 98ujko9
Thank you for your response! I am afraid that my question lacked precision! Here is my regular command line to start web2py: ~/src/w2app$ ./web2py.py --password='1' -c ../ssl-key-crt/server.crt -k ../ssl-key-crt/server.key --ip=192.168.1.25 It works very nice! Here is my command required by

[web2py] dev_appserver does not allow login to my web2py app from LAN client

2017-06-13 Thread 98ujko9
I run my web2py on a home lan, headless box of linux. My web2py apps require login and it can only be performed over a secure channel. My question: is it possible (if yes then how) to configure my linux box to simulate local host accessing so that I can remain sitting on my couch? Should I remo

[web2py] Re: web2py 2.10.3 si OUT

2015-04-03 Thread 98ujko9
It did help to delete the folder upon upgrading via browser. But I experience something odd now, when I set-up web2py from the new source files (not via upgrade because that works) on Linux I cannot uninstall application that I have just created and also I cannot install external application u

[web2py] Re: smartgrid form submit button behaviour

2014-09-02 Thread 98ujko9
Well, drop down is too tight when you have lots of rows and also in the window I have the functionality of the browser search tool. I filed an issue about my dilemma: https://code.google.com/p/web2py/issues/detail?id=1974&start=100&; On Tuesday, September 2, 2014 6:12:12 PM UTC-4, Cliff Kachins

[web2py] smartgrid form submit button behaviour

2014-08-30 Thread 98ujko9
1) smartgrid produces a form for a new record 2) I click on an input field and with the help of javascript smaller (second) browser window opens with related table content 3) I select a row in the window and ID is inserted in the first window field, the smaller second window closes. 4) I click su

[web2py] grid orderby parameter not quite useful for a foreign key column

2014-07-05 Thread 98ujko9
The grid below orders the rows by part_description column only the first time the action is called. After that if you click on the header link it orders by pp_part_id foreign key which is not as useful as it could be by part_description. Why the link in the header for that column does not receiv

[web2py] Re: Readonly elements (select and date field) respond to clicks, allow for changes and can be submitted?

2014-06-23 Thread 98ujko9
I did what you suggested but the calls to: db.owner.own_end_date.writable = False # not writable db.owner.own_end_date.readable = False # do not show is at all! are effective only if executed before the call to form = SQLFORM.smartgrid(db.owner, ... When executed after, have no effect. I want to

[web2py] Readonly elements (select and date field) respond to clicks, allow for changes and can be submitted?

2014-06-22 Thread 98ujko9
Why readonly elements (select and date field) of a form respond to clicks and allow for changes and can be submitted? They look grayed out as if readonly but when I click on date field the date picker appears and works as it shoud also the select option is grayed out but it offers a list to cho

[web2py] validator - asking it to do some more

2014-06-15 Thread 98ujko9
# table definition db.define_table('vehicle', Field('manufacturer','string'), Field('name','string'), Field('vin','string',length=32,unique=True), Field('year','string'), Field('colour','string'), Field(

[web2py] Re: requires IS_IN_DB set as a union of two queries

2014-06-01 Thread 98ujko9
Resolved! This is the sql string needed to produce a selection for my reference field in IS_IN_DB: select vehicle.id,vehicle.manufacturer,vehicle.name,UPPER(vin) as vin from vehicle inner join (select a.own_veh_fk from owner a where a.own_end_date is not null and a.own_veh_fk not in (select b.

Re: [web2py] Re: requires IS_IN_DB set as a union of two queries

2014-05-30 Thread 98ujko9
This is my short version of SQL string that I am trying to convert for use with web2py. I am studding how to do it at this time but any help that comes sooner will be appreciated. It finds a vehicle without owner that is used when creating a vehicle owner. select vehicle.id,vehicle.manufacturer,

[web2py] Re: requires IS_IN_DB set as a union of two queries

2014-05-28 Thread 98ujko9
I did try: query = query1 | guery2 and received error: "Set | Set" or similar On Wednesday, May 28, 2014 7:47:36 PM UTC-4, 98u...@gmail.com wrote: > > Thank you Mr. Massimo and your colleagues for bringing the web2py to the > masses. > I need to have a field that will present a choice of values

[web2py] requires IS_IN_DB set as a union of two queries

2014-05-28 Thread 98ujko9
Thank you Mr. Massimo and your colleagues for bringing the web2py to the masses. I need to have a field that will present a choice of values that result from a union of query1 and query2 How can i create a set that would go where the question mark is? Thanks for any help! query1=((db.vehicle.i

[web2py] Re: module-new file - error when saving

2013-12-02 Thread 98ujko9
Found the problem, it is my ignorance. Names that start with digits aren't valid identifiers. Thanks. I am new to all this. On Monday, December 2, 2013 8:03:43 PM UTC-5, 黄祥 wrote: > > not sure why it's not work, please try to rename your modules files into > friendly name. e.g. rental_master.py

[web2py] module-new file - error when saving

2013-12-01 Thread 98ujko9
I am wondering if anyone else experience similar issue: I create a new application, create a new module "123test.py" file and when saving it get the error: failed to reload module because: invalid syntax (, line 1) The content of the file at this point is: #!/usr/bin/env python # coding: utf8 f

[web2py] Re: built-in wiki

2013-10-29 Thread 98ujko9
Thanks for reporting the issue. On Tuesday, October 29, 2013 3:38:04 PM UTC-4, Alan Etkin wrote: > > >> >> Note: The current markmin render engine requires a first line-break for >> multi-line code, otherwise it renders as single line. Try adding a leading >> line-break in the text box. >> > >

[web2py] web2py markmin function does not render plus ( + ) charcter

2013-10-28 Thread 98ujko9
I am afraid that expression $$ x + y $$ will render as "xy" rather than "x+y". I tried escaping the "plus" character but without any luck. I was wondering if somebody else encountered such an issue. Any help will be much appreciated. Thanks -- Resources: - http://web2py.com - http://web2py.com/

[web2py] built-in wiki

2013-10-27 Thread 98ujko9
Hello, I am new to web programming. I use web2py built-in wiki: auth.wiki(), the simplest form. Why is it that when I click the preview button the style for markmin items like ``this is some code`` looks OK (code is highlighted, break lines are present) and when I click on submit a record I see