Re: [web2py] Web2Py with LDAP and SAML : Is it worth it for Windows ?

2019-10-27 Thread Mamisoa Andriantafika
Hi, I'm working on it at the moment ie Web2py <-> Shibboleth with Apache <-> 3rd party provider Could you give me a hint on how you managed this to work between Web2Py and Shibboleth? Mamisoa Le mardi 22 octobre 2019 13:34:53 UTC+2, Davidiam a écrit : > > Thank you. In the meantime we have

Re: [web2py] db.import_from_csv_file in python3

2019-10-17 Thread Mamisoa Andriantafika
Done. https://github.com/web2py/pydal/issues/598#issue-508723402 Le mercredi 16 octobre 2019 08:45:09 UTC+2, Massimo Di Pierro a écrit : > > Can you please open a pydal ticket? I can fix this over the week-end. > > On Monday, 14 October 2019 01:54:41 UTC-7, Mamisoa Andrian

[web2py] Re: [Web2Py] admin 'ascii' codec can't decode error switching from python 2 to python 3

2019-10-14 Thread Mamisoa Andriantafika
I did a fresh reinstallation and it works. But I cannot point out where is the problem. Le dimanche 13 octobre 2019 13:18:14 UTC+2, Mamisoa Andriantafika a écrit : > > Hi, > > I switched my current 2.18.5 Web2py installation from python 2 to python > 3. > > Creating a

Re: [web2py] db.import_from_csv_file in python3

2019-10-14 Thread Mamisoa Andriantafika
It seems to be related with the "blob" type where python 2 accept also string type while python 3 expect byte type. When I delete the row which contains the blob with string inside, exporting function works. Le dimanche 13 octobre 2019 19:05:58 UTC+2, Mamisoa Andriantafika a écri

[web2py] db.import_from_csv_file in python3

2019-10-13 Thread Mamisoa Andriantafika
Hi, I can't seem to export the db using db.import_from_csv_file in python3. It is working in python 2. It seems to be a problem with one of the image or blob field in a table ? Actually there is only on blob field populated with a b64 image file, but yet no image file in upload field.

[web2py] [Web2Py] admin 'ascii' codec can't decode error switching from python 2 to python 3

2019-10-13 Thread Mamisoa Andriantafika
Hi, I switched my current 2.18.5 Web2py installation from python 2 to python 3. Creating a dummy new application, everything is working. Using an older application, I get an error in trying to display error logs from admin: Billet d'erreur for "admin" Identifiant du Billet

[web2py] Re: Web2py install script python 3/Apache/Ubuntu

2019-03-16 Thread Mamisoa Andriantafika
This script works with python 3 but is under nginx: https://raw.githubusercontent.com/arisobel/web2py_scripts/master/setup-web2py-nginx-p3-uwsgi-ubuntu.sh Le samedi 16 mars 2019 13:12:06 UTC+1, Mamisoa Andriantafika a écrit : > > Sorry this does not work for me. > > Did you m

[web2py] Re: Web2py install script python 3/Apache/Ubuntu

2019-03-16 Thread Mamisoa Andriantafika
Sorry this does not work for me. Did you manage to get a server working with python 3 and apache? Le samedi 16 mars 2019 12:37:02 UTC+1, 黄祥 a écrit : > > think on line 164 and 165 is the culprit, should be > sudo -u www-data *python3* -c "from gluon.widget import console; > console();" > sudo

[web2py] Re: Web2py install script python 3/Apache/Ubuntu

2019-03-16 Thread Mamisoa Andriantafika
Hi, I uses the 2nd link (python 3) you gave to get it work with apache on ubuntu server 18.04. The first is for nginx. But I still get that web2py is running on 2.7 version of python? Le samedi 16 mars 2019 01:46:30 UTC+1, 黄祥 a écrit : > > might we know which script that you used ? > >

[web2py] Web2py install script python 3/Apache/Ubuntu

2019-03-15 Thread Mamisoa Andriantafika
Hi, I can't seem to find how to modify the one-step installation script so that web2py uses python 3. I tried pip3 venv on wen2py directory without success. It still shows (Running on Apache/2.4.29 (Ubuntu), Python 2.7.15rc1. Server is a fresh ubuntu server 18.04. any ideas? --

[web2py] Re: PYTHON 3

2018-04-14 Thread Mamisoa Andriantafika
Hi, I would agree that the docs should be updated: download page, deployment in web2py group etc... Le mardi 10 avril 2018 00:10:35 UTC+2, Jurgis Pralgauskis a écrit : > > Would be good if Py3 support would be highlighted in Instructions > http://web2py.com/init/default/download > as now it

[web2py] Update Web2Py from admin page > Error - from version 2.14.6

