[web2py] Re: Bootstrap icons don't work with latest web2py?

2012-09-21 Thread LightDot
I took a closer look and it seems that this is caused by the css comments in the latest web2py_bootstrap.css commit. The /* */ style is the only valid comment style for css, // isn't. I reported it. Regards, Ales On Saturday, September 22, 2012 2:43:10 AM UTC+2, LightDot wrote: > > Same issue

[web2py] wiki with 3 columns

2012-09-21 Thread Martin Weissenboeck
I want to build a wiki with 3 columns with looks like THE BOOK. How can I do it with auth.wiki and markmin? Regards, Martin --

[web2py] Re: Bug with list:string in SQLFORM.factory?

2012-09-21 Thread Massimo Di Pierro
I wrote in a hurry. Your code works for me with trunk. Can you try trunk? If still does not work, I will need a more complete example. On Friday, 21 September 2012 21:48:37 UTC-5, Massimo Di Pierro wrote: > > I do not think so. Can you provide an example to reproduce the problem? > > On Friday, 2

Re: [web2py] Re: Problem updating list fields

2012-09-21 Thread Bruno Rocha
Normally I do in this way: rows = db(db.membership.user_id = 2).select() for row in rows: new_things = row.things + [3] row.update_record(things=new_things) --

[web2py] Re: Problem updating list fields

2012-09-21 Thread Massimo Di Pierro
There is no way to append an element to every list. On Friday, 21 September 2012 19:45:12 UTC-5, Luca wrote: > > Suppose you have: > > db.define_table('membership', > 'user_id': db.auth_user, > 'things': 'list: reference thing' > ) > db.define_table('thing', ...) > > The following does

[web2py] Re: Bug with list:string in SQLFORM.factory?

2012-09-21 Thread Massimo Di Pierro
I do not think so. Can you provide an example to reproduce the problem? On Friday, 21 September 2012 18:01:57 UTC-5, Luca wrote: > > I am using web2py 2.0.8 on a Mac. I defined the following controller: > > @auth.requires_login() > def edit_members(): > current_emails = ['em...@some.com '] >

[web2py] Re: response.files with no file suffix

2012-09-21 Thread Massimo Di Pierro
There was a way to do this but apparently got broken. Please open a ticket and I will put it back tomorrow. On Friday, 21 September 2012 15:07:28 UTC-5, howesc wrote: > > Hello, > > I have a desire to do the following: > response.files.append('http://maps.google.com/maps/api/js?sensor=false') >

[web2py] Superfish in Web2py 2.0

2012-09-21 Thread pjryan126
Hi, I'm working on a custom menu, and I noticed there is no longer a superfish.css file in the scaffolding app, though the file is still in the examples application. Has superfish been replaced with something new in Web2py 2.0 , and if so, what is the new default _class for the MENU() helper? I

[web2py] Problem updating list fields

2012-09-21 Thread Luca
Suppose you have: db.define_table('membership', 'user_id': db.auth_user, 'things': 'list: reference thing' ) db.define_table('thing', ...) The following does not work: db(db.membership.user_id = 2).update(things=list_add(db.membership.things, 3)) where def list_add(l, e): if e

[web2py] auth.wiki usage

2012-09-21 Thread guruyaya
I'm trying to figure out how to use the built in auth.wiki feature. I read the markmin syntax allows expending the syntax using the "extra" tag. Is there a way to implement it in auth.wiki? where should the de of the extra functionality be? *Is there a guide containing all options for this feat

[web2py] Re: Bootstrap icons don't work with latest web2py?

2012-09-21 Thread LightDot
Same issue here, I think. I stay closer to latest trunk so I know this just happened now... the last commit to web2py_bootstrap.css seems to be it, which is just a code cleanup. Probably just a typo somewhere but I don't have time to look into the details until tomorrow. Alec, if you take the f

[web2py] Bug with list:string in SQLFORM.factory?

2012-09-21 Thread Luca
I am using web2py 2.0.8 on a Mac. I defined the following controller: @auth.requires_login() def edit_members(): current_emails = ['em...@some.com'] form = SQLFORM.factory(Field('members', 'list:string', default=current_emails, )) if form.process().accepted:

[web2py] Re: Migrating from CGI Script

