Re: [web2py] Re: How do I import `gluon.dal` from Python shell?

2015-07-21 Thread Abhishesh Sharma
Start web2py in shell mode: python web2py.py -M -S name_of_web2py_application here, *name_of_web2py_application* is an application under web2py/applications/ folder We can also access the database of this application using this In this shell we can import gluon, db etc from gluon.tools import

[web2py] Server CAS

2015-07-21 Thread Laurent Lc
Hi, I have a central server https://cas.monuniversite.fr I would like to use it as i do with phpcas for example. Could you tell me how to do : eg: 1. modify the model db and add .. 2. crate a controller and add 3. modify apache .. I am a beginner so ... i ve read the doc but i do not

[web2py] Re: smartgrid multiple links to related table - how to suppress all but one

2015-07-21 Thread Ariya Owam-aram
Hi Cliff, Any update for this. Thanks. เมื่อ วันจันทร์ที่ 1 เมษายน ค.ศ. 2013 22 นาฬิกา 18 นาที 49 วินาที UTC+7, Cliff Kachinske เขียนว่า: Opened issue 1423 https://code.google.com/p/web2py/issues/detail?id=1423thanks=1423ts=1364829473 On Monday, April 1, 2013 10:11:59 AM UTC-4, Cliff

[web2py] Tutorial bootstrap+web2py

2015-07-21 Thread Paolo Amboni
Can someone point me to a *comprehensive tutorial* (or a group of tutorial) on how to customize web2py using bootstrap themes? If I past a theme in bootstrap.mon.css my app always use the black theme.! Which are the relations between web2py.css, web2py-bootstrap3.css, bootstrap.min.css and

Re: [web2py] Re: Field('upload') : problem with file name

2015-07-21 Thread Richard Vézina
Scott, you can improve the documentation if you feel it need to : https://github.com/mdipierro/web2py-book I think we can't be responsible for all the issue related to filesystem differencies... I think Massimo is really kind to pin point the issue like that... And since we have the information

[web2py] Re: Use wkhtmltopdf in web2py

2015-07-21 Thread Alessio Varalta
Today I try thanks very much On Monday, July 20, 2015 at 8:14:40 AM UTC+2, Ariya Owam-aram wrote: Hi Alessio If you call from Apache then you can call subprocess directly from webserver but in nginx you have to use schedule task. Better to run wkhtmltopdf via schedule task in case of

[web2py] Re: How to use user_bar() in Welcome app - custom login menu navbar

2015-07-21 Thread jak
jak jtaclendo@... writes: Rob_McC mrmccormack at ... writes: Thanks for help guys.I think I must have added that to default.py at some point, while trying to learn to cusomize a navbar http://127.0.0.1:8000/admin/default/edit/welcome/controllers/default.pySorry for

[web2py] Re: Field('upload') : problem with file name

2015-07-21 Thread Scott Hunter
I'm sorry, I wasn't clear. I was asking about the lack of documentation: was there a decision not to document this (if so, I'd be curious as to its basis), or was it just an oversight that will hopefully be remedied in the future? - Scott On Tuesday, July 21, 2015 at 10:41:55 AM UTC-4,

[web2py] Re: Server CAS

2015-07-21 Thread Derek
Every web2py application is a CAS provider and can optionally be a CAS consumer. So any application you have which uses authentication IS a CAS provider. This is in the book, which you have read. http://web2py.com/books/default/chapter/29/09/access-control On Tuesday, July 21, 2015 at 8:41:06

[web2py] Re: import csv file into table

2015-07-21 Thread Derek
I would first suggest you export to csv (even a blank table) and then you will know the headers you need for your file. On Tuesday, July 21, 2015 at 12:07:34 AM UTC-7, Yebach wrote: Hello I would like to import csv file into a database table - user imports how do you recommend to do it. I

[web2py] Re: Server CAS

2015-07-21 Thread Derek
also see here: http://web2py.com/books/default/chapter/29/09/access-control#Central-Authentication-Service Running a web2py CAS provider is as easy as copying the scaffolding app. In fact any web2py app that exposes the action ## in provider app def user(): return dict(form=auth()) is a CAS

[web2py] How to trigger some function for all sessions (which are logged in) when some event happens?

2015-07-21 Thread Shivam Kakkar
I want to asynchronously send updates to all logged in users when some event happens(events like user pressing a buzzer). Polling for updates for every client after a fixed time interval will unnecessarily burden the server. I found this app which does asynchronous server side updates using

[web2py] response.render in controller raises NameError

2015-07-21 Thread David Zejda
Hi :) I would like to run one app on more domains and allow users to apply per-domain specific skins. E.g. default/index.html should be extending layout_xyz.html for domain xyz.com, but layout_abc.html for domain abc.com. As covered in the documentation, conditional {{extend}} does not work.

