[web2py] Re: SELECT without duplicates for a specific field

2016-06-15 Thread Tribo Eila
Instead using: db(db.table.reference == db.referencedtable.id).select(db.table.ALL, orderby =db.referencedtable.Field, groupby=db.table.reference) Use: db(db.table.reference == db.referencedtable.id).select( db.referencedtable.Field, orderby=db.referencedtable.Field, groupby=db.table.reference,

[web2py] Re: XML(sanitize=True) and incorrect HTML

2016-06-15 Thread Kirill Shatalaev
Opened #1363 вторник, 14 июня 2016 г., 22:25:05 UTC+4 пользователь Anthony написал: > > > Feel free to file a Github issue. > > Anthony > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2p

[web2py] Re: SELECT without duplicates for a specific field

2016-06-15 Thread Gael Princivalle
Thanks a lot. As I need only the referenced table my code is: db(db.table.reference == db.referencedtable.id).select( db.referencedtable.ALL, orderby=db.referencedtable.Field, groupby=db.cm1.id, join=(db.table.on(db.referencedtable.id == db.table.reference))) Are there some examples online for l

Re: [web2py] Moving auth_user and related tables to another schema

2016-06-15 Thread Johann Spies
Thanks Richard, On 13 June 2016 at 16:21, Richard Vézina wrote: As far as I know web2py only support public schema, though as you mention I > think can support other schema with rname... You mention to use it that > way, it not working with auth if you create custom auth table model > definition?

[web2py] Update Pure HTML form

2016-06-15 Thread Jeff Riley
All. I was going to link this to my "Pure HTML Form" question just not sure how to do that. As you see in that question I was able to get past my copy paste issue and get the create form to work perfectly. Thank you all for the extra eyes. Now I am building the update form and I am getting "

[web2py] Re: Moving auth_user and related tables to another schema

2016-06-15 Thread Anthony
It's a bit of a hack and I haven't tried it so not sure it will work, but maybe something like this: db._lazy_tables = True auth.define_tables() lt = db._LAZY_TABLES [lt[t][2].update(rname='myschema.%s' % t) for t in db.tables if t.startswith ('auth')] db._lazy_tables = False The idea is to use

Re: [web2py] generic.docx ?

2016-06-15 Thread Richard Vézina
There is https://python-docx.readthedocs.io/en/latest/ About the conversion from html I would say you will have to write it extracting with python beautifulsoup then you use the python-docx API for creating you docx Richard On Tue, Jun 14, 2016 at 11:46 PM, H. Das wrote: > Would it be possible

Re: [web2py] Key Error when try to access records in DB tables

2016-06-15 Thread Richard Vézina
I think we would need more details, web2py version, more code, click on ID number?? in grid? Richard On Wed, Jun 15, 2016 at 1:36 AM, Joe wrote: > I can't understand what could possibly cause this. When I submit the form, > the form is processed, the page is redirected, email sent and the recor

Re: [web2py] Key Error when try to access records in DB tables

2016-06-15 Thread Anthony
And full traceback. On Wednesday, June 15, 2016 at 2:53:20 PM UTC-4, Richard wrote: > > I think we would need more details, web2py version, more code, click on ID > number?? in grid? > > Richard > > On Wed, Jun 15, 2016 at 1:36 AM, Joe wrote: > >> I can't understand what could possibly cause thi

[web2py] Pulling hair out on REST Example

2016-06-15 Thread wdtnh
I would appreciate any insights anyone might have on what I'm doing wrong here. For now just trying to get a simple REST GET request to work At this point, I'm simply trying to get some data where the param is hard coded. Any help would be extremely appreciated. I'm not sure if my $.get is wro

[web2py] Re: Pulling hair out on REST Example

2016-06-15 Thread Anthony
What exactly is the problem? What do you see in the browser network tab (i.e., request and response details) and Javascript console (any errors)? On Wednesday, June 15, 2016 at 4:34:18 PM UTC-4, wdtnh wrote: > > I would appreciate any insights anyone might have on what I'm doing wrong > here. F

[web2py] Re: how to debug weasyprint error - failed to load a library: cairo / cairo-2

2016-06-15 Thread Michael Beller
Just for the record ... I solved this by deleting the virtualenv and all user installed libraries (using 'pip uninstall ...'). Then simply reinstalling 'pip install --user weasyprint==0.27' I never found the root cause of the problem. Here is the conversation on PAW with some more info if any

Re: [web2py] Key Error when try to access records in DB tables

2016-06-15 Thread Joe
Hello Richard and Anthony, Thanks very much for your reply. Here is the traceback: Traceback (most recent call last): File "C:\Users\Acer\Desktop\web2py_new\web2py_win\web2py\gluon\restricted.py", line 227, in restricted exec ccode in environment File "C:/Users/Acer/Desktop/web2py_new

Re: [web2py] Key Error when try to access records in DB tables

2016-06-15 Thread Joe
Hello Anthony, Thanks very much for your reply. I posted more info including the traceback in my reply to Richard. Please kindly take a look. Thanks again. Cheers, Joe On Thursday, June 16, 2016 at 3:36:31 AM UTC+8, Anthony wrote: > > And full traceback. > > On Wednesday, June 15, 2016 at 2:

[web2py] Re: generic.docx ?

2016-06-15 Thread Limedrop
If you want to produce *simple *documents that can be edited in MS Word, it might be easier to use the RTF format, which is supported by web2py out of the box: http://www.web2py.com/books/default/chapter/29/10/services#PyRTF BUT be warned...my experience with PyRTF is that, while it is easy to

Re: [web2py] Key Error when try to access records in DB tables

2016-06-15 Thread Dave S
On Wednesday, June 15, 2016 at 3:41:21 PM UTC-7, Joe wrote: > > [...] > > To be more clear, in the database administration, in db.table_name, in > column db.table_name.id, when I click to select a row by ID I get this > error. > >> >> You have multiple rows shown in the admin display, I take

Re: [web2py] Key Error when try to access records in DB tables

2016-06-15 Thread Joe
Hi Dave, Thanks for your reply. I am using the SQLITE on localhost offline on my PC. Basically, I have all the web2py default settings in my app. I just created a grid to check if I can view the records that way. The records are displayed in the grid but when I click view to select a row in t

[web2py] Re: Pulling hair out on REST Example

2016-06-15 Thread wdtnh
The problem is that I get nothing back? I'm getting an http error 500 internal server error. On Wednesday, June 15, 2016 at 5:10:50 PM UTC-4, Anthony wrote: > > What exactly is the problem? What do you see in the browser network tab > (i.e., request and response details) and Javascript consol

[web2py] Update Pure HTML form

2016-06-15 Thread Jeff Riley
Sorry to be a pest but I really do need an answer for this one so I can finish this update form page please. -- 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) -

Re: [web2py] Re: generic.docx ?

2016-06-15 Thread Richard Vézina
I would recommand wordml 2003 over RTF... I did that in the past with lxml once you had get a grip of the name space of the xml format and figure out what the note you need and how to assemble them to make a properly formatted wordml it easy... But things like python-docx where not existing when I

[web2py] Re: Update Pure HTML form

2016-06-15 Thread Anthony
Hard to say without seeing any details. You shouldn't be getting that error message unless you have passed in a record or are using a keyed table. On Wednesday, June 15, 2016 at 9:52:22 AM UTC-4, Jeff Riley wrote: > > All. I was going to link this to my "Pure HTML Form" question just not > sure

[web2py] Re: Update Pure HTML form

2016-06-15 Thread Anthony
Also, if you're going to use SQLFORM, you should probably try to follow the documented custom form method rather than using completely custom HTML. At the very least, use form.custom.end to ensure you have the pr

[web2py] Re: Pulling hair out on REST Example

2016-06-15 Thread Anthony
Is there an error ticket? I notice you're returning a dict, so web2py will attempt to find and execute a view (in this case, a .html view, as you have specified no extension in the URL). However, if there is no view and the generic view hasn't been enabled, you would get a 404 response, not a 50