[web2py] How to make markin2html work in web2py?

2016-04-07 Thread Stephen Duisberg
I am doing this but I get errors because markmin isn't there. from markmin import markmin2html def index(): m = "Hello **world** [[link http://web2py.com]]"; return locals() {{extend 'layout.html'}} {{=markmin2html(m)}} name 'markmin2html' is not defined -- Resources: - http://web2py.

[web2py] Re: How to make markin2html work in web2py?

2016-04-07 Thread villas
Markmin is already available in the environment. {{extend 'layout.html'}} {{=MARKMIN(m)}} On Thursday, 7 April 2016 12:23:59 UTC+1, Stephen Duisberg wrote: > > I am doing this but I get errors because markmin isn't there. > > from markmin import markmin2html > def index(): > m = "Hello **wor

[web2py] Re: How to make markin2html work in web2py?

2016-04-07 Thread Stephen Duisberg
How to display the pdf and not the latex code : def index(): m = "Hello **world** [[link http://web2py.com]]"; from gluon.contrib.markmin.markmin2latex import markmin2latex print markmin2latex(m) return locals() {{extend 'layout.html'}} {{=markmin2latex(m)}} I am getting this but

[web2py] Re: cas broken in 2.14.3?

2016-04-07 Thread Massimo Di Pierro
I believe this has been fixed in trunk. Can you check? If you confirm we will deploy a new web2py version. On Wednesday, 6 April 2016 08:55:31 UTC-5, Franz Pietz wrote: > > Same here. My server was running 2.12.3 and CAS works fine (with a logout > issue that I reported previously, but had no an

[web2py] Re: access tables in database using web2py DAL from iPython prompt

2016-04-07 Thread Massimo Di Pierro
Yes you need db.define_table('', , migrate=False) and you need to list all fields in that table that should be visible to web2py and the type they should be mapped to in web2py. On Wednesday, 6 April 2016 11:01:01 UTC-5, Vu Pham wrote: > > Hi Massimo, > > I am connecting to an existing

[web2py] Re: rediretct 2 https [ ubuntu.sh]

2016-04-07 Thread Massimo Di Pierro
No problem. Which script are you referring to? On Wednesday, 6 April 2016 11:35:22 UTC-5, goome wrote: > > Hello > i see that the script that install web2py (ubuntu.sh) > by defualt will force every request to https. > Why? > Is there any problem to remove the redirect? > Thanks > -- Resources:

Re: [web2py] auth_user extra fields + row.to_dict()

2016-04-07 Thread Massimo Di Pierro
Good catch Anthony! On Wednesday, 6 April 2016 13:35:39 UTC-5, Anthony wrote: > > table = db.auth_user >> fields = ['id','first_name'] >> fields.append('test_field_1') >> >> query = table.id > 0 >> >> row = db(query).select(*fields).first().as_dict() >> > > The proble

Re: [web2py] Re: rediretct 2 https [ ubuntu.sh]

2016-04-07 Thread Marcello Console
2016-04-07 15:29 GMT+02:00, Massimo Di Pierro : > No problem. Which script are you referring to? Sorry the exact name is : setup-web2py-ubuntu.sh I supposed i downloaded it from http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh as so it is suggested from the book But i see i have tha

Re: [web2py] Re: cas broken in 2.14.3?

2016-04-07 Thread Massimiliano
I tested trunk. Seems ok to me. On Thu, Apr 7, 2016 at 3:26 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > I believe this has been fixed in trunk. Can you check? If you confirm we > will deploy a new web2py version. > > > On Wednesday, 6 April 2016 08:55:31 UTC-5, Franz Pietz wrot

Re: [web2py] Re: rediretct 2 https [ ubuntu.sh]

2016-04-07 Thread Dave S
On Thursday, April 7, 2016 at 8:56:04 AM UTC-7, goome wrote: > > 2016-04-07 15:29 GMT+02:00, Massimo Di Pierro >: > > No problem. Which script are you referring to? > > Sorry the exact name is : > setup-web2py-ubuntu.sh > I supposed i downloaded it from > http://web2py.googlecode.com/hg/scr

[web2py] Slow TTFB debugging with Wing IDE

2016-04-07 Thread MDSIII
Running web2py from the Wing IDE, so using the built-in rocket server, I see long Waiting times in Chrome Dev Tools for my ajax requests. I'm getting times in excess of 6 or 8 seconds. This is a single page application that fires off a bunch (7 or 8) ajax requests after the initial page load. I'

[web2py] Re: Slow TTFB debugging with Wing IDE

2016-04-07 Thread Niphlod
IMHO it's just sessions being locked to prevent concurrent modifications. if your ajax requests aren't using the session, put a session.forget(response) at the top of your function. http://web2py.com/books/default/chapter/29/04/the-core#session On Thursday, April 7, 2016 at 8:46:16 PM UTC+2,

[web2py] Re: Slow TTFB debugging with Wing IDE

2016-04-07 Thread MDSIII
Thanks for the quick reply Niphlod. That was the first thing I tried but it didn't help. Am I doing forget() correctly if I read a session attribute and then call forget but never write to the session (until later of course)? Something I forgot to mention, some, but not all, the controller funct

Re: [web2py] Re: rediretct 2 https [ ubuntu.sh]

2016-04-07 Thread Marcello Console
2016-04-07 19:33 GMT+02:00, Dave S : > The scripts reflect Web2Py defaulting to the "HTTPS Everywhere" > recommendations, no? but why overloading every request with httpS ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)

[web2py] Re: How to make markin2html work in web2py?

2016-04-07 Thread 黄祥
if you want the pdf, please check the book : http://web2py.com/books/default/chapter/29/10/services#ReportLab-and-PDF best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py

[web2py] generate menu web2pycookbook

2016-04-07 Thread Henk huisman
I am trying to replicate the example in the web2py cookbook on Creating a navigation bar (page 89) i.e. a menu based on rows in database table So I have build the model db.define_table('navbar', Field("title", type='string',length='25', notnull=True, required=True), Field("url", type='string', le