[web2py] web2py and sparkpost : :Mail.send failure:SMTP AUTH extension not supported by server

2016-07-24 Thread icodk
I try to use sparkpost with web2py. However I get the following error: WARNING:web2py:Mail.send failure:SMTP AUTH extension not supported by server. More info: 1. I can successfully send mails with python so my API key and domain settings in sparkpost are set right. 2. In web2py I use the followi

[web2py] Re: web2py and sparkpost : :Mail.send failure:SMTP AUTH extension not supported by server

2016-07-25 Thread icodk
t;> My settings are: >> [smtp] >> server = smtp.sparkpostmail.com:587 >> sender = x...@.eu >> login = SMTP_Injection:4d..92 >> >> >> >> >> Dne neděle 24. července 2016 16:52:17 UTC+2 icodk napsal(a): >>> >>> I try to use spa

[web2py] SQLFORM.grid input fields size in auto generated Edit/New forms

2016-07-25 Thread icodk
How can I change the input field size (what is visible to the user) of SQLFORM.grid auto generated Edit/New forms. Tried with length=50 but the fields are still about 20 chars long. Also: IS_LENGTH(minsize=5,maxsize=50) had no visible effect. None of the settings limits the number of chars user

[web2py] Re: list of time zones

2016-07-25 Thread icodk
Thanks for the tips On Monday, July 25, 2016 at 7:50:25 PM UTC+2, mai...@gmail.com wrote: > > How can I present to user a list of available timezons for him to choose > from, in a web2py application. > nothing to do with user's own time zone or server's time zone. > Basically I could create a ta

[web2py] Re: SQLFORM.grid input fields size in auto generated Edit/New forms

2016-07-26 Thread icodk
The form is automatically generated by the SQLFORM.grid which I have no idea how to get to. In general it could be nice to know how to manipulate the Edit/New forms generated by the grid and smartgrid. Could not find any docs about it yet. On Monday, July 25, 2016 at 11:00:49 PM UTC+2, icodk

[web2py] Re: list of time zones

2016-07-26 Thread icodk
Thanks Niphold. This plugin is one of the best I know. It solves timezone problem between user browser and server. In my case it is not needed because the browser's timezone is not relevant. Let's say I have a temp sensor in Japan that reports temp to a database in the US. The user should co

[web2py] display git version of my own web2py project

2016-07-29 Thread icodk
Might be useful for others I like to be able to see which version/tag my production web2py application has. Here is how I do it(better ideas are welcome): In db.py if not session.gitver: import os os.chdir("/path/to/myapp") os.system('git describe --abbrev=7 --dirty --always --tag

[web2py] unsupported operand type(s) for %: 'bool' and 'Storage'

2016-07-30 Thread icodk
Enabeling user group creation by changing auth.settings.create_user_groups = False To auth.settings.create_user_groups = True produce the following error: unsupported operand type(s) for %: 'bool' and 'Storage' on submitting registration form with email and password. No error if set back to

[web2py] Re: unsupported operand type(s) for %: 'bool' and 'Storage'

2016-07-30 Thread icodk
Solved ! Should read the manual auth.settings.create_user_groups = "user_%(id)s" On Saturday, July 30, 2016 at 1:50:40 PM UTC+2, icodk wrote: > > Enabeling user group creation by changing > auth.settings.create_user_groups = False > To > auth.settings.create_user_gr

Re: [web2py] display git version of my own web2py project

2016-08-04 Thread icodk
t; >> with no expiritation time >> >> On Fri, Jul 29, 2016 at 3:54 PM, Richard Vézina >> wrote: >> >>> You could also use web2py cache... >>> >>> :) >>> >>> Richard >>> >>> On Fri, Jul 29, 2016 at 12:3

[web2py] SSL Rocket Windows 10 problem

2016-08-04 Thread icodk
Running web2py 2.14.6 with SSL and it starts fine. However stop working after a while (sometimes just after login) with error: ERROR:Rocket.Errors.Port443:Traceback (most recent call last): File "C:\Dev\web\web2py_win\Web2py_2_14_6\gluon\rocket.py", line 590, in listen sock = self.wrap_so

[web2py] Re: SSL Rocket Windows 10 problem