[web2py] response.render in controller raises NameError

2015-07-21 Thread Anthony
Your context is an empty dict, so the template doesn't see any of the usual globals. Anyway, this approach is unnecessary. The argument to extend can be a Python expression, do just use the extendtempl variable in the extend statement in the view. The only drawback is that you won't be able to

[web2py] How to trigger some function for all sessions (which are logged in) when some event happens?

2015-07-21 Thread Anthony
Look into gluon/contrib/websocket_messaging.py. -- 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) --- You received this message because you are subscribed to

Re: [web2py] Re: import csv file into table

2015-07-21 Thread Vid Ogris
I forgot to saay that I have an sqlformgrid in whoch i am importing On Jul 22, 2015 1:43 AM, Derek sp1d...@gmail.com wrote: I would first suggest you export to csv (even a blank table) and then you will know the headers you need for your file. On Tuesday, July 21, 2015 at 12:07:34 AM UTC-7,

[web2py] Re: How to use user_bar() in Welcome app - custom login menu navbar

2015-07-21 Thread jak
Rob_McC mrmccormack@... writes: Thanks for help guys.I think I must have added that to default.py at some point, while trying to learn to cusomize a navbar http://127.0.0.1:8000/admin/default/edit/welcome/controllers/default.pySorry for confusion.At any rate,I took Massimo's

[web2py] import csv file into table

2015-07-21 Thread Yebach
Hello I would like to import csv file into a database table - user imports how do you recommend to do it. I guess telling users to set the column names matching the headers in CSV but how do i match them after for import. I also have to add two fields with user id and another one that is based

Re: [web2py] Re: Building desktop apps with web2py ??

2015-07-21 Thread Richard Vézina
Interresting article Anthony, thanks for sharing... :) Richard On Mon, Jul 20, 2015 at 4:41 PM, Anthony abasta...@gmail.com wrote: Some interesting points made here: https://medium.com/@collinmathilde/why-desktop-apps-are-making-a-comeback-5b4eb0427647 On Monday, July 20, 2015 at 4:23:37

Re: [web2py] Re: What if Massimo got hit by a Bus?

2015-07-21 Thread Iuri Guilherme dos Santos Martins
Seriously, as long as people keep things well documented, public free software is always useful for something. Take for instance the Linux project. When Linus get hit by a bus, or by the natural derivations of life for what it matters, the project will probably start to behave differently,

Re: [web2py] Re: What if Massimo got hit by a Bus?

2015-07-21 Thread Richard Vézina
So, web2py is a cure... :D I wish you a quick recovery! Richard On Tue, Jul 21, 2015 at 9:56 AM, Iuri Guilherme dos Santos Martins aindatenhoco...@gmail.com wrote: Seriously, as long as people keep things well documented, public free software is always useful for something. Take for

[web2py] Re: Field('upload') : problem with file name

2015-07-21 Thread Massimo Di Pierro
web2py renames the uploaded filenames as tablename+code+hash.extension The total len(tablename+code+hash+extension)=512 This means len(hash) = 512 - len(tablename+code+extension) The hash is a base64 encoded of the original filename. If this hash exceeds 512 - len(tablename+code+extension) the

[web2py] Re: import csv file into table

2015-07-21 Thread Massimo Di Pierro
if your CSV has col names that match a table field names (as defined in web2py's db.define_table) you simply do db.define_table('workers',Field('w_organisation'),, migrate=False) db.workers.import_from_csv_file(open('filename.csv')) migrate=False because I assume the table already exists