[web2py] Re: OT PollyReports generate PDF using bands from DB

2020-11-02 Thread 'DenesL' via web2py-users
50,0), H, key=9), E((573,0), H, key=11, width=42), ] ) Regards, Denes On Monday, November 2, 2020 at 4:01:16 AM UTC-5 Clemens wrote: > Hi, you can realize absolute positioning by the TeX package texpos > <https://ctan.org/pkg/textpos>. But I don't know PollyReports very well, >

[web2py] Re: OT PollyReports generate PDF using bands from DB

2020-11-01 Thread 'DenesL' via web2py-users
things > you want to adapt (e.g. date). This should be easy. If you want to evaluate > this way and you need some more assistance, please let me know. > > Best regards > Clemens > > On Saturday, October 31, 2020 at 11:29:53 PM UTC+1 DenesL wrote: > >> @roger: you are w

[web2py] Re: OT PollyReports generate PDF using bands from DB

2020-10-31 Thread 'DenesL' via web2py-users
e it! > > Regards > Clemens > > On Thursday, October 1, 2020 at 4:58:39 PM UTC+2 DenesL wrote: > >> >> While searching for a Python PDF package I found PollyReports and was >> pleasantly surprised by it, and it is also nicely documented. >> >> PollyReports i

[web2py] OT PollyReports generate PDF using bands from DB

2020-10-01 Thread 'DenesL' via web2py-users
While searching for a Python PDF package I found PollyReports and was pleasantly surprised by it, and it is also nicely documented. PollyReports is a small, light module providing a simple way to generate reports from databases using Python. Reference:

[web2py] Re: sum decimal error?

2020-09-14 Thread 'DenesL' via web2py-users
I have found my mistake, in the query db(ti.DocNum == doc) I was using the wrong variable (doc) which is a row, it should be docnum. Thanks villas for your help and words of encouragement. On Friday, September 11, 2020 at 11:26:51 AM UTC-4 DenesL wrote: > Hi villas > > thanks

[web2py] Re: sum decimal error?

2020-09-11 Thread 'DenesL' via web2py-users
, 2020 at 6:34:50 AM UTC-4 villas wrote: > Are you sure your *doc *search value is an integer? > > Maybe a little more experimentation. Simplify and then incrementally add > complexity. Start here... > ss = db(ti.DocNum == 99).select(scnqtysum) > > Also, check

[web2py] Re: sum decimal error?

2020-09-10 Thread 'DenesL' via web2py-users
=0.0 later. This may have enabled you to create records with null > values? > > I therefore suggest you search for any null values and replace them with > 0.0. Perhaps you could run this query > update itmscan set scanqty = 0.0 where scanqty is null > > > On Wednesd

[web2py] sum decimal error?

2020-09-09 Thread 'DenesL' via web2py-users
Hi group running Version 2.20.4-stable+timestamp.2020.05.03.05.18.50 with SQL Server 2012 on Win 8.1 I am getting the following error when I try to sum a decimal field in a table: Traceback (most recent call last): File "C:\w2p\web2py22004py3\gluon\restricted.py", line 219, in restricted

[web2py] parse_blob override in 2.19.01

2020-04-28 Thread 'DenesL' via web2py-users
Hi all a while back in this post https://groups.google.com/d/msg/web2py/v6bB7PHa7f8/aZjaIby1fTgJ this was said: > > web2py uses b64encode/decode to store/retrieve data in blobs. Legacy > tables probably do not do it. > > You need you make your own custom adapter to override a method. For >

Re: [web2py] web2py 2.16.01 legacy databases

2018-01-25 Thread 'DenesL' via web2py-users
rasil > > > 2018-01-25 9:46 GMT-03:00 'DenesL' via web2py-users < > web2py@googlegroups.com>: > >> Hi Ovidio, >> >> the issue is that appadmin seems to be generating improper links to >> display records in legacy databases. >>

[web2py] Re: auth.messages.subject

2018-01-25 Thread 'DenesL' via web2py-users
While doing what in auth?. you might be able to set one the default subjects in Auth.default_messages, namely: ['verify_email_subject', 'reset_password_subject', 'retrieve_username_subject', 'bulk_invite_subject', 'retrieve_two_factor_code_subject', 'retrieve_password_subject'] On

Re: [web2py] web2py 2.16.01 legacy databases