2016-08-06 Thread icodk
4_6\cert/ia.crt -k C:\Dev\web\web2py_win\Web2py_2_14_6\cert/ia.key -p 443 On Saturday, August 6, 2016 at 9:13:59 AM UTC+2, Massimo Di Pierro wrote: > > Can you try specify full path for cert/ ? > > On Thursday, 4 August 2016 04:08:49 UTC-5, icodk wrote: >> >> Running we

[web2py] multiple controllers

2016-08-08 Thread icodk
Trying to embrace the multi controller approach, I put the function* myfunc()* in a new controller: *myctl.py* However, entering in a browser: *http://mydomain/myapp/myctl/myfunc* results *invalid function (default/myfunc)* Also adding a menu item: response.menu += [(T('Test menu'), False, URL('m

Re: [web2py] multiple controllers

2016-08-08 Thread icodk
's not becoming crazy... > > :) > > Richard > > On Mon, Aug 8, 2016 at 8:27 AM, icodk > > wrote: > >> Trying to embrace the multi controller approach, I put the function* >> myfunc()* in a new controller: *myctl.py* >> However, entering in a browse

Re: [web2py] display git version of my own web2py project

2016-08-08 Thread icodk
n Monday, August 8, 2016 at 10:43:52 PM UTC+2, Niphlod wrote: > > np. and BTW, never ever ever use chdir, NOR os.system (nor everything > starting a different process) in an app served via web. EVER. > > On Thursday, August 4, 2016 at 9:04:48 AM UTC+2, icodk wrote: >> >

Re: [web2py] multiple controllers

2016-08-09 Thread icodk
+1 On Tuesday, August 9, 2016 at 10:05:02 AM UTC+2, Massimo Di Pierro wrote: > > Actually this is literally "Rocket" science. :-) > > On Monday, 8 August 2016 10:09:03 UTC-5, icodk wrote: >> >> Thanks Richard >> I fixed it by restarting the Rocket server.

[web2py] Why passwords are stored in clear text ?

2016-08-18 Thread icodk
I develop a web2py application on Windows. I deployed it on an Ubuntu machine but now user passwords spears in the auth_user in clear text and nobody can login,probably because the login controller try to compare the hash with the clear text in the db. What is happening ? Of course I would like

[web2py] Re: Why passwords are stored in clear text ?

2016-08-18 Thread icodk
stration form stores clear text in the database. On Thursday, August 18, 2016 at 9:45:12 PM UTC+2, Massimo Di Pierro wrote: > > Do you have a custom auth_user table without the password CRYPT validator? > > On Thursday, 18 August 2016 10:38:25 UTC-5, icodk wrote: >> >> I develo

[web2py] Re: Why passwords are stored in clear text ?

2016-09-06 Thread icodk
y replace the CRYPT() default validator when running on linux. It should be: db.auth_user.password.requires = [IS_STRONG(min=8, special=1, upper=1), CRYPT()] Thanks for not solving it for me (will give this css another chance) On Thursday, August 18, 2016 at 5:38:25 PM UTC+2, icodk wr