2018-02-04 Thread Mamisoa Andriantafika
Hi, I tried to upgrade the easy way from the admin screen but now I get a ticket that I cannot read. At one point I get: Requires web2py 2.15.5 or newer I installed previously for the one step install (Linux). I tried again but I get a 404 error from: wget

[web2py] Re: [pydpdf] ('FPDF' object has no attribute 'write_html')

2016-12-07 Thread Mamisoa Andriantafika
Thanks! Le mercredi 7 décembre 2016 18:49:57 UTC+1, Paolo Valleri a écrit : > > see > https://github.com/reingart/pyfpdf/blob/master/docs/reference/write_html.md > for a detailed example for using write_html > > Paolo > > On Tuesday, December 6, 2016 at 10:23:46 PM UTC+

[web2py] [pydpdf] ('FPDF' object has no attribute 'write_html')

2016-12-06 Thread Mamisoa Andriantafika
Hi, Here is a simple controller. def test_fpdf(): from gluon.contrib.pyfpdf import FPDF, HTMLMixin title = "This The Doc Title" heading = "First Paragraph" text = 'bla' # create a small table with some data: rows_body = [] for data in db(db.person.id > 0).select():

[web2py] Re: render an xml view with rest

2016-06-12 Thread Mamisoa Andriantafika
gt; On Saturday, June 11, 2016 at 5:25:38 PM UTC-4, Mamisoa Andriantafika > wrote: >> >> Hi, >> >> With this code: >> >> @request.restful() >> def icd10(): >> import libxml2 >> icd10_xml = libxml2.parseDoc(open( >> '/hom

[web2py] render an xml view with rest

2016-06-11 Thread Mamisoa Andriantafika
Hi, With this code: @request.restful() def icd10(): import libxml2 icd10_xml = libxml2.parseDoc(open('/home/www-data/web2py/applications'+ URL('static','icd10/icd10cm/Tabular.xml'),'r').read()) response.view = 'generic.xml' def GET(**vars): search_str =

[web2py] Get only first row for each id in a joint (one to many) query

2016-05-07 Thread Mamisoa Andriantafika
Hi, >From this model db.define_table('address', Field('id_auth_user', 'reference auth_user', writable = False, readable = False), Field('zipcode', 'string', required=True), Field('town', 'string', required=True), Field('country, 'string', required=True), auth.signature) So

[web2py] Re: [REST] encoding character in query patterns

2016-04-27 Thread Mamisoa Andriantafika
Thank you I will do post an issue. Le mercredi 27 avril 2016 00:16:39 UTC+2, Leonel Câmara a écrit : > > You cannot have unicode characters in the path of an URL that is not a > valid URL. If percent encoded path components do not work then it is a > bug/missing feature. If you submit an issue

[web2py] Re: [REST] encoding character in query patterns

2016-04-26 Thread Mamisoa Andriantafika
Hi, I did try but still not working. Le mardi 26 avril 2016 17:05:52 UTC+2, Leonel Câmara a écrit : > > You need to url encode those characters. Have you tried that? > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Re: [REST] encoding character in query patterns

2016-04-24 Thread Mamisoa Andriantafika
generate this URL or you receive > the request? Does it fails for a request you receive? > > On Sat, Apr 23, 2016 at 8:38 PM, Mamisoa Andriantafika <mam...@gmail.com > > wrote: > >> Just to be clearer, here is a response from the following get: >> >> >&g

[web2py] Re: [REST] encoding character in query patterns

2016-04-23 Thread Mamisoa Andriantafika
15:59:49", "maiden_name_pid6": "Li\u00e9", "idc_num": "", "dob_pid7": "1978-01-01"}]} but if I add the search with the accent: https://localhost/test/default/api_users/user/maï/lié/1978-01-01 {"content":

[web2py] [REST] encoding character in query patterns

2016-04-23 Thread Mamisoa Andriantafika
Hi, Using this usual REST code in controller : def api_users(): response.view = 'generic.json' # or 'generic.' + request.extension def GET(*args,**vars): patterns = [ "/user[auth_user]", "/user/{auth_user.id}", "/user/{auth_user.id}/:field",

[web2py] Re: [REST] can't get auth.signature fields

2016-04-18 Thread Mamisoa Andriantafika
t only returns readable fields (notice you're also not getting > id_auth_user), so temporarily set all the fields to readable. > > Anthony > > On Monday, April 18, 2016 at 10:11:59 AM UTC-4, Mamisoa Andriantafika > wrote: >> >> Hi, >> >> Here is a ver

[web2py] Re: [REST] can't get auth.signature fields

2016-04-18 Thread Mamisoa Andriantafika
box_num_pid11_2', 'string'), Field('address1_pid11_3', 'string'), Field('address2_pid11_4', 'string'), Field('zipcode_pid11_5', 'string'), Field('town_pid11_6', 'string'), Field('country_pid11_7', 'string'), Field('address_rank','integer'), auth.signature) and the fields are filled c

[web2py] Re: RESTful json:api

2016-04-18 Thread Mamisoa Andriantafika
Hi, This is the code I use to render a ROW in JSON. You also have to XML it to render it correctly in view. def rows2json (tablename,rows): import datetime import json def date_handler(obj): if isinstance(obj, datetime.datetime): return

[web2py] [REST] can't get auth.signature fields

2016-04-17 Thread Mamisoa Andriantafika
Hi, Using the REST service, a GET doesn't show the fields from auth_signature. Is there a way to make them visible from the REST api? Mike -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Customize the RESTFUL service output

2016-02-13 Thread Mamisoa Andriantafika
Hi, I'm trying to ajust the output of the REST services. Here is my code: @request.restful() def api(): response.view = 'generic.json' def GET(tablename,**vars): # GET VALUES if not tablename=='test': raise HTTP(400) if request.vars.search == None: return

[web2py] Re: Customize the RESTFUL service output

2016-02-13 Thread Mamisoa Andriantafika
uot;, "Records": [' # concat = '{ "'+tablename+'": [' for row in rows: concat = concat + json.dumps(row)+"," concat = concat.strip(',') concat = concat + ']}' return concat Mike Le samedi 13 février 2016 14:59:53 UTC+1, Mamisoa Andrian

Re: [web2py] Re: Customize the RESTFUL service output

2016-02-13 Thread Mamisoa Andriantafika
cannot > find how to do it? > > 2016-02-13 19:33 GMT+02:00 Mamisoa Andriantafika <mam...@gmail.com > >: > >> Ok here is my answer: >> >> # RESTFUL CRUD >> @request.restful() >> def api(): >> import json >> response

[web2py] Re: [SQLFORM.grid] fields order in view / request.args(0)

2015-11-08 Thread Mamisoa Andriantafika
Thanks a lot to both of you. Le dimanche 8 novembre 2015 02:53:04 UTC+1, Anthony a écrit : > > 1) Using the commented line, the view is working but if I edit/profile, I >> get a ticket error with: ValueError: invalid literal for long() with base >> 10: 'edit' >> with or without the args. I

[web2py] [SQLFORM.grid] fields order in view / request.args(0)

2015-11-07 Thread Mamisoa Andriantafika
[SQLFORM.grid] fields order in view / request.args(0) Hi, I have 2 questions relative to this controller: def p_list(): # i = request.args(0) or 7 // not working, invalid literal base 10 on edit/profile i = 7 grid = SQLFORM.grid(db.auth_membership.group_id==i,

[web2py] Re: parse_as_rest - filter GET request with parameters rather than patterns

2015-10-27 Thread Mamisoa Andriantafika
Thank you for your answer. Is there another way to make a rest scaffold service that work with vars in web2py? Le mardi 27 octobre 2015 13:56:43 UTC+1, Niphlod a écrit : > > parse_as_rest works exclusively with args, not vars. > > On Tuesday, October 27, 2015 at 1:20:03 AM UT

[web2py] parse_as_rest - filter GET request with parameters rather than patterns

2015-10-26 Thread Mamisoa Andriantafika
Hi, Is it possible to GET an answer with a setup restfull service with parse_as_rest with: /rest/table_name?id=1 that is equivalent to the working: /rest/table_name/id/1 ? Morever with more parameters: /rest/table_name?id=1=Toto Mike -- Resources: - http://web2py.com -

[web2py] Re: Add a custom column in SQLFORM.grid that counts rows in child table

2015-10-18 Thread Mamisoa Andriantafika
() return count_iiv db.patient.count_iiv = Field.Virtual('count_iiv',lambda row: get_iiv_number( row.patient.id)) Le dimanche 18 octobre 2015 19:26:07 UTC+2, Mamisoa Andriantafika a écrit : > > Hi, > > I have a model like this: > > db.define_table('patient', >

[web2py] Add a custom column in SQLFORM.grid that counts rows in child table

2015-10-18 Thread Mamisoa Andriantafika
Hi, I have a model like this: db.define_table('patient', Field('name','string'), Field('first_name','string'), Field('dob','date'), Field('disease','string', requires=IS_NOT_EMPTY())) db.define_table('injection', Field('id_patient', 'reference patient', writable = False,

[web2py] Re: TABLE--TR--TD in web2py book

2015-09-01 Thread Mamisoa Andriantafika
n-parameters > > > TABLE(*[TR(*rows) for rows in table]) > > > TABLE > is a function that can takes list argument. > > [TR(*rows) for rows in table] > is a list. > > > > > > 31 Ağustos 2015 Pazartesi 23:33:23 UTC+3 tarihinde Mamisoa Andriantafika

[web2py] Re: TABLE--TR--TD in web2py book

2015-08-31 Thread Mamisoa Andriantafika
Note, technically argument unpacking is not necessary for TABLE nor for > TR, as both will alternatively accept a list as the first argument. So, the > code could be changed to: > > TABLE([TR(row) for row in table]) > > > Anthony > > On Sunday, August 30, 2015 at

[web2py] Re: TABLE--TR--TD in web2py book

2015-08-30 Thread Mamisoa Andriantafika
Doest the first star is needed? I think not? Le dimanche 30 août 2015 19:20:38 UTC+2, Mamisoa Andriantafika a écrit : Hi, Could you explain to me how this code works? http://web2py.com/books/default/chapter/29/05/the-views#TABLE--TR--TD table = [['a', 'b'], ['c', 'd']] print TABLE(*[TR

[web2py] TABLE--TR--TD in web2py book

2015-08-30 Thread Mamisoa Andriantafika
Hi, Could you explain to me how this code works? http://web2py.com/books/default/chapter/29/05/the-views#TABLE--TR--TD table = [['a', 'b'], ['c', 'd']] print TABLE(*[TR(*rows) for rows in table]) tabletrtda/tdtdb/td/trtrtdc/tdtdd/td/tr/table I do not completely understand how the loop is

[web2py] Re: Query results from 2 children tables from same parent ordered by date

2012-12-22 Thread Mamisoa Andriantafika
ok find it too using this code in view: {{for e in exams_mutex:}} divh1Examen du {{=e['COALESCE(dataset1.date,dataset2.date)']}}/h1/div {{pass}} Le samedi 22 décembre 2012 08:27:03 UTC+1, Mamisoa Andriantafika a écrit : I actually need to display those coalesce dates out of SQLTABLE that I

[web2py] Re: Query results from 2 children tables from same parent ordered by date

2012-12-21 Thread Mamisoa Andriantafika
I have pb to show the coalesce date in view. I tried; exams_mutex['COALESCE(dataset1.date,dataset1.date)'] but it is not working? Le jeudi 20 décembre 2012 23:40:15 UTC+1, Mamisoa Andriantafika a écrit : I finally found the solution using COALESCE to merge and order date columns

[web2py] Re: Query results from 2 children tables from same parent ordered by date

2012-12-21 Thread Mamisoa Andriantafika
I actually need to display those coalesce dates out of SQLTABLE that I use in view. To be precise, I need to show in LI(date, LI(all parameters)). --

[web2py] Re: Query results from 2 children tables from same parent ordered by date

2012-12-20 Thread Mamisoa Andriantafika
would need to create a model (readonly) to access the view. On Wednesday, 19 December 2012 16:19:33 UTC-6, Mamisoa Andriantafika wrote: Best results to UNION I could have was using the mutex table trick: http://www.xaprb.com/blog/2006/05/26/how-to-write-full-outer-join-in-mysql

[web2py] Re: Query results from 2 children tables from same parent ordered by date

2012-12-19 Thread Mamisoa Andriantafika
and join] ORDER BY latest_date Is is possible using to process it using DAL? Le dimanche 16 décembre 2012 17:40:22 UTC+1, Mamisoa Andriantafika a écrit : Sorry I still get: Cannot | incompatible Rows objects. I'll change the field name date you are very right. Le dimanche 16 décembre 2012

[web2py] Re: Query results from 2 children tables from same parent ordered by date

2012-12-16 Thread Mamisoa Andriantafika
many records you can do: rows = ( db(db.dataset1).select() | db(db.dataset2).select() ).sort(lambda row: row.date) On Saturday, 15 December 2012 08:43:35 UTC-6, Mamisoa Andriantafika wrote: Hi, I have this db model: db.define_table('patients', Field('name', 'string', length=32

[web2py] Re: Query results from 2 children tables from same parent ordered by date

2012-12-16 Thread Mamisoa Andriantafika
, Mamisoa Andriantafika wrote: Hi again, | seems not to work because the column numbers is different between the 2 tables? Le samedi 15 décembre 2012 20:23:44 UTC+1, Massimo Di Pierro a écrit : If you have lots of records you may be able to do it with a database view but that may be db

[web2py] Query results from 2 children tables from same parent ordered by date

2012-12-15 Thread Mamisoa Andriantafika
Hi, I have this db model: db.define_table('patients', Field('name', 'string', length=32), Field('firstname', 'string', length=32), Field('dob', 'date'), format='%(name)s') db.define_table('dataset1', Field('date', 'date', length=32), Field('param1', 'string', length=50),

[web2py] Re: Query results from 2 children tables from same parent ordered by date

2012-12-15 Thread Mamisoa Andriantafika
. If you don't have too many records you can do: rows = ( db(db.dataset1).select() | db(db.dataset2).select() ).sort(lambda row: row.date) On Saturday, 15 December 2012 08:43:35 UTC-6, Mamisoa Andriantafika wrote: Hi, I have this db model: db.define_table('patients', Field('name