[web2py] Re: loging web2py

2016-01-25 Thread eric cuver
Thank you Mr Massimo !! Le lundi 25 janvier 2016 18:49:34 UTC+1, Massimo Di Pierro a écrit : > > increase the default expiration time > > auth.settings.expiration = 1 # seconds > > On Sunday, 24 January 2016 21:45:46 UTC-6, eric cuver wrote: >> >> I think I misspoke I would extend the

Re: [web2py] Re: charts on web2py

2016-01-25 Thread Diego Tostes
thanks! 2016-01-22 1:10 GMT-02:00 Junior Phanter : > Example using just google chart api, without google-charts-plug-in > > on controller > > def chart(): > title="My Chart" > data=XML('[ ["item", "value"], ["apple", 1], ["potato", 1.5], > ["watermelon", 0.5]]')

[web2py] Re: how to force uniqueness on list:reference or compute fields

2016-01-25 Thread Anthony
> this too works : > > db.define_table('fruit_couple', > Field('fru','list:reference fruits', required=True, > unique=True)) > > def ins(): > try: > db.fruit_couple.insert(fru=[10,15]) > result="inserted" > except: > result="rejected" > return

Re: [web2py] Re: Any angular templates?

2016-01-25 Thread António Ramos
check this https://github.com/amberdoctor/angularjs_and_web2py Also consider angular alternatives like ractive or vuejs . Check also Json Web Tokens in we2bpy latest version if you dont want to mix the 2. 2016-01-23 6:31 GMT+00:00 Seraaj Muneer : > You could easily use the

Re: [web2py] Re: download csv and excel file in zip

2016-01-25 Thread Niphlod
reading the api, save() there just takes a filename as an argument. there's a save_virtual_workbook() method that seems to support a similar feature

[web2py] Re: Retrieve value of dictionary in field with requires=IS_IN_SET(dictcionary)

2016-01-25 Thread Fabio Ceccarani
Il giorno sabato 23 gennaio 2016 20:01:37 UTC+1, DenesL ha scritto: > > web2py will only store the key part (1,2,.. or 5) in the category field. > You have to provide the value part for the key:value pairs. > > courses = {1:'Arte',2:'Artigianato',3:'Cucina',4:'sport',5:'informatica'} > >

[web2py] Re: saving multiple forms in a dict and giving them out in the view

2016-01-25 Thread Lucas Schreiber
Thank you for your advise, You a correct, the return is wrong. Sorry about that. Isn't "item" a method of dict? when i try to name every form different, by saving them in a list, i get a 'list assigment index out of range' without saving them in a list and naming evry form the same, no error

[web2py] Re: FOREIGN KEY constraint failed error when "Click to delete" user account

2016-01-25 Thread Massimo Di Pierro
Do you still get the ticket if you remove the logic for the additional form on the profile page? On Sunday, 24 January 2016 21:11:33 UTC-6, Yi Liu wrote: > > Dear fellow w2p users, > > First, thank you so much for providing this great app Web2Py for *free*. > > Recently I updated my app to allow

[web2py] Re: FOREIGN KEY constraint failed error when "Click to delete" user account

2016-01-25 Thread Yi Liu
Thank you for your suggestion, Massimo. I deleted the logic. The only thing under def user() is now: return dict(form=auth()) I also modified the logic in user.html by ''' '''. {{ ''' if request.args(0)=='profile': =H2('Your Filters:') =XML('Note: Filters are logically OR-gates (except

[web2py] Re: loging web2py

2016-01-25 Thread Massimo Di Pierro
increase the default expiration time auth.settings.expiration = 1 # seconds On Sunday, 24 January 2016 21:45:46 UTC-6, eric cuver wrote: > > I think I misspoke I would extend the length of sessions. As facebook or > gmail if we are not disconnected we are connected all the time > > Le

[web2py] Re: web2py on AWS

2016-01-25 Thread Massimo Di Pierro
Mark is right. If you use a VPN like AWS, you are better off setting up a production system using one of the install script provided. For example web2py/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh Notice that if you have the latest web2py and you have installed it locally and you have fabric

[web2py] Re: web2py star rating

2016-01-25 Thread Ron Chatterjee
Since the star rating widget doesn't work, how we get this js to work for example if my database is: db.define_table('song', Field('title'), Field('voice_quality', 'integer',requires=IS_IN_SET(range(0, 6))), Field('highs_and_lows', 'integer',requires=IS_IN_SET(range(0, 6))),

Re: [web2py] Re: web2py on AWS

2016-01-25 Thread Dave S
On Sunday, January 24, 2016 at 10:48:58 PM UTC-8, Mark Graves wrote: > On Mon, Jan 25, 2016 at 12:44 AM, Dave S > wrote: > >> >> >> On Saturday, January 23, 2016 at 12:58:25 PM UTC-8, Mark Graves wrote: >>> >>> Re reading your answer, >>> >>> check the access logs. >>>

[web2py] Re: web2py on AWS

2016-01-25 Thread Dave S
On Monday, January 25, 2016 at 9:52:56 AM UTC-8, Massimo Di Pierro wrote: > > Mark is right. If you use a VPN like AWS, you are better off setting up a > production system using one of the install script provided. For example > > web2py/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh > > This is

Re: [web2py] Re: export data to OOO and Excel

2016-01-25 Thread Vid Ogris
Hello On request from user, I create a CSV file and an excel file. I would like to zip them both without creating additional temp file and serve them together to user. 2016-01-24 20:14 GMT+01:00 Massimo Di Pierro : > Can you tell us more. What do you want to zip?

Re: [web2py] Re: download csv and excel file in zip

2016-01-25 Thread Niphlod
watching at the API (http://xlwt.readthedocs.org/en/latest/api.html) it seems that the save() method accepts a StringIO object. so you just need to create another stream, call save() on it (which will fill it with the needed content) and then use it in the zipfile On Sunday, January 24, 2016 at

Re: [web2py] Re: download csv and excel file in zip

2016-01-25 Thread Vid Ogris
I had to change to openpyxl library Is it any different there? 2016-01-25 11:33 GMT+01:00 Niphlod : > watching at the API (http://xlwt.readthedocs.org/en/latest/api.html) it > seems that the save() method accepts a StringIO object. > so you just need to create another

[web2py] Re: how to force uniqueness on list:reference or compute fields

2016-01-25 Thread Pierre
very nice code Anthony and it works !!! this too works : db.define_table('fruit_couple', Field('fru','list:reference fruits', required=True, unique=True)) def ins(): try: db.fruit_couple.insert(fru=[10,15]) result="inserted" except:

[web2py] logging in a user from encrypted password

2016-01-25 Thread Lou C
I have a user I have fetched from the db(), I want to return this user's JWT token, but to do so I must log them in first. Can I log in a user with auth.password property? valid_user = auth.login_bare(user.username, user.password) if valid_user: payload =