[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 (D

[web2py] Re: booking/event calendar

2016-09-18 Thread icodk
Thank you both Looks great On Saturday, September 17, 2016 at 12:30:54 AM UTC+2, icodk wrote: > > 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 the

[web2py] Translation best practice

2016-09-18 Thread icodk
I have a web2py application, where all text is in/are: T("text in English") Now I need to translat it to another language, even found a person willing to do it. What will be the best way to give him language file so he can translate it without giving him access to the administration of the s

[web2py] Re: Translation best practice

2016-09-19 Thread icodk
d) to move some parts of the Admin to the app and give the translator special rights and a menu item that will be visible only to him. I could then copy the translated language file to the right place. Anybody tried it before? On Monday, September 19, 2016 at 12:43:09 AM UTC+2, icodk wrote: > &g

[web2py] Re: vue.js

2016-10-12 Thread icodk
I tried the scaffolding example. it is missing the appconfig.ini (used my own) and nothing (visibly) happen when entering good as the place holder suggests. Is it working as expected? On Sunday, September 25, 2016 at 5:25:51 AM UTC+2, Massimo Di Pierro wrote: > > I am becoming a huge fan of vue

[web2py] Cannot import module 'applications.welcome.modules.pytz'

2016-10-18 Thread icodk
Get the following error when running web2py with nginx S" Cannot import module 'applications.welcome.modules.pytz'" The error is related to the following line in db.py import pytz Exactly the same installation works fine with Rocket. Also starting interactive console works fine: $ sudo python we

[web2py] Re: Cannot import module 'applications.welcome.modules.pytz'

2016-10-18 Thread icodk
ng to help On Tuesday, October 18, 2016 at 8:20:23 PM UTC+2, icodk wrote: > > Get the following error when running web2py with nginx > S" Cannot import module > 'applications.welcome.modules.pytz'" > The error is related to the following line in db.py > im

[web2py] Re: Cannot import module 'applications.welcome.modules.pytz'

2016-10-18 Thread icodk
It works fine with Rocket. Do you (or anybody) have any idea why not with nginx ? On Tuesday, October 18, 2016 at 8:20:23 PM UTC+2, icodk wrote: > > Get the following error when running web2py with nginx > S" Cannot import module > 'applications.welcome.modules.pytz'

[web2py] Re: Cannot import module 'applications.welcome.modules.pytz'

2016-10-19 Thread icodk
You might be right, How can I change it ? However running the following commands tells me that python 2.7 is the default: $ python --version Python 2.7.12 $python Python 2.7.12 (default, Jul 1 2016, 15:12:24) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license"

[web2py] Re: Cannot import module 'applications.welcome.modules.pytz'

2016-10-19 Thread icodk
r way to do it ? On Wednesday, October 19, 2016 at 3:51:40 PM UTC+2, icodk wrote: > > You might be right, How can I change it ? > > However running the following commands tells me that python 2.7 is the > default: > > $ python --version > Python 2.7.12 > > $p

[web2py] matching a Week day in query

2016-11-02 Thread icodk
I have a table with a Boolean field for each week day. How can I select all records of which a certain week day is true ? Ex. on Manday I want to select all record where the Monday field is true. db.define_table('time_rule', Field('start_time','time'), Field('end_

Re: [web2py] matching a Week day in query

2016-11-02 Thread icodk
Thanks Manuele Looks like it work On Wednesday, November 2, 2016 at 9:47:20 AM UTC+1, Manuele wrote: > > Il 02/11/16 09:27, icodk ha scritto: > > Ex. on Manday I want to select all record where the Monday field is true. > > maybe something like that? > > from da

[web2py] selection list with items not yet selected

2016-12-14 Thread icodk
I have an item ,category and item_category tables facilitating many to many relations between items and categories, which enables an item to belongs to several categories. I use SQLSmartgrid to show the item_category table and to add categories to specific item. This all works well. I can e

[web2py] Re: selection list with items not yet selected

2016-12-15 Thread icodk
cts > values to records that are in the Set, so the validator will only allow > (and display in the form) categories not already assigned to the item. > > Anthony > > On Wednesday, December 14, 2016 at 5:31:11 PM UTC-5, icodk wrote: >> >> I have an item ,category an

[web2py] Re: selection list with items not yet selected

2016-12-15 Thread icodk
cts > values to records that are in the Set, so the validator will only allow > (and display in the form) categories not already assigned to the item. > > Anthony > > On Wednesday, December 14, 2016 at 5:31:11 PM UTC-5, icodk wrote: >> >> I have an item ,category an

[web2py] Re: selection list with items not yet selected

2016-12-16 Thread icodk
;) grid = SQLFORM.smartgrid(db.item) return dict(grid=grid) On Thursday, December 15, 2016 at 8:18:18 PM UTC+1, icodk wrote: > > Found explanation in : > > http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=._select%28%29 > > On Thursday,

[web2py] Re: selection list with items not yet selected

2016-12-16 Thread icodk
Not sure understanding you suggestion In which case ? available_categories is an unresolved query until too late Could you please elaborate ? Thanks On Friday, December 16, 2016 at 8:35:56 PM UTC+1, Anthony wrote: > > On Friday, December 16, 2016 at 7:32:21 AM UTC-5, icodk wrote: >>

[web2py] IS_IN_DB show fields from related tables (how to )

2016-12-21 Thread icodk
I have 4 tables with relations (see below ) and I want to show a dropdown list that shows a string with one field from each table by using something like: db.customer.price.requires=IS_IN_DB(?) I tried : query=((db.price.product== db.product.id)&(db.price.cust_type== db.cust_type.id)) db.cu

[web2py] sending extra args to SQL.smartgrid

2016-12-25 Thread icodk
I am using SQL.smartgrid to show a table and edit individual records by pressing the edit button on each row. works great. Records have many fields( about 25) not all relevant to the daily editing, so I want to show 'Edit advance' link/button in addition to the standard 'Edit' button shown

[web2py] How to show a writable=False field as a disabled input

2017-01-04 Thread icodk
In SQLFORM.factory, when a field is writable=False, the field is only shown with it's default value as an html div. Is it possible to represent it as a disabled INPUT (it both looks better and is accessible for java script ) ? I tried: Field('tag_id',writable=True,represent=INPUT(_disable=True,

[web2py] Re: How to show a writable=False field as a disabled input

2017-01-04 Thread icodk
e and > outputs some transformation of it. > > Anthony > > On Wednesday, January 4, 2017 at 10:44:59 AM UTC-5, icodk wrote: >> >> In SQLFORM.factory, when a field is writable=False, the field is only >> shown with it's default value as an html div. >> Is it

[web2py] Re: How to show a writable=False field as a disabled input

2017-01-04 Thread icodk
.. other then setting it to writable=True so it get's an id and name and then manipulate it with javascript on $(document).ready(function(... On Wednesday, January 4, 2017 at 5:19:02 PM UTC+1, icodk wrote: > > Thanks. You are right . Still, is it possible to show a disabled input

[web2py] Re: How to show a writable=False field as a disabled input

2017-01-04 Thread icodk
It works Thanks again for helping me On Wednesday, January 4, 2017 at 5:33:32 PM UTC+1, Anthony wrote: > > Field('tag_id', widget=lambda f, v: SQLFORM.widgets.string.widget(f, v, > _disabled=True)) > > Anthony > > On Wednesday, January 4, 2017 at 11:22:35 AM UTC

[web2py] Formatting decimal in SQLFORM.smartgrid edit form

2017-01-04 Thread icodk
I have the following field definition: Field('unit_price', 'decimal(8,4)', label=T('Price'),represent=lambda val,row: '{:8.2f}'.format(val),requires=IS_DECIMAL_IN_RANGE(0, 1, dot=","),default=0, writable=True,readable=True), This field shows as it should (with only 2 decimals) in the grid

[web2py] Grid search disregards time zone

2017-01-12 Thread icodk
My server is in UTC, my client is in Europe (time zones) .When client searches on a date time field the datetime string is sent in local time. The grid is showing datetime in local time as it should,using the great timezone plugin (didn't work also before Breksit:-) -- Resources: - http://web2

[web2py] Re: Advice on structuring my app

2017-01-17 Thread icodk
Can a user be a member of several organizations ? Who is managing organizations? How somebody get to be a member of an organization ? With very little information available I would have an organization table and each newly registered user will get his own organization and will be his organizatio

[web2py] Cannot resolve reference error if reading (select()) a table in menue.py...

2017-01-18 Thread icodk
In general I can have a reference in table *child* to table *parent *disregarding the definition order. However, If I read from table *child* (that reference table *parent*) in menu.py, I get a Cannot resolve reference error Any idea how to solve it ? -- Resources: - http://web2py.com - h

[web2py] Re: Cannot resolve reference error if reading (select()) a table in menue.py...

2017-01-19 Thread icodk
Yes you are right. I renamed the second file so it will be pared before menu.py so now it works Thanks On Thursday, January 19, 2017 at 7:51:25 PM UTC+1, Anthony wrote: > > On Thursday, January 19, 2017 at 9:42:29 AM UTC-5, icodk wrote: >> >> Anthony >> Attached a comp

[web2py] global name 'T' is not defined

2017-01-25 Thread icodk
I have a controller that imports a module In the controller I can use T('some text'). However trying to use it in a function in an imported module gives: global name 'T' is not defined exception The controller function is called from an ajax request I also tried to from gluon import T and go

Re: [web2py] global name 'T' is not defined

2017-01-25 Thread icodk
Thank you both it works On Wednesday, January 25, 2017 at 5:04:42 PM UTC+1, Anthony wrote: > > On Wednesday, January 25, 2017 at 4:40:40 AM UTC-5, mweissen wrote: >> >> Try in the module: >> >> from gluon import current >> T = current.T >> > > Don't do T=current.T at the top level of the module (o

[web2py] No module named __builtin__

2016-04-03 Thread icodk
I get No module named __builtin__ when I copy application perfectly running on Windows from web2py 2.12.3 to 2.14.3. Did the same with another application without a problem. Any idea ? Version web2py™ Version 2.14.3-stable+timestamp.2016.03.26.23.02.02 Python Python 2.7.9: C:\Dev\web\web2py_wi

[web2py] Re: No module named __builtin__

2016-04-03 Thread icodk
As far as I can see there are exactly the same number of __init__.py files in source and destination. I did a simple copy with file explorer in Windows 10. Thanks for trying to help On Monday, April 4, 2016 at 12:14:28 AM UTC+2, icodk wrote: > > I get > No module named __builtin__ &

[web2py] using the auth. infrastructure to manage another user list

2018-02-14 Thread icodk
I have a "standard" web2py application that uses the built in authentication system with sign in, login/out , forgot/change password etc. In addition, I need to manage "departmental" users that should not have access to the main application but only to a subset of services. Is there a way to le

[web2py] Re: using the auth. infrastructure to manage another user list

2018-02-14 Thread icodk
That was fast response😊 Thanks. Not sure it is an issue but for the departmental user registration, i want to use different messages, and handling. For example, departmental user should be approved automatically, while main users manually. -- Resources: - http://web2py.com - http://web2py.com/b

Re: [web2py] Re: using the auth. infrastructure to manage another user list

2018-02-15 Thread icodk
here they can request admin access? > > Then you can add them to an admin group that would give access to all > features. > > Would that help? > > Jim > > > On Feb 14, 2018 4:38 PM, "icodk" > wrote: > >> That was fast response😊 >> Thanks. &g

[web2py] Re: 'FieldVirtual' object has no attribute 'listable'

2018-03-12 Thread icodk
Try to make the virtual field writable=False On Monday, March 12, 2018 at 9:04:07 PM UTC+1, Andrea Fae' wrote: > > I don't know because I'm sure mounths ago it was working... > > > form = SQLFORM.grid(query, args=[studente], fields=[db.evento.titolo, > db.evento.ricorrenza, db.evento.giorno_

[web2py] How to update script deployment with the latest master commit ?

2018-04-05 Thread icodk
Script deployment ( ex. setup-web2py-nginx-uwsgi-ubuntu.sh) installs the latest release. how to update it to the latest master commit ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/

[web2py] Re: How to update script deployment with the latest master commit ?

2018-04-05 Thread icodk
Yes this will probably work. Thanks What I did was to delete web2py after script installation and clone it fro master. Because only after the installation I discovered that there are some errors in the release that are fixed in the master. ( the error I found is in definition of fieldVirtual) On

[web2py] Re: Problem with a virtual field, SQLFORM.grid and the fields parameter

2018-04-16 Thread icodk
I had a similar issue and using the latest master branch fixed it for me (after the release of 2.16.1) On Saturday, April 14, 2018 at 10:52:10 PM UTC+2, mweissen wrote: > > I have a model with a virtual field: > > db.define_table("tt", > Field("f"), > Field("gg"), > Field.Virtual("ff"

[web2py] empty field saved as NULL or ' '

2018-07-18 Thread icodk
I have the flowing two field definitions: Field('code_1', default='', label=T("Code 1"), requires=[IS_EMPTY_OR(IS_NOT_IN_DB(db, 'product.code_1',error_message=T('Code 1 already in use'),ignore_common_filters=False)),IS_LENGTH(maxsize=15)]), Field('code_2', default='',label=T("Code 2")), However

[web2py] Re: empty field saved as NULL or ' '

2018-07-18 Thread icodk
Thanks Where did you get it from ? On Wednesday, July 18, 2018 at 2:57:41 PM UTC+2, icodk wrote: > > I have the flowing two field definitions: > Field('code_1', default='', label=T("Code 1"), > requires=[IS_EMPTY_OR(IS_NOT_IN_DB(db, > 'product

Re: [web2py] ToolTip feature in HTML Table

2018-07-27 Thread icodk
Hi Gaurav Shet Here is a rather complex example for a tooltip on a field in a grid that shows a warning if an email is missing and explanation as in the attached i

[web2py] maker.js and web2py

2018-08-03 Thread icodk
Anybody with experience integrating Maker.js with web2py ? https://maker.js.org/playground/?script=dogbone-polygon I am looking for a simple example how to emit svg to specific element All the examples on the official site emit it by calling document.write(svg) Thanks -- Resources: - http://web

[web2py] admin disabled because unable to access password file

2018-08-17 Thread icodk
upgraded to Version 2.17.1-stable+timestamp.2018.08.05.17.57.00 from the trunk I copied the old password file (parameters_443_.py ) but get admin disabled because unable to access password file when trying to activate the admin interface Any idea how to solve it ? -- Resources: - http://web2py.

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

2018-08-18 Thread icodk
I get the following error when try running from source (git clone 2.17.1 ) on windows. RuntimeError: No driver of supported ones ('psycopg2',) is available The welcome application runs fine. works fine also (connecting to pg) on 2.14.6 source used commandline: C:\Python27\python.exe C:\Dev\web\

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

2018-08-18 Thread icodk
Problem solved ! Thanks Stifaan On Saturday, August 18, 2018 at 12:49:48 PM UTC+2, 黄祥 wrote: > > pls install psycopg2 first, whether you use virtualenv or not to run > web2py, then restart your web2py server > *e.g. in command prompt* > pip install psycopg2 > > best regards, > stifan > -- Resou

[web2py] session data type changed after upgrade to 2.17.1

2018-08-21 Thread icodk
Have: session.end_date=request.now.date() and then retrieve it as: datetimeEnd=datetime.datetime.combine(session.end_date, datetime.time.max) this all worked fine in 2.14.6 but after upgrade to 2.17.1 I get: datetimeEnd=datetime.datetime.combine(session.end_date, datetime.time.max) TypeErr

[web2py] Re: session data type changed after upgrade to 2.17.1

2018-08-21 Thread icodk
x27;date' if form.process().accepted: session.start_date=*form.vars.start_date *# here the form.vars.start_date is of type str session.end_date = *form.vars.end_date *# here the form.vars.end_date is of type str session.online_order=form.vars.online_order session.manua

[web2py] Re: session data type changed after upgrade to 2.17.1

2018-08-22 Thread icodk
Yes Antony, You got it right The issue is that both form.vars.start_date and form.vars.end_date returns a str type. Exactly the same code under 2.14.6 returns a 'date' type On Thursday, August 23, 2018 at 6:02:49 AM UTC+2, Anthony wrote: > > On Wednesday, August 22, 2018 at 6:41:06 PM UTC-4, J

[web2py] Setting writable and readable=True on all fields

2018-09-27 Thread icodk
At a certain point, I need to allow read and write on all fields of a specific table How can I iterate through all fields in a table and set the writable, readable =true This does not work: for f in my_table.fields(): f.writable=f.readable=True -- Resources: - http://web2py.com - http://

[web2py] Can I do INSERT INTO statement with DAL syntax ?

2018-10-12 Thread icodk
something like : INSERT INTO Customers (CustomerName, City, Country) SELECT SupplierName, City, Country FROM Suppliers WHERE Country=1; -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/i

Re: [web2py] Can I do INSERT INTO statement with DAL syntax ?

2018-10-16 Thread icodk
sex, 12 de out de 2018 às 12:44, icodk > > escreveu: > >> something like : >> >> INSERT INTO Customers (CustomerName, City, Country) >> SELECT SupplierName, City, Country FROM Suppliers >> WHERE Country=1; >> >> >> -- >> Resources: >

[web2py] Web server with support for chunked transfer encoding

2018-11-08 Thread icodk
Tried with Rocket No error but request.args and request.vars are empty The client sends: POST /controller/statdata HTTP/1.1 Host: myserver.com:8082 Content-Type:application/json Transfer-Encoding: chunked and then sends the chunked data Rokets log shows: 192.168.1.3, 2018-11-08 16:46:57, POST,

[web2py] Re: Web server with support for chunked transfer encoding

2018-11-09 Thread icodk
ing source with pg8000 installed. The reason I use chunked tranfer is because my device is small so I can't buffer all the data to see how long it is, and POST it with Content lenght header. Of cours I could use enginx. Rocket is nice for development. On Thursday, November 8, 2018 at 5:18:41 PM UT

[web2py] Re: Web server with support for chunked transfer encoding

2018-11-18 Thread icodk
Hi I Trier data = request.body.read() But it returned nothing You can easily test it with curl and Chunked transfer encoding header If it works for you let me know Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] common filter error on many to many table

2018-11-28 Thread icodk
Getting the following error when setting a common filter on a table: *Query Not Supported: current transaction is aborted, commands ignored > until end of transaction block* Looking in the database log i can see an error on a missing table name in a query: *ERROR: missing FROM-clause entry

[web2py] Re: common filter error on many to many table

2018-11-28 Thread icodk
On Wednesday, November 28, 2018 at 5:54:31 PM UTC+1, icodk wrote: > > Getting the following error when setting a common filter on a table: > > *Query Not Supported: current transaction is aborted, commands ignored >> until end of transaction block* > > > Looking in the databa

[web2py] Re: common filter error on many to many table

2018-11-28 Thread icodk
the common filter: db.person._common_filter = filter_person On Wednesday, November 28, 2018 at 5:54:31 PM UTC+1, icodk wrote: > > Getting the following error when setting a common filter on a table: > > *Query Not Supported: current transaction is aborted, commands ignored >> un

[web2py] Is there a way to stop updating language file?

2018-12-09 Thread icodk
I have a test installation to which I first git pull the latest changes and then I test it as a user. When testing the application the language file is changed automatically as it should. However I am not interested in these changes and forced to discard the changes just before the next git pu

[web2py] Re: Is there a way to stop updating language file?

2018-12-11 Thread icodk
Thanks On Tuesday, December 11, 2018 at 12:17:22 PM UTC+1, Leonel Câmara wrote: > > Just put: > > T.is_writable = False > > In your models, if you want to go even further, get the T writable > attribute using appconfig. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation

[web2py] DAL's fake_migrat and fake_migrate_all and migration problem with auth tables

2019-01-04 Thread icodk
First both fake_migrate and fake_migrate_all are part of the DAL signature in the book, However fake_migrate is only explained when it is used in a table definition, not in DAL. Second issue that might be related: I try to move web2py application to another server, including a pg database in

[web2py] Re: DAL's fake_migrat and fake_migrate_all and migration problem with auth tables

2019-01-06 Thread icodk
Thanks to all of you How do I add migrate to the auth tables ? I use auth.settings.extra_fields for extra fields but entering migrate='db1_auth_user.table' does not fits in this structure I also tried: db.auth_user._migrate='db1_auth_user' just after the auth.settings.extra_fields but get an

[web2py] Re: DAL's fake_migrat and fake_migrate_all and migration problem with auth tables

2019-01-06 Thread icodk
Monday, January 7, 2019 at 2:07:03 AM UTC+1, Anthony wrote: > > On Sunday, January 6, 2019 at 2:41:53 PM UTC-5, icodk wrote: >> >> Thanks to all of you >> How do I add migrate to the auth tables ? >> I use >> auth.settings.extra_fields for ex

[web2py] compiled files location

2019-03-07 Thread icodk
I would expect a python application like web2py running with nginx, to generate compiled files like any other python application. However I can't see any byte compiled files under my application. Where are they ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - ht

[web2py] Re: compiled files location

2019-03-08 Thread icodk
So if I understand it right, web2py caches compiled application files and do it on the first demand or a source change and never write back to storage/disk. If so, Is there any advantage for compiled web2py application (except the one time load and compile after web server reset)? On Friday, M

[web2py] Re: compiled files location

2019-03-08 Thread icodk
Thanks On Friday, March 8, 2019 at 2:49:58 PM UTC+1, Anthony wrote: > > On Friday, March 8, 2019 at 4:55:02 AM UTC-5, icodk wrote: >> >> So if I understand it right, web2py caches compiled application files >> and do it on the first demand or a source change and never w

[web2py] Re: Open a new page in the browser from redirect or URL

2019-03-08 Thread icodk
I would do it in javascript in the view and simulate radio buttons, which means that every time the user is selecting a checkbox the script will clear the former selected checkbox. This way you don't have to deal with informing the user, about multiple selections. On Friday, March 8, 2019 at 9:

[web2py] Re: Open a new page in the browser from redirect or URL

2019-03-08 Thread icodk
My be it is an idea for improving the grid by add (yet another) option to have radio buttons instead of checkboxes On Saturday, March 9, 2019 at 12:08:50 AM UTC+1, icodk wrote: > > I would do it in javascript in the view and simulate radio buttons, which > means that every time th

[web2py] update a table with data from another table or criteria based on a linked table

2019-04-14 Thread icodk
Is it possible to use DAL syntax to update a table based on a join to another table ? Resulting something like : UPDATE employees SET employees.first_name = contacts.first_name FROM employees INNER JOIN contacts ON (employees.contact_id = contacts.id) WHERE contact.id = 101; -- Resources: - htt

[web2py] SQLFORM.smartgrid selectable return string or list

2019-04-19 Thread icodk
SQLFORM.smartgrid selectable return string if only one checkbox was slected and returns a list if 2 or more was selected. This inconsitancy force me to check for type before processing can continue For example, If I have a button that update selected records in the database call a function that

[web2py] Re: SQLFORM.smartgrid selectable return string or list

2019-04-20 Thread icodk
umably you can move your code into that > function, in which case, you won't have to worry about this, as the grid > will handle the conversion to a list. > > Anthony > > On Friday, April 19, 2019 at 9:28:21 AM UTC-4, icodk wrote: >> >> SQLFORM.smartgrid selec

[web2py] Re: SQLFORM.smartgrid selectable return string or list

2019-04-21 Thread icodk
d ids are lists also with only one selected Thanks for help On Sunday, April 21, 2019 at 1:56:09 AM UTC+2, Anthony wrote: > > On Saturday, April 20, 2019 at 8:52:01 AM UTC-4, icodk wrote: >> >> Hi Antony >> >> My selectable looks like : >> >> s

[web2py] WARNING:root:Unable to write to file /home/www-data/web2py/applications/myapp/languages/da.py

2017-03-16 Thread icodk
On some devices I get this error: WARNING:root:Unable to write to file /home/www-data/web2py/applications/myapp/languages/da.py This error is from the server log and the page that generate it only cause it on some devices (phones) but not on others. I checked the permissions on both /languages

[web2py] How to execute a function in scheduler.py using command line

2017-05-18 Thread icodk
For testing purposes I would like to execute a function in scheduler.py using command line (better ideas are welcome) I tried: web2py.exe -S myapp/scheduler/dummy_task -M But got the following error web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2017 Version 2.14.6-stable+tim

[web2py] Re: How to execute a function in scheduler.py using command line

2017-05-18 Thread icodk
could also copy the function to a controller and back to the scheduler.py.hope there is a better way On Thursday, May 18, 2017 at 3:19:06 PM UTC+2, icodk wrote: > > For testing purposes I would like to execute a function in scheduler.py > using command line (better ideas are wel

[web2py] styling smartgrid New/Edit/View forms

2017-05-25 Thread icodk
Background My model has a table with many fields (62). When using smartgrid to edit or add a record, all fields are shown in a long vertical list in the same order as defined in the model. So log so good. This can be overwhelming to user that might need to see some of the fields very often and s

[web2py] Re: styling smartgrid New/Edit/View forms

2017-05-26 Thread icodk
:02:08 PM UTC+2, Anthony wrote: > > You could create a custom formstyle function and then pass it to the grid > via the "formargs" argument or set response.formstyle. > > Anthony > > On Thursday, May 25, 2017 at 4:50:58 AM UTC-4, icodk wrote: >> >> Backgrou

[web2py] Problem executing function from web2py shell

2017-05-27 Thread icodk
I have a simple function in a controller that I try to execute from command line but gets a strange error: I start the shell with this command: web2py -S myapp/test/ -M I then call the function with the following command: >>>dummy_task() Dummy_taks () is defined as: def dummy_task(): rows=

[web2py] Re: Problem executing function from web2py shell

2017-05-28 Thread icodk
, icodk wrote: > > I have a simple function in a controller that I try to execute from > command line but gets a strange error: > I start the shell with this command: > web2py -S myapp/test/ -M > > I then call the function with the following command: > >>>dummy_task

[web2py] Re: web2py support

2017-05-30 Thread icodk
Could be interesting to hear what are the arguments for the porting On Tuesday, May 30, 2017 at 8:41:38 AM UTC+2, T.R.Rajkumar wrote: > > I am now porting a jsp application to web2py. Should I stay with web2py or > wait for web3py? Will there be web2py group support like now after web3py. > Pl

[web2py] Re: web2py support

2017-05-31 Thread icodk
Thanks T.R.Rajkumar On Wednesday, May 31, 2017 at 11:57:09 AM UTC+2, T.R.Rajkumar wrote: > > Could be interesting to hear what are the arguments for the porting > > The points are > 1. The application business logic has changed and the workflow has also > changed. So I have to do the app fresh.

  1   2   >