2018-01-25 Thread 'DenesL' via web2py-users
ent would be important to social security + name ,for example. > > Hope this helps. > > > > >[image: http://itjp.net.br] <http://itjp.net.br> > http://itjp.net.b <http://itjp.net.br>r > *Ovidio Marinho Falcao N

[web2py] web2py 2.16.01 legacy databases

2018-01-24 Thread 'DenesL' via web2py-users
Testing web2py 2.16.01 installed from source on Windows 8 with Python 2.7.14 I have two tables on MS SQL Server 2012, one is legacy, the other not: w2p.define_table('person', Field('name', 'string', length=100, notnull=True), Field('info', 'string', length=100), primarykey=['name'] )

[web2py] Re: custom pydal adapter

2018-01-18 Thread 'DenesL' via web2py-users
parsers\base.py", line 37, in _blob return to_native(b64decode(to_bytes(value))) File "C:\Python2711\lib\base64.py", line 77, in b64decode raise TypeError(msg) TypeError: Incorrect padding which I kind of expected. Is there a way to modify the parser before the adapter is us

[web2py] custom pydal adapter

2018-01-18 Thread 'DenesL' via web2py-users
Hello in an older version of web2py I had code to create a custom adapter. This code does not work in the latest version of web2py so I tried to update it, but web2py has changed so much internally that I am having a bit of trouble. Any hints on how to rewrite the following are appreciated:

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-04-30 Thread 'DenesL' via web2py-users
Have you tried the rname parameter in the table definition?. Denes On Thursday, April 27, 2017 at 8:20:40 AM UTC-4, Jim S wrote: > > Yes, I was able to get it to connect and the DAL created my tables, but > not it won't access them because it is looking for lower case table names > and

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-04-04 Thread 'DenesL' via web2py-users
im S wrote: >> >> Pretty sure I downloaded the zip file from github and extracted it. Then >> started with command line options specifying IP of 0.0.0.0 and port. Port >> can be determined by clicking on the More Info icon on the on your Spaces >> page. >> >

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-04-04 Thread 'DenesL' via web2py-users
-Jim > > On Tue, Apr 4, 2017 at 8:30 AM, 'DenesL' via web2py-users < > web2py@googlegroups.com> wrote: > >> I tried running web2py on PUB400 but I get >> >> File >> "/QOpenSys/QIBM/ProdData/OPS/Python2.7/lib/python2.7/threading.py"

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-04-04 Thread 'DenesL' via web2py-users
I tried running web2py on PUB400 but I get File "/QOpenSys/QIBM/ProdData/OPS/Python2.7/lib/python2.7/threading.py", line 736, in start _start_new_thread(self.__bootstrap, ()) thread.error: can't start new thread Does web2py work on litmis?. Denes On Wednesday, March 29, 2017 at

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-03-20 Thread 'DenesL' via web2py-users
gt;> when signing up. Let me know if you have any questions. >> >> -Jim >> >> On Mon, Mar 20, 2017 at 8:56 AM, 'DenesL' via web2py-users < >> web2py@googlegroups.com> wrote: >> >>> >>> Last summer uh? Not keeping up with i news lat

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-03-20 Thread 'DenesL' via web2py-users
Let me know if you have any questions. > > -Jim > > On Mon, Mar 20, 2017 at 8:56 AM, 'DenesL' via web2py-users wrote: > >> >> Last summer uh? Not keeping up with i news lately... >> >> I looked it up as soon as I saw your post today, that is why I said it >

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-03-20 Thread 'DenesL' via web2py-users
have a local > dbapi connector to connect to a DB2/400 database which is what I'm trying > to connect to with the DAL. > > I don't know where to begin modifying an adapter, looking for help. > > -Jim > > On Monday, March 20, 2017 at 8:18:41 AM UTC-5, DenesL wrote: >> &

Re: [web2py] Access DB2/400 from IBM i (AS/400) PASE environment

2017-03-20 Thread 'DenesL' via web2py-users
Hi Jim Python officially supported on i, finally!! I wish this had happened a while back. It seems that this would require a modified adapter in web2py, sadly I have no access to a current 7.x box to test. Denes On Saturday, March 18, 2017 at 11:11:34 AM UTC-4, Jim S wrote: > > In this example

[web2py] Re: web2py and Spatial / GIS support

2016-05-24 Thread 'DenesL' via web2py-users
I believe the original web2py GIS sponsor (http://sahanafoundation.org/) uses it in their products, which are production ready. Expanding it depends on: - existence of desired functionality in the supported databases - desirability of said functions for the community - willingness to contribute,

[web2py] Re: Dropdown doesn't show on response.menu

2016-05-14 Thread 'DenesL' via web2py-users
Bootstrap 3 does not support menu depths beyond level 2. See https://groups.google.com/forum/#!searchin/web2py/menu|sort:relevance/web2py/UkIV84MuE6w/QtJtfQkyAwAJ On Saturday, May 14, 2016 at 4:45:34 PM UTC-4, anamarie06...@gmail.com wrote: > > Question from a new user. I defined the

[web2py] Re: invalid request

2016-05-10 Thread 'DenesL' via web2py-users
Have you tried starting web2py without Apache?. You seem to have change IP addresses and ports, they are stored and need to be reset. http://www.web2py.com/books/default/chapter/29/04/the-core#Command-line-options On Tuesday, May 10, 2016 at 6:38:42 AM UTC-4, Laer Cius wrote: > > Hi, > > I know

[web2py] Re: create file outside of web2py using IDE

2016-05-09 Thread 'DenesL' via web2py-users
The models are executed in alphabetic order, so check that the newly created model file is not executed before the db is defined. On Wednesday, May 4, 2016 at 11:56:08 AM UTC-4, Vic Ding wrote: > > Hi all, > > I am using Pycharm together with web2py. I created a model file > models/db1.py in

[web2py] Re: DB2 truncate()

2016-05-09 Thread 'DenesL' via web2py-users
There are different platforms on which DB2 runs and in some the TRUNCATE command is supported, but that is not the case for iSeries DB2. Which version of OS are you running?. The alternative seems to be a DELETE without a WHERE clause which could be set as a TRUNCATE override in another db2

[web2py] Re: executeSQL returns None (Cassandra)

2016-05-09 Thread 'DenesL' via web2py-users
As far as I know web2py does not oficially support Cassandra, however it could be added with some work. On Monday, May 9, 2016 at 5:06:10 AM UTC-4, MrRedmerlot wrote: > > Hi, > > My web2py is connected to Cassandra. > I need to use ALLOW FILTERING flag in the command. > I don't see how I could

[web2py] Re: Not Authorized - but I don't know why

2016-05-08 Thread 'DenesL' via web2py-users
http://www.web2py.com/books/default/chapter/29/07/forms-and-validators#login-required-by-default-for-data-updates By default all the URLs generated by the grid are digitally signed and verified. This means one cannot perform certain actions (create, update, delete) without being logged-in. On

[web2py] Re: About the database adminstration

2016-05-08 Thread 'DenesL' via web2py-users
It means that you can not name a table or field "ALL" because it is a keyword (it has special meaning) in the current DB. You have to use a different name. On Sunday, May 8, 2016 at 9:48:23 AM UTC-4, Abhijeet Singh Tomer wrote: > > when I create a no of fields in the db.py file after then when I

[web2py] Re: Label in Form

2016-05-08 Thread 'DenesL' via web2py-users
You don't say how you are creating the form. Assuming you are using SQLFORM then the label is in the Field definition: http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Field-constructor On Sunday, May 8, 2016 at 9:48:28 AM UTC-4, R U wrote: > > I am fairly new to

[web2py] Re: checkboxes framework7.io and validate

2016-04-21 Thread 'DenesL' via web2py-users
I am still using F7 to develop mobile apps, unlike other frameworks/tools that I have tried before, which were dropped because of their lack of features or performance issues, and I have tried a few of them along the way: jquery mobile, kendoui, lungo, semantic, and some others I can't recall

[web2py] Re: checkboxes framework7.io and validate

2016-04-19 Thread 'DenesL' via web2py-users
The solution I came up to this issue is at http://forum.framework7.io/#!/bugs-and-issues:formtojson-checkbox-encodin I would like to hear from others that might be using F7 with web2py. Denes -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Re: Pre populating form with list:string field

2016-04-18 Thread 'DenesL' via web2py-users
form.vars.name > > return dict(message=T('Welcome to web2py!'), form=form) > > > But my test field keeps empty. > > Greetings. > > El 18/04/16 a las 10:56, 'DenesL' via web2py-users escribió: > > You would use a list. > > http://web2py.com/books/defa

[web2py] Re: Pre populating form with list:string field

2016-04-18 Thread 'DenesL' via web2py-users
You would use a list. http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#list--type--and-contains On Monday, April 18, 2016 at 9:27:13 AM UTC-4, Carlos Cesar Caballero wrote: > > Hi, I am trying to pre-populate a form who has a list:string field, but > if I pass a list

[web2py] Re: Web2py -> MYSQL issue when querying database in background applicaiton

2016-04-18 Thread 'DenesL' via web2py-users
Your private test script works fine for me on web2py 2.14.05 with rocket and ms sqlserver. In your post it says "test module" but I have the db & table in the models. Denes On Saturday, April 16, 2016 at 12:53:35 AM UTC-4, David wrote: > > Let me start by saying Web2py is awesome and I'm

[web2py] Re: Some help with computed field in a query

2016-04-06 Thread 'DenesL' via web2py-users
Maybe you could use a virtual field and not a computed one: db.rentals.urlid = Field.Virtual( 'urlid', lambda r: URL('rentals_manage', args=r.id) ) then after rows = db(db.rentals...).select(...) the rows will contain an urlid field.

[web2py] Re: smartgrid header sorting

2016-04-05 Thread 'DenesL' via web2py-users
The links argument must be a list of dict(header='name',body=lambda row: A(...)) where header is the header of the new column and body is a function that takes a row and returns a value. In the example, the value is a A(...) helper.

[web2py] Re: Perform Queries with SQLFORM.smartgrid()

2016-04-05 Thread 'DenesL' via web2py-users
http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-smartgrid is designed to take as input not a query but only one table and to browse said table and selected referencing tables. http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-grid The first

[web2py] Re: SQLFORM, custom, widget

2016-04-05 Thread 'DenesL' via web2py-users
Chapter 7: http://web2py.com/books/default/chapter/29/07/forms-and-validators in different sections: process http://web2py.com/books/default/chapter/29/07/forms-and-validators#The-process-and-validate-methods custom & widget

[web2py] Re: How to make two css work for a view such that one is for pc and the other for mobiles?

2016-04-05 Thread 'DenesL' via web2py-users
See http://web2py.com/books/default/chapter/29/05/the-views#Mobile-development On Tuesday, April 5, 2016 at 3:51:03 PM UTC-4, Stephen Duisberg wrote: > > Can we write two css files for the same? > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: checkboxes framework7.io and validate

2016-03-31 Thread 'DenesL' via web2py-users
Let me re-phrase the question. Would it be invalid to post the input field name='box1' type='checkbox' as box1[] ? I have been unsuccessfull in replicating a post with box1[] from checkboxes without Framework7 except when the input itself is named box1[]. F7 uses javascript to modify the DOM

[web2py] move detect_record_change section under SQLFORM in the book

2016-03-31 Thread 'DenesL' via web2py-users
Suggestion: the detect_record_change section appears under FORM in the book http://web2py.com/books/default/chapter/29/07/forms-and-validators#Detect-record-change but it does *not* work with FORM. Its existence might be missed since there is no mention of it under SQLFORM. Denes -- Resources:

[web2py] Re: Why is id field not hiding here at all in the form displaying?

2016-03-30 Thread 'DenesL' via web2py-users
You don't need that script to hide the id, just set the showid param in SQLFORM to False. See the signature of the SQLFORM constructor: http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM Denes On Wednesday, March 30, 2016 at 4:00:13 PM UTC-4, Jacob Devin wrote: > > def

[web2py] checkboxes framework7.io and validate

2016-03-30 Thread 'DenesL' via web2py-users
Hi while creating some pages with framework7 I noticed that the checkbox inputs were not validating. On a closer look I noticed that they where being submitted as checkbox_name[] instead of just checkbox_name. I tried to fix the issue by replacing the offending vars in request.vars with

[web2py] Re: Print all items from inner join while grouping them

2016-01-24 Thread 'DenesL' via web2py-users
Hi Hermann You can add an inner loop to each user found by the original code: for row in db(db.person.id==db.thing.owner_id).select(db.person.id, db. person.name, count, groupby=db.person.name): print row.person.name, row[count] for t in

[web2py] Re: how to programatically create virtual fields in aliased table

2016-01-24 Thread 'DenesL' via web2py-users
Iif you want virtual fields to show up in a query over a single table they have to be defined in that table, otherwise you need to join a table where they exist. The definition of a virtual field needs a name and usually a lambda function over fields in a row. Lets add a virtual field to the

[web2py] Re: Print all items from inner join while grouping them

2016-01-23 Thread 'DenesL' via web2py-users
Use orderby: for row in db(db.person.id==db.thing.owner_id).select( db.person.name,db.thing.name, orderby=db.person.name): print row.person.name, row.thing.name Denes On Saturday, January 23, 2016 at 11:59:59 AM UTC-5, Hermann Tchehoun wrote: > > Hello Everyone ! > >

[web2py] Re: Retrieve value of dictionary in field with requires=IS_IN_SET(dictcionary)

2016-01-23 Thread 'DenesL' via web2py-users
web2py will only store the key part (1,2,.. or 5) in the category field. You have to provide the value part for the key:value pairs. courses = {1:'Arte',2:'Artigianato',3:'Cucina',4:'sport',5:'informatica'} db.courses.category.requires = IS_IN_SET(courses, zero='Scegli la categoria' ) # it can

[web2py] Re: Use auto complete without SQL

2016-01-18 Thread 'DenesL' via web2py-users
Hello Seraaj 1) You can still use SQLFORM if you want, just preset the widget and use the fields parameter of SQLFORM to filter: def someaction(): db.table.fieldX.widget = SQLFORM.widgets.autocomplete(request, ...) form = SQLFORM(db.table, fields=['fieldX',], ...) if form.validate():

[web2py] Re: how to import_from_csv or export_to_csv without primary key

2016-01-17 Thread 'DenesL' via web2py-users
The concept is applicable to any number of tables. Tables store the names of their fields in db.table.fields so you can create a copy of that without the id field (or any other(s)) an use it to select the rows in your program. Denes On Sunday, January 17, 2016 at 1:20:10 PM UTC-5, Alex Glaros

[web2py] Re: Length and requires is not null together

2016-01-17 Thread 'DenesL' via web2py-users
When you need several validators on a field you create a list of them: ... requires=[ IS_NOT_EMPTY(), IS_LENGTH(50) ] Denes On Sunday, January 17, 2016 at 4:22:38 PM UTC-5, Alessio Varalta wrote: > > Hi I have a problem with filed and validate > > >

[web2py] Re: Edit form style

2016-01-17 Thread 'DenesL' via web2py-users
The 3 at the end is calculated in the _inner function of the formstyle_bootstrap3_inline_factory function in sqlhtml.py (around line 909 in 2.12.03). Denes On Friday, January 15, 2016 at 4:41:33 AM UTC-5, desta wrote: > > I would like to make a change a the Login form. > Currently I see that

[web2py] Re: best advice on customer/client picklist popup.

2016-01-17 Thread 'DenesL' via web2py-users
How about using an autocomplete? http://web2py.com/books/default/chapter/29/07/forms-and-validators#Autocomplete-widget Denes On Sunday, January 17, 2016 at 9:54:32 AM UTC-5, lucas wrote: > > oh, i forgot to mention, that i know how to do an ajax query and pass post > variable to it using

[web2py] Re: how to import_from_csv or export_to_csv without primary key

2016-01-17 Thread 'DenesL' via web2py-users
Since the export_to_csv_file acts on a rows object you can select the fields to your liking. rows = db(qry).select(*list_of_fields_to_export) rows.export_to_csv_file(open(...)) Denes On Saturday, January 16, 2016 at 11:27:18 PM UTC-5, Alex Glaros wrote: > > is there a way to import_from_csv

[web2py] Re: AttributeError: 'Table' object has no attribute '_primarykey'

2016-01-13 Thread 'DenesL' via web2py-users
Which web2py version is that?. Not sure when objects.py was fixed but the fix is there in 2.12.03 for sure. Regards, Denes On Wednesday, January 13, 2016 at 8:49:34 AM UTC-5, Manuele wrote: > > Hi *, > I got this strange error. Where I have to look for the cuase? > The table object of my query

[web2py] Re: Changing navbar color

2016-01-03 Thread 'DenesL' via web2py-users
You could add the following to the end of web2py-bootstrap3.css .navbar { background-color: #963; background-image: none; } On Wednesday, December 16, 2015 at 8:10:22 PM UTC-5, Joe wrote: > > I am trying to change the background-color of the nav bar in the newest > web2py bootstrap 3

[web2py] Re: SQLFORM.smartgrid with two references to same perent table

2016-01-03 Thread 'DenesL' via web2py-users
I see no way of blocking it in the source code. You could hide it using JS, something like: $('.row_buttons > a:nth-child(3)').addClass('hidden') On Friday, December 25, 2015 at 11:37:54 PM UTC-5, Jose Eleudson Gurgel Queiroz wrote: > > > *With this tables:* > db.define_table('tbProduct', \

[web2py] Re: Selecting whole record with MIN query

2016-01-02 Thread 'DenesL' via web2py-users
You could do db(db.people.city == "London").select(orderby=db.people.age).first() > On Saturday, January 2, 2016 at 8:12:31 AM UTC-5, UG wrote: > > Hi, > > If i have the following table > ID > fist_name > last_name > city > age > > > I use the MIN to find the lowest age > > youngest =

[web2py] Re: Dynamically create table from user

2016-01-02 Thread 'DenesL' via web2py-users
Yes you can. Just think how web2py works to satisfy a user request, all models in the action's path are executed every time and everything is a python program. So if you have a form that requests field_name, field_type and other parameters as necessary you can write to a model file the

[web2py] Re: online exam application with web2py

2016-01-02 Thread 'DenesL' via web2py-users
1) See third example in http://web2py.com/books/default/chapter/29/05/the-views#INPUT 2) You could use an onchange on the question number field to call the create question action with the updated question number as a parameter. 3) Yes, see

[web2py] Re: Problem with Field UNIQUE when i'll edit

2016-01-02 Thread 'DenesL' via web2py-users
Your params dictionary should only contain what is being updated (except for id which can be there too). params = { 'name': 'pepe', 'id': 1 } # ok params = { 'name': 'pepe' } # ok params = { 'name': 'pepe', 'id': 1 , 'email': '...'} # error In your case use the first since you are selecting

[web2py] Re: st_dwithin

2015-12-05 Thread 'DenesL' via web2py-users
Not with the current sources but they can be modified. You can always use executesql to run a SQL command. The actual command depends on what you are doing. If you are running from source, modifying it is not that hard. In \gluon\packages\dal\pydal\objects.py replace (at line 1328 in

Re: [web2py] Re: DAL equivalent of Field1 * 2 as MyComputedField

2015-12-05 Thread 'DenesL' via web2py-users
You could but it is available in rows.colnames Note that you can define a virtual field db.MyDatabase.MyComputedField = Field.Virtual('MyComputedField', lambda r: r .MyDatabase.Value*2) and then access it via row.MyComputedField for any row in rows. Denes On Saturday, December 5, 2015 at

[web2py] Re: How to use fancytree?

2015-12-02 Thread 'DenesL' via web2py-users
Hi, assuming that the paths to the js & css files are correct you are missing the closing of $(function(){ in your script. Just duplicate the last line at the very end, i.e. add }); Denes On Tuesday, December 1, 2015 at 12:03:01 AM UTC-5, Henk huisman wrote: > > Fancytree looks to me as a nice

[web2py] Re: () appadmin

2015-11-06 Thread 'DenesL' via web2py-users
Without trying out the code I think the problem is the invalid format string. format = '%(partenza,partenza)s' In a format string each variable is formatted separately as in format = '%(partenza)s,%(partenza)s' Look up "String Formatting Operations" in the Python manual for full details. By

[web2py] Re: cannot disable automatic login after registration

2015-10-25 Thread 'DenesL' via web2py-users
t; done since new user is logged in automatically (he cannot log out if his > account is deleted). Now I think about a different strategy using > permissions and roles like "cannot login till geolocation data provided". > This seems like a lot of complexity to solv

[web2py] Re: Appconfig - what's the best way to handle missing values

2015-10-24 Thread 'DenesL' via web2py-users
from gluon.contrib.appconfig import AppConfig myconfig = AppConfig('/private/appconfig.ini', reload=False) does not cause an exception even when loading the default ini below, which has an empty value (last one): ; App configuration ; db configuration [db] uri = sqlite://storage.sqlite

[web2py] Re: How to check if my user's profile is complete in web2py?

2015-10-24 Thread 'DenesL' via web2py-users
Try http://www.web2py.com/books/default/chapter/29/07/forms-and-validators#onvalidation the example is pretty clear. On Saturday, October 24, 2015 at 8:28:15 PM UTC-4, Upendra Kumar wrote: > > I have made a 'user_details' table whose 'user_id' field I have referenced > to default

[web2py] Re: Newby question about referencing fields in a lookup table

2015-10-24 Thread 'DenesL' via web2py-users
The second argument of IS_IN_DB should be the key to the reference. And the third should be a format string to represent that key. So your models should look something like db.define_table('t_itemtypes', Field('f_itemtypedesc_string', 'string'), ) db.define_table('t_items',

[web2py] Re: Is it intended that TABLE(rows) makes a table within a table?

2015-10-24 Thread 'DenesL' via web2py-users
You can do SQLTABLE(rows, _class="fred") On Saturday, October 24, 2015 at 5:29:17 PM UTC-4, Edward Shave wrote: > > Thanks Anthony, > > The reason I was trying TABLE was because I wanted to include a class in > the table tag and was thinking this might work... > > TABLE(rows, _class="fred") >

[web2py] Re: cannot disable automatic login after registration

2015-10-24 Thread 'DenesL' via web2py-users
You also need settings.registration_requires_verification = True On Saturday, October 24, 2015 at 8:30:52 PM UTC-4, Pierre wrote: > > Hi everyone, > > I tried to do it with no success with this: > > auth.settings.login_after_registration = False > > thanks for your help > > -- Resources: -

[web2py] Re: How to provide feedback on button in LINKS section of sqlform.grid ?

2015-10-15 Thread 'DenesL' via web2py-users
Change that to el.text = "Working..."; On Sunday, October 11, 2015 at 4:20:58 AM UTC-4, Gary Cowell wrote: > > Hello. > > I'm trying to give the user some feedback when they click on a links (link > button) in the links section of a sqlform grid. > > I have this button code: > >

[web2py] Re: class being inserted behind my back..!

2015-10-11 Thread 'DenesL' via web2py-users
The btn-default class is added by web2py-bootstrap3.js via $('button', target).addClass('btn btn-default'); The "horrible" part comes from this bit in bootstrap-theme.min.css text-shadow: 0px 1px 0px white; Denes On Sunday, October 11, 2015 at 4:58:01 AM UTC-4, Edward Shave wrote: > > Nope,

[web2py] Re: auth.requires_login redirect and session expiration

2015-10-10 Thread 'DenesL' via web2py-users
s ajax? > > On Friday, 9 October 2015 12:22:52 UTC-5, DenesL wrote: >> >> Changing >> if current.request.ajax: >> raise HTTP(401, self.messages.ajax_failed_authentication) >> >> to >> if current.request.ajax and current.request.cid: >>

[web2py] Re: auth.requires_login redirect and session expiration

2015-10-09 Thread 'DenesL' via web2py-users
to solve the problem since it verifies it is a component before raising a 401, else it follows the "otherwise" or auth.settings.on_failed_authorization redirect (which I am using). Denes. On Tuesday, October 6, 2015 at 1:50:04 PM UTC-4, DenesL wrote: > > Hi > > an expired

[web2py] Re: auth.requires_login redirect and session expiration

2015-10-07 Thread 'DenesL' via web2py-users
Thanks for your reply but those setting do not fix the issue, maybe because it is not a web2py component. On Wednesday, October 7, 2015 at 12:42:08 PM UTC-4, Leonel Câmara wrote: > > This should fix it: > auth.settings.client_side=True > > You may want to set login_next too. > -- Resources:

[web2py] Re: auth.requires_login redirect and session expiration

2015-10-07 Thread 'DenesL' via web2py-users
Original post edited with new info. -- 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: auth.requires_login redirect and session expiration

2015-10-07 Thread 'DenesL' via web2py-users
Links on the client trigger XHR calls already. I had those settings in a model so I am pretty sure they were set before any controller code. On Wednesday, October 7, 2015 at 1:41:57 PM UTC-4, Leonel Câmara wrote: > > That's weird it should fix it anyway because all that setting does is make >

[web2py] Re: login_bare custom validation

2015-10-07 Thread 'DenesL' via web2py-users
Thanks Massimo I never really went away ;-) On Wednesday, October 7, 2015 at 2:06:16 PM UTC-4, Massimo Di Pierro wrote: > > welcome back Denes. :-) > your fix is in trunk. > > > On Monday, 5 October 2015 15:33:48 UTC-5, DenesL wrote: >> >> This seems to work: >

[web2py] auth.requires_login redirect and session expiration

2015-10-06 Thread 'DenesL' via web2py-users
Hi an expired session becomes empty but this does not seem to always trigger auth.requires_login redirection to the login URL neither when set via auth.requires_login(loginURL), aka the otherwise parameter, nor by auth.settings.on_failed_authorization = loginURL . Actually the otherwise

[web2py] Re: orderby with groupby in select

2015-10-06 Thread 'DenesL' via web2py-users
m1 = db.messages m2 = db.messages.with_alias('m2') messages = db(m2.timesent==None).select(m1.ALL, left=m2.on((m1.fromid==m2. fromid)&(m1.toid==m1.toid)&(m1.timesent

[web2py] Re: login_bare custom validation

2015-10-05 Thread 'DenesL' via web2py-users
Tracing the execution it shows that the password is converted to a LazyCrypt object and then validated using the field's requires which uses Crypt.__call__ where this line value = value and value[:self.max_length] triggers a __getitem__ exception, since it is not defined in class LazyCrypt.

[web2py] Re: login_bare custom validation

2015-10-05 Thread 'DenesL' via web2py-users
This seems to work: def __call__(self, value): v = str(value) v = v and v[:self.max_length] if len(v) < self.min_length: return ('', translate(self.error_message)) if isinstance(value, LazyCrypt): return (value, None) return

[web2py] Re: login_bare custom validation

2015-10-05 Thread 'DenesL' via web2py-users
The error is gone but the login does not work. This needs more thought. On Monday, October 5, 2015 at 2:51:22 PM UTC-4, DenesL wrote: > > Tracing the execution it shows that the password is converted to a > LazyCrypt object and then validated using the field's requires which uses

[web2py] Re: orderby with groupby in select

2015-10-05 Thread 'DenesL' via web2py-users
You probably want the sorting and no grouping: messages = db(db.messages.toid == auth.user.id).select(db.messages.ALL, orderby=db.messages.fromid|~db.messages.timesent) Denes On Monday, October 5, 2015 at 2:35:16 PM UTC-4, Daniel wrote: > > Hi all, > > I am trying to order messages so that the

[web2py] Re: login_bare custom validation

2015-10-05 Thread 'DenesL' via web2py-users
Hi again alternatively, could anyone post some working code sample of using validation with login_bare? the examples from the book and some posts in the forum were not enough for me. Thanks, Denes On Saturday, October 3, 2015 at 7:58:52 PM UTC-4, DenesL wrote: > > Hello all, > >

[web2py] Re: SQLFORM.grid + count

2015-10-05 Thread 'DenesL' via web2py-users
Not sure if you can do it with just one query. How about getting the count first and using it in the grid: sm = db.invocados.modulo_servico modulo_counts = db().select(sm, sm.count(), groupby=sm) Denes. On Thursday, October 1, 2015 at 9:41:59 PM UTC-4, Bruno Oliveira wrote: > > > I'm trying to

Re: [web2py] keyError

2015-10-05 Thread 'DenesL' via web2py-users
You have to think in terms of the python objects. geoNames API gives you a dictionary with one key: postalcodes The value of the postalcodes entry in the dictionary is a list of dictionaries, each with the info of one postal code. If the list is empty the previous code for x in

[web2py] Re: ST_X function on POSTGIS geography() fields

2015-10-04 Thread 'DenesL' via web2py-users
How do you propose to code those functions if they are not available in the DB engine?. MS SQL Server does have functions to extract longitude and latitude data from geography points but PostGIS does not seem to have them. I can send in a patch for MSSQL with the following extended methods: Lat

Re: [web2py] keyError

2015-10-03 Thread 'DenesL' via web2py-users
The location_data received from geoNames can contain more than one country code, your first sample has 3: MK DE US. Your second sample has only one: MX By the name of the variable being used (your_country) I assume you want to get only one postalcode. In any case you could use:

[web2py] login_bare custom validation

2015-10-03 Thread 'DenesL' via web2py-users
Hello all, Trying to do a custom validation using login_bare, which I have never needed before, but I get a ticket shown below, it includes the minimalist code to reproduce it. The view just shows the form. Using authentication by username: auth.define_tables(username=True, signature=False)

Re: [web2py] keyError

2015-10-03 Thread 'DenesL' via web2py-users
[x['countryCode'] for x in location_data['postalcodes']] will give you an array of the country codes in location_data, but note that you could have duplicated entries. If you don't want duplicates you could do: cc=[] for x in location_data['postalcodes']: c=x['countryCode'] if c not in cc:

[web2py] Re: IS_IN_DB validation error

2015-10-02 Thread 'DenesL' via web2py-users
Oops, thanks Anthony. It should be: IS_IN_DB(db(geo_item.f_collection_id == geo_collection.id ),...) Hope it helps. Denes On Friday, October 2, 2015 at 9:25:15 AM UTC-4, Anthony wrote: > >

[web2py] Re: ST_X function on POSTGIS geography() fields

2015-10-01 Thread 'DenesL' via web2py-users
Has anyone tried using the functions?. They are defined in web2py 2.12.03 pydal/adapters/postgres.py as ST_X and ST_Y. On Wednesday, September 30, 2015 at 4:56:56 PM UTC-4, wish7...@gmail.com wrote: > > Done: https://github.com/web2py/pydal/issues/298 > > Cheers > Toby > > Am Dienstag, 29.

[web2py] Re: IS_IN_DB validation error

2015-10-01 Thread 'DenesL' via web2py-users
The second parameter of IS_IN_DB should be a set not a query: query: (geo_item.f_collection_id == geo_collection.id) set: db(geo_item.f_collection_id == geo_collection.id)

[web2py] Re: LOAD and export to CSV

2015-09-30 Thread 'DenesL' via web2py-users
y, September 28, 2015 at 11:04:57 PM UTC-5, DenesL wrote: >> >> >> Yes, the content is properly set but it is returned as the component >> content instead of a separate file, which is what should happen IMHO. >> What I need is some way to "cancel" the

[web2py] Re: LOAD and export to CSV

2015-09-28 Thread 'DenesL' via web2py-users
Yes, the content is properly set but it is returned as the component content instead of a separate file, which is what should happen IMHO. What I need is some way to "cancel" the LOAD so the file is returned instead and the component is not updated, because otherwise it would become empty. So

[web2py] LOAD and export to CSV

2015-09-27 Thread 'DenesL' via web2py-users
Hello all, recently I came across this little problem and I have not been able to find a solution to it. I have an export button that gets enabled under certain conditions inside a LOAD ajax=True component. When one clicks on the button, form values are posted to build the CSV, but then I can

  1   2   3   4   5   6   7   8   9   10   >