Re: [web2py] Re: Auth question

2018-10-25 Thread Rahul
Nope - doesnt help. I commented out all the user functions defined in the controller and # User functions --- '''def login(): return dict(form=auth.login()) def register(): return dict(form=auth.register()) def retrieve_password(): return dict(form=auth.reset_password()) def logout(): retu

Re: [web2py] Re: Unable to update database entry after compute=lambda r: calculation of some field values in the DB

2018-10-25 Thread sandeep patel
I think there is a problem in field type in Days because the default is a string so days have a string value, you are multiplying string with an integer in the computed field. # 1 db.define_table('ClientDetails', Field('CheckIn', 'date', label=SPAN('Check-In Date', _style="font-wei

[web2py] Re: Unable to update database entry after compute=lambda r: calculation of some field values in the DB

2018-10-25 Thread mostwanted
With this one there was no error traceback, the form just failed to submit showed a message that read *Error in form, please check it out *and i do have a field Number_of_Guests i just didnt include it coz i thought i was minimizing the whole code to show what could the root cause of the problem

[web2py] Re: Issue between 2.14.5 and 2.17.2

2018-10-25 Thread Anthony
Are you on the same filesystem/OS? Is it possible your OS sort order is not different, so "_" sorts after the digits instead of before? Try changing 0_imports.py to 00_imports.py. Anthony On Thursday, October 25, 2018 at 11:56:49 AM UTC-4, Annet wrote: > > After upgrading from web2py 2.14.5 to

[web2py] Re: Unable to update database entry after compute=lambda r: calculation of some field values in the DB

2018-10-25 Thread 黄祥
pls show the error traceback, it's hard to know what the root cause. just a quick analyze (guess), perhaps it's no Number_of_Guests field in your table definition, so it can't be calculated best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://

[web2py] Unable to update database entry after compute=lambda r: calculation of some field values in the DB