2012-09-21 Thread thinkwell
One more question - here's how I redid the controller because I need these values for hidden fields in the web2py form. def submit_site(): site = request.post_vars.submit_url ip = request.post_vars.submit_ip However, that only results in values of None. Why can't I use request.post_vars

[web2py] Re: Problem with setting a default value for list:string fields in forms

2012-09-21 Thread Luca
In fact, this seems to be a bug not so much with setting default values, but with form validation. I am doing: if form.process().accepted: and somehow, in this validation process, if the string fields are ['a', 'b'] (the string 'a' filled in the first entry line, and 'b' in the second li

[web2py] Problem with setting a default value for list:string fields in forms

2012-09-21 Thread Luca
I have the following code snippet: form = SQLFORM.factory(Field('members', 'list:string', requires=IS_LIST_OF(IS_IN_DB(db, 'auth_user.email', '%(email)s')), )) form.vars.members = current_emails This does not work. if current_email is ['a...@b.com'] for instance, then th

Re: [web2py][appliances] mycal in AppointmentManager cause a memory leak

2012-09-21 Thread Richard Vézina
In the last version of fullcalendar at line 163 : element.data('fullCalendar', calendar); // TODO: look into memory leak implications Richard On Fri, Sep 21, 2012 at 5:30 PM, Richard Vézina wrote: > Leak seems to come from FullCalendar itself since I load the page with > blank init of fullcale

Re: [web2py][appliances] mycal in AppointmentManager cause a memory leak

2012-09-21 Thread Richard Vézina
Leak seems to come from FullCalendar itself since I load the page with blank init of fullcalendar and get the leak : jQuery(document).ready(function() { var date = new Date(); var d = date.getDate(); var m = date.getMonth(); var y = date.getFullYear();

Re: [web2py] Re: Pass multiple arguments to URL through javascript

2012-09-21 Thread jjcurats
good day great folks..i've been encountering same problem here..i have 2 variables in my function to pass in my controller...i just cant do it right trying lot of options already..here's my code: $(function() { $('#client-login').bind('submit',function(event){ var email = $(

[web2py] Re: response.files with no file suffix

2012-09-21 Thread howesc
i can put web2py_ajax.html not in my head i think. :) rightand when i first wrote this blocks were not as handy and blah blah blah. perhaps it's time for me to update my code a bit. thanks for the feedback! cfh On Friday, September 21, 2012 1:24:31 PM UTC-7, Niphlod wrote: > > I load it a

[web2py] Re: response.files with no file suffix

2012-09-21 Thread Niphlod
I load it asynchronously using a javascript snippet, never wanted to put that in . This is not a "limitation" per se, you can include it in your template and/or insert some code in web2py_ajax.html and "solve" the problem. Anyway, as for current response.include_files() capacity, assuming that

Re: [web2py] Re: vimeo and auth.wiki

2012-09-21 Thread Martin Weissenboeck
Sorry for asking again. Maybe the answer is very simple, but I could not find it. *(a) What is the right way to apply a css class to a markmin text?* I have found `` text ``:css_class but this construct seems to stop the oembed protocol (see the 2nd example below). *(b) I want to call the functi

[web2py] Re: response.files with no file suffix

2012-09-21 Thread howesc
good questionmaybe pass a tuple of (URL, type) to response.files.append? but right now tuples are interpreted as inline CSS or JS... the other thought is that this ends in /jswould it be acceptable to assume .js or /js are both js file types? does anyone know if /js is a google conve

[web2py] Re: response.files with no file suffix

2012-09-21 Thread Niphlod
how do you propose to detect the correct embedding code (as in

[web2py] response.files with no file suffix

2012-09-21 Thread howesc
Hello, I have a desire to do the following: response.files.append('http://maps.google.com/maps/api/js?sensor=false') note that the URL has no .js suffix. as best i can tell response.include_files() in 2.0.9 will just ignore this file and never output the URL. (i had hacked an older version of

Re: [web2py] Re: new demo appliance for gmap and fullcalendar

2012-09-21 Thread Richard Vézina
Memory leak or can't find the app? The app that contains the fullcalendar web2py integration is call ApointmentMangement and is available here : https://github.com/mdipierro/web2py-appliances/blob/master/AppointmentManager/web2py.app.AppointmentManager.w2p Richard On Fri, Sep 21, 2012 at 3:31 P

Re: [web2py] Re: new demo appliance for gmap and fullcalendar

2012-09-21 Thread Robert O'Connor
Same issue as all the above ---rob Sent from my phone...excuse any typos. On Sep 21, 2012 9:27 AM, "Richard Vézina" wrote: > Forgot it : > > Don't forget the appliances page: > http://web2py.com/appliances > > I think the AppointmentManager app implements a calendar that might be > interesting.

[web2py][appliances] mycal in AppointmentManager cause a memory leak

2012-09-21 Thread Richard
Hello, I test AppointmentManager app this morning and I found there is a memory leak when reloading repeatedly mycal page. The python process that hold web2py keep growing slowly (~5 meg) each time the page is reloaded. The app I am talking about is available here : http://web2py.com/appliances

[web2py] Re: Improving SSL Support

2012-09-21 Thread Yarin
Done http://code.google.com/p/web2py/issues/detail?id=1023 On Friday, September 21, 2012 2:05:41 PM UTC-4, Massimo Di Pierro wrote: > > Yarin, please open an issue on google code as suggested enhancement so ti > does not get lost. Also feel free to move the discussion on web2py > developers. > >

[web2py] Re: bingbot and response varible

2012-09-21 Thread Massimo Di Pierro
Sure it is not mentioned in a web2pyslice? Or perhaps you are not running behind a proxy and web2py things bing is_local? On Thursday, 20 September 2012 15:52:40 UTC-5, rochacbruno wrote: > > > I am wondering how bingbot knows about a variable I defined in my > controller? > > controllers/articl

Re: [web2py] Re: get by date interval

2012-09-21 Thread Massimo Di Pierro
They are already logged. {{=response.toolbar()}} will show them to you. On Thursday, 20 September 2012 01:48:18 UTC-5, Son Tran wrote: > > Hi all, > > Since this issue was fixed. Could you please let me know how to log all > sql statements executed by the DAL? > Thanks a lot, > > Son Tran > > O

[web2py] Re: DAL - postgresql - circular table definitions

2012-09-21 Thread Leonel Câmara
By the way that's missing a ondelete="SET NULL" on the competition active_season and I'm using postgres 9.2 with web2py 2.0.9 Sexta-feira, 21 de Setembro de 2012 17:14:45 UTC+1, Leonel Câmara escreveu: > > Hey, I can give you an example of the type of tables creating me problems > > > db.define_t

[web2py] Re: Improving SSL Support

2012-09-21 Thread Massimo Di Pierro
Yarin, please open an issue on google code as suggested enhancement so ti does not get lost. Also feel free to move the discussion on web2py developers. On Friday, 21 September 2012 12:22:57 UTC-5, Yarin wrote: > > Here's a complete example of our own implementation (simplified, untested) > us

[web2py] Re: Bootstrap icons don't work with latest web2py?

2012-09-21 Thread Paolo Caruccio
please put glyphicons-*.png in static/images folder and check that in web2py_bootstrap.css there are the following rules: /* right folder for bootstrap black images/icons */ [class^="icon-"],[class*=" icon-"]{ background-image:url("../images/glyphicons-halflings.png") } /* right folder for boots

[web2py] Re: Improving SSL Support

2012-09-21 Thread Yarin
Here's a complete example of our own implementation (simplified, untested) using the proposed auth settings: in our model: def force_https(trust_proxy = False, secure_session = False): """ Enforces HTTPS in appropriate environments Args: trust_proxy: Can we trust proxy header '

[web2py] Re: Improving SSL Support

2012-09-21 Thread Yarin
You can't detect this- it must be a setting. Please see my previous answer: https://groups.google.com/forum/#!msg/web2py/me1e5d6Dudk/VQRQhdiryccJ "you cannot detect whether proxied traffic is real because headers are unreliable. Instead you must securely set up a server behind a proxy and set th

[web2py] Bootstrap icons don't work with latest web2py?

2012-09-21 Thread Alec Taylor
Upgrading an old project from 2.0.1 or so to the latest trunk. I replaced my views/default and static folder with the ones from the latest welcome app. Subsequently I made my modifications to them; essentially copy and pasting blocks of code from my old layout.html to the new one, same went for my

[web2py] Re: DAL - postgresql - circular table definitions

2012-09-21 Thread Leonel Câmara
Hey, I can give you an example of the type of tables creating me problems db.define_table('competition', Field('name', length=256, requires=[IS_NOT_EMPTY(), IS_LOWER()]), Field('active_season', 'reference season'), format='%(name)s', migrate='competition.table' ) db.define_table

[web2py] Re: Improving SSL Support

2012-09-21 Thread Massimo Di Pierro
Yes but how do you detect if is_proxied reliably? On Friday, 21 September 2012 10:28:26 UTC-5, Yarin wrote: > > FYI this is the enforcer function we wrote for our implementation- > basically a rewrite of request.requires_https(): > > def force_https(trust_proxy = False): > """ Enforces HTTPS in

[web2py] Re: DAL - postgresql - circular table definitions

2012-09-21 Thread Massimo Di Pierro
can we see your model? On Friday, 21 September 2012 09:43:42 UTC-5, Leonel Câmara wrote: > > I keep getting 'relation "foo" does not exist' errors. > > I thought the DAL allowed for this. I realize it's because of postgresql > type enforcement. How do I get around it without using an integer or

[web2py] Re: log out user

2012-09-21 Thread Massimo Di Pierro
After login your user info is loaded into session. You need to add something like if session.dbname != current_db_name: auth.logout() session.dbname = current_db_name On Friday, 21 September 2012 07:47:08 UTC-5, Yebach wrote: > > Hello > > You can see my app on portal.iurnik.si

[web2py] Re: Improving SSL Support

2012-09-21 Thread Yarin
FYI this is the enforcer function we wrote for our implementation- basically a rewrite of request.requires_https(): def force_https(trust_proxy = False): """ Enforces HTTPS in appropriate environments Args: trust_proxy: Can we trust proxy header 'http_x_forwarded_proto' to determine SSL

[web2py] DAL - postgresql - circular table definitions

2012-09-21 Thread Leonel Câmara
I keep getting 'relation "foo" does not exist' errors. I thought the DAL allowed for this. I realize it's because of postgresql type enforcement. How do I get around it without using an integer or something like that instead of a reference? --

Re: [web2py] Send Email After Registration

2012-09-21 Thread hasan alnator
Sorry i mean in db.py : auth.settings.register_next = URL('index',vars={'msg':'welcome'}) Best Regards, On Fri, Sep 21, 2012 at 5:21 PM, hasan alnator wrote: > Dear Yebach , > > in db.py : > > auth.settings.register_next = URL('Welcome',vars={'msg':'welcome'}) > > in controller : > > def ind

Re: [web2py] Send Email After Registration

2012-09-21 Thread hasan alnator
Dear Yebach , in db.py : auth.settings.register_next = URL('Welcome',vars={'msg':'welcome'}) in controller : def index(): if request.vars.msg: response.flash = " 'u'Registracija je v postopku odobritve. Ko bo vaš račun potrjen boste o tem obveščeni preko e-maila." return locals() On Fr

[web2py] Re: Improving SSL Support

2012-09-21 Thread Yarin
The completely naive approach would be to do: if request.env.http_x_forwarded_for and \ request.env.http_x_forwarded_proto in ['https', 'HTTPS']: # Is HTTPS... But you cannot detect whether proxied traffic is real because headers are unreliable. Instead it is up to the user to securely

[web2py] Using PYTHONOPTIMIZE with web2py

2012-09-21 Thread Daniel Gonzalez
Hi, I am running web2py via apache wsgi. What is the suggested way to run the python interpreter with PYTHONOPTIMIZE? Are there any known incompatibilities between web2py and PYTHONOPTIMIZE? Thanks, Daniel --

Re: [web2py] Re: new demo appliance for gmap and fullcalendar

2012-09-21 Thread Richard Vézina
Forgot it : Don't forget the appliances page: http://web2py.com/appliances I think the AppointmentManager app implements a calendar that might be interesting. Anyway, it is easy to download it and take a look. Form an other thread... Richard On Fri, Sep 21, 2012 at 9:25 AM, Richard Vézina wr

Re: [web2py] Re: new demo appliance for gmap and fullcalendar

2012-09-21 Thread Richard Vézina
Fullcalendar example seems not there anymore?? Richard On Tue, May 29, 2012 at 12:16 PM, Niphlod wrote: > I have fullcalendar too in my application. > > given that mytable.mydate is a datetime, try serializing the event in a > dict in json with mytable.mydate.strftime('%Y-%m-%dT%H:%M:%SZ') > >

[web2py] log out user

2012-09-21 Thread Yebach
Hello You can see my app on portal.iurnik.si I have the following problem after user selects a school app connects to a specific database where data is read from. On that database the auth tables are created so registered users can download some documents. The problem

[web2py] Re: Improving SSL Support

2012-09-21 Thread Massimo Di Pierro
Can you suggest a way to detect that? On Thursday, 20 September 2012 13:56:55 UTC-5, Yarin wrote: > > @Massimo - that'd be great. > > One more kink to throw in is recognizing proxied SSL calls. This requires > knowing whether you can trust the traffic headers (e.g. having apache > locked down t

Re: [web2py] Re: web2py book on github

2012-09-21 Thread Nico Zanferrari
Il giorno sabato 8 settembre 2012 14:46:39 UTC+2, Niphlod ha scritto: > > > BTW: the book is still online at web2py.com/book if you want to read it: > it's not required to download the app to read it ^_^ > > Please, note that the book online at web2py.com/book does not have all the updates that

[web2py] Re: post login redirection doesn't work

2012-09-21 Thread Yebach
Don't ask me but it works I have no idea what happened auth.settings.login_url = URL('school','index?school=' + database) auth.settings.login_next = URL('school','index?school=' + database) auth.settings.logout_next = URL('school','index', vars=dict(school=database)) I tried this bef

[web2py] post login redirection doesn't work

2012-09-21 Thread Yebach
Hello I put my working web2py app to production on linux server Everything works except the login_next redirection This is my code on my cmp auth.settings.login_url=URL('school','index?school=' + database) auth.settings.logout_next = URL('school','index', vars=dict(school=database)) and it w

Re: [web2py] web2py inserting values into sessions

2012-09-21 Thread Bruno Rocha
On Fri, Sep 21, 2012 at 7:20 AM, Yebach wrote: > Yes I know but have to insert it in a view, because using javascript there > is where I select a value from drop down. The problem is that the value is > not inserted and cannot be read in model Ajax is the only way (or cookies) This goes in t

Re: [web2py] How to use select2 with web2py

2012-09-21 Thread Johann Spies
Hallo Bruno, Plugin Admin uses it. > > Thanks. I will try it. > > https://github.com/rif/web2admin/blob/master/views/plugin_web2admin/w2a_layout.html > > > > What is your jQuery version? > > > 1.8.0 (the version that is part of the nightly build of web2py). I was wondering about the jquery ve

Re: [web2py] How to use select2 with web2py

2012-09-21 Thread Bruno Rocha
Plugin Admin uses it. https://github.com/rif/web2admin/blob/master/views/plugin_web2admin/w2a_layout.html $("#masterSearch").select2({ placeholder: "Search", width: "200px", minimumInputLength: 3, ajax: { url: "{{=URL('plugi

[web2py] How to use select2 with web2py

2012-09-21 Thread Johann Spies
I am not winning in my effort to use select2. I need a tool that can select mulitlple entries in what would be a straight forward IS_IN_DB() situation except that it must be able to handle lists of up to 30 entries. >From what I have read about select2 it might be the correct tool, and so

Re: [web2py] web2py inserting values into sessions

2012-09-21 Thread Yebach
Yes I know but have to insert it in a view, because using javascript there is where I select a value from drop down. The problem is that the value is not inserted and cannot be read in model On Friday, September 21, 2012 12:07:28 PM UTC+2, Johann Spies wrote: > > On 21 September 2012 10:50, Yeba

Re: [web2py] web2py inserting values into sessions

2012-09-21 Thread Johann Spies
On 21 September 2012 10:50, Yebach wrote: > I am having problems with session > > After a user selects smth from drop down menu I have to insert that value > to session. > I need that value to get to the database for auth tables in model (it > crashes when I go to login/register form if I read fr

[web2py] web2py inserting values into sessions

2012-09-21 Thread Yebach
I am having problems with session After a user selects smth from drop down menu I have to insert that value to session. I need that value to get to the database for auth tables in model (it crashes when I go to login/register form if I read from request.var). Where do I insert the value in sess