2018-10-25 Thread mostwanted
I was able to calculate and set some values in the database with compute=lambda r: but when i try to update those entries with SQLFORM() i get an error in the form and nothing is saved! What could be causing this and how can i fix it? *MODEL:* db.define_table('ClientDetails',

Re: [web2py] Re: qrcode

2018-10-25 Thread isi_jca
Hi!!! I solved the problem using reportlab https://www.reportlab.com/docs/reportlab-userguide.pdf Look at this examples, http://www.web2pyslices.com/slice/show/1562/pdf-with-reportlab http://www.web2pyslices.com/slice/show/1564/pdf-with-reportlab-ii Regards. El viernes, 12 de octubre de 2018,

Re: [web2py] How to strip away and get rid of (… days, 0:00:00) from a value acquired from a date calculation

2018-10-25 Thread mostwanted
It works SP, thank you. Regards: Mostwanted On Thursday, October 25, 2018 at 7:17:03 PM UTC+2, sandeep patel wrote: > > > > > > > > > *You can directly count days from date type.this belongs to datetime > class.db.define_table('hotels',Field('Hotel'), > Field('Bookin', '

Re: [web2py] Issue between 2.14.5 and 2.17.2

2018-10-25 Thread Carlos Cesar Caballero Díaz
Seems you are using os.path.join() without import the os module. Greetings. El 25/10/18 a las 11:56 a.m., 'Annet' via web2py-users escribió: After upgrading from web2py 2.14.5 to 2.17.2 and editing a model file I got the following error: Traceback(most recent call last): File"/Users/iannet/

Re: [web2py] How to strip away and get rid of (… days, 0:00:00) from a value acquired from a date calculation

2018-10-25 Thread sandeep patel
*You can directly count days from date type.this belongs to datetime class.db.define_table('hotels',Field('Hotel'), Field('Bookin', 'date'),Field('Bookout', 'date'), Field('days', compute=lambda r: (r['Bookout']-r['Bookin']).days), Field('guests', 'integer'),Fi

[web2py] How to strip away and get rid of (… days, 0:00:00) from a value acquired from a date calculation

2018-10-25 Thread mostwanted
I have 4 values that have to be calculated together to set a default value for the fifth value, 2 of the 4 values are date values but the problem is that calculating their difference leaves *days, 0:00:00* as part of the answer but i only want the value number they give, is there a way to str

[web2py] Issue between 2.14.5 and 2.17.2

2018-10-25 Thread 'Annet' via web2py-users
After upgrading from web2py 2.14.5 to 2.17.2 and editing a model file I got the following error: Traceback (most recent call last): File "/Users/iannet/web2py/gluon/restricted.py", line 219, in restricted exec(ccode, environment) File "/Users/iannet/web2py/applications/adminmodel/models/

Re: [web2py] Re: mobile friendly login page

2018-10-25 Thread Lovedie JC
Thanks. It looks lovely. Let me try it. On Thu, 25 Oct 2018, 18:14 Christian Varas wrote: > Sorry the image in the previous mails is broken, here is it: > https://imgur.com/a/I1SsGlp > > Cheers > Chris. > > El jue., 25 oct. 2018 a las 10:57, Lovedie JC () > escribió: > >> Works good. >> How abou

Re: [web2py] Re: mobile friendly login page

2018-10-25 Thread Christian Varas
Sorry the image in the previous mails is broken, here is it: https://imgur.com/a/I1SsGlp Cheers Chris. El jue., 25 oct. 2018 a las 10:57, Lovedie JC () escribió: > Works good. > How about app buttons in a single line/row? > Regards > > On Thu, 25 Oct 2018 at 16:22, sandeep patel > wrote: > >> @

Re: [web2py] Re: mobile friendly login page

2018-10-25 Thread Christian Varas
hi, this is my login page, I'm using adminLTE as template, try this example, i might work for you, adminLTE works with boostrap like web2py, so I think that should work. [image: image.png] controller: def user(): return dict(page="Bienvenido", icon="", title="", form=auth()) *this is the vie

Re: [web2py] Re: mobile friendly login page

2018-10-25 Thread Lovedie JC
Works good. How about app buttons in a single line/row? Regards On Thu, 25 Oct 2018 at 16:22, sandeep patel wrote: > @lbjc > Add some margin between the buttons. > you can try this. Add this in user.html file > > .btn{ > margin-left: 10px; > margin-top: 10px; > } > > > Best/ > SP > >

Re: [web2py] Re: mobile friendly login page

2018-10-25 Thread sandeep patel
@lbjc Add some margin between the buttons. you can try this. Add this in user.html file .btn{ margin-left: 10px; margin-top: 10px; } Best/ SP On Thu, Oct 25, 2018 at 6:34 PM mostwanted wrote: > The attachment link gives *error 404* > > On Thursday, October 25, 2018 at 2:06:15 PM UTC+

[web2py] Re: mobile friendly login page

2018-10-25 Thread mostwanted
The attachment link gives *error 404* On Thursday, October 25, 2018 at 2:06:15 PM UTC+2, lbjc...@gmail.com wrote: > > The default login page on the desktop looks absolutely good. The mobile > page,see attached needs some workup. Is there a way to align the buttons? > Regards > -- Resources: - h

Re: [web2py] Re: reference gives error table company has no column named....

2018-10-25 Thread mostwanted
Thanks Lovedie On Thursday, October 25, 2018 at 1:27:08 PM UTC+2, Lovedie JC wrote: > > I noticed on my part,if I can remember, that the error comes because you > are recreating another table. That's why you can rename are restart web2py > and see if it works. > > On Thu, 25 Oct 2018, 13:52 mos

Re: [web2py] Re: Auth question

2018-10-25 Thread Jim S
Having the default user() functions is all you need. I'd try commenting out your 'user' functions. -Jim On Wednesday, October 24, 2018 at 10:59:45 PM UTC-5, Rahul wrote: > > Yes this is in default.py. Please excuse me for my bad code as I am still > experimenting with Auth and not totally fami

[web2py] mobile friendly login page

2018-10-25 Thread lbjc1978
The default login page on the desktop looks absolutely good. The mobile page,see attached needs some workup. Is there a way to align the buttons? Regards -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.goog

Re: [web2py] Re: reference gives error table company has no column named....

2018-10-25 Thread Lovedie JC
I noticed on my part,if I can remember, that the error comes because you are recreating another table. That's why you can rename are restart web2py and see if it works. On Thu, 25 Oct 2018, 13:52 mostwanted wrote: > If i delete it from the database folder and refresh my browser with the > table

Re: [web2py] Re: reference gives error table company has no column named....

2018-10-25 Thread mostwanted
If i delete it from the database folder and refresh my browser with the table using the same name will it not throw the *table exists *error? On Thursday, October 25, 2018 at 11:13:31 AM UTC+2, Lovedie JC wrote: > > I used to get that. Delete the db from the database folder or rename it > brh

Re: [web2py] Re: reference gives error table company has no column named....

2018-10-25 Thread Lovedie JC
I used to get that. Delete the db from the database folder or rename it brhe refresh or restart web2py. On Thu, 25 Oct 2018, 09:36 mostwanted wrote: > When i do all this it gives me error saying table Customer exists! > > On Friday, August 31, 2018 at 2:53:18 AM UTC+2, Anthony wrote: >> >> fake