[web2py] Re: Setting a default value for a reference field

2020-09-19 Thread mostwanted
IS_IN_DB(db, 'cal_day.id', '%(id)s %(name)s', zero='Select a > day'), ondelete='RESTRICT', notnull=True, label='Day *'), > > Doesn't zero = '*Whats your place of operations?'* do what you want? > > > Annet > Op vri

[web2py] Setting a default value for a reference field

2020-09-18 Thread mostwanted
Is there a way to create a placeholder for a reference field? e.g: {{ *Field('place', 'reference locations', label=SPAN('Place of operations'), widget=lambda field, value: SQLFORM.widgets.reference.widget(field, value, _placeholder="Whats your place of opera

[web2py] Re: Having a function always running in the background

2020-09-02 Thread mostwanted
n send them. > > Does that help? > > (or, please correct me if my understanding of your problem is still off) > > -Jim > > > On Tuesday, September 1, 2020 at 11:59:02 AM UTC-5, mostwanted wrote: >> >> Hey Jim, I'm failing to understand the scheduler, please if

[web2py] Re: Having a function always running in the background

2020-09-01 Thread mostwanted
ia session and of course via the database. If you have no > output in the DIV, the user won't see anything about your mailer. > > Could this be an solution for you? If yes, do you know what to do or do > you need more detailed information? > > Regards > Clemens > > On

[web2py] Re: Having a function always running in the background

2020-09-01 Thread mostwanted
> redis-queue? But, they are a bother because then you have more services > you need to grok, start up and manage. The web2py scheduler takes care of > all of that for you. Let me know if you want to see a sample of how we > handle it. > > -Jim > > > On Tuesday, Septe

[web2py] Having a function always running in the background

2020-09-01 Thread mostwanted
e my question is clear. Regards; Mostwanted -- 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 the Go

Re: [web2py] Voting & Rating

2020-08-25 Thread mostwanted
๐Ÿ˜‚ ๐Ÿ˜‚ ๐Ÿ˜‚ ๐Ÿ˜‚ ๐Ÿ˜‚ ๐Ÿ˜‚ Ok Ramos, I'll put in some effort On Tuesday, August 25, 2020 at 6:56:22 PM UTC+2 Ramos wrote: > If the vote was made by a logged in user you should find it in the db > right ? > > Em ter., 25 de ago. de 2020 ร s 17:31, mostwanted > escreveu: > >

[web2py] Voting & Rating

2020-08-25 Thread mostwanted
in. Regards; Mostwanted -- 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 the Google Groups "w

[web2py] Re: Add to home screen

2020-08-24 Thread mostwanted
Hey guys i'm still struggling with the *add to home screen* prompt, please look at my code above & suggest something. Help me to get this to work. I really need this functionality, please help me. Regards; Mostwanted On Friday, May 29, 2020 at 12:46:38 AM UTC+2 mostwanted wrote: >

[web2py] Sending smses via my web2py

2020-08-05 Thread mostwanted
gluon.contrib.sms_utils import SMSCODES, sms_email email = sms_email('+000 (00) 000-000','Orange') mail.send(to=email, subject='sms test', message='testing testing 123') Regards Mostwanted -- Resources: - http://web2py.com - http://web2py.com/book (Document

[web2py] Re: WAF2PY 1.0

2020-08-03 Thread mostwanted
Complements Chris, this is really impressive work. I see you have tested on debian is it platform specific or will it run on any OS? On Monday, August 3, 2020 at 8:25:23 AM UTC+2, Christian Varas wrote: > > Hello all. > I'm glad to announce WAF2PY 1.0 ๐ŸŽ‰๐ŸŽ‰๐ŸŽŠ > > *What is this?* > > WAF2PY is a Web

[web2py] Machine learning in web2py

2020-08-02 Thread mostwanted
Has anyone applied some machine learning to their web2py projects? I wanna apply some recommendations capabilities to my app but i dont know how its gonna work out, if there are any example projects I'd appreciate the direction. Regards; Mostwanted -- Resources: - http://web2py.com -

[web2py] Re: solving '\x00'

2020-08-01 Thread mostwanted
nuck into your db. Can you write a > quick python script to scan through the data in all your tables to see > which records won't pickle? > > -Jim > > On Saturday, August 1, 2020 at 12:23:04 AM UTC-5, mostwanted wrote: >> >> Hey Jim, thats the traceback below

[web2py] Re: solving '\x00'

2020-07-31 Thread mostwanted
s\dal\pydal\migrator.py", line 323, in create_table sql_fields_old = pickle.load(tfile) File "pickle.py", line 1384, in load File "pickle.py", line 864, in load KeyError: '\x00' On Friday, July 31, 2020 at 8:12:10 PM UTC+2, Jim S wrote: > >

[web2py] solving '\x00'

2020-07-31 Thread mostwanted
dding *db* *.define_table(, migrate=True)?*Regards; Mostwanted -- 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 sub

[web2py] Re: How to force a redirect to login page when session expires

2020-07-29 Thread mostwanted
ut'], vars=dict(_next=URL('index')))}}"; } else { setTimeout(refresh, refreshrate); } } setTimeout(refresh, refreshrate); refresh(); On Thursday, July 30, 2020 at 5:57:19 AM UTC+2, mostwanted wrote: > > The answer is he

[web2py] Re: How to force a redirect to login page when session expires

2020-07-29 Thread mostwanted
rchin/web2py/expiration%7Csort:date/web2py/um2Ll4vmNH4/VnYX4veOAwAJ>should > > help > > > On Wednesday, 29 July 2020 08:41:46 UTC+1, mostwanted wrote: >> >> Hi guys, is there a way to force a redirect to a login page when a >> session expires to prevent users fr

[web2py] How to force a redirect to login page when session expires

2020-07-29 Thread mostwanted
Hi guys, is there a way to force a redirect to a login page when a session expires to prevent users from entering values in a page with an expired session? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.g

[web2py] Re: How to prevent submitting form details that already exist as a record in the database

2020-07-23 Thread mostwanted
ts. > > > On Thursday, 23 July 2020 12:50:00 UTC+1, mostwanted wrote: >> >> Well the whole concept behind this application was that allocation of >> spaces in time, days & class rooms should be automatic, the user should >> just select the lecturer, the

[web2py] Re: How to prevent submitting form details that already exist as a record in the database

2020-07-23 Thread mostwanted
th random choices seems > strange. > Why not ask the user to specify a date and then show him which classes are > available nearest that date/time? > He can then choose one of those. > > > On Wednesday, 22 July 2020 19:04:27 UTC+1, mostwanted wrote: >> >> Afte

Re: [web2py] Starting 2 web2py standalone applications at the same time

2020-07-23 Thread mostwanted
Is there a way to define the port in a bat script that launches the app? On Thursday, July 23, 2020 at 9:16:28 AM UTC+2, AGRogers wrote: > > I think you just need to run each on a different port. > > On Thu, 23 Jul 2020, 3:57 pm mostwanted, > > wrote: > >> Hi Guys,

[web2py] Altering details of a rejected form automatically for another save attempt without the user's interference

2020-07-22 Thread mostwanted
(db.lecture).select() form=SQLFORM(db.lecture) if form.process(onvalidation=my_validator).accepted: response.flash=T('Submitted') return locals() This is the concept thats in my head, where can I fix it? Regards; Mostwanted -- Resources: - http://web2py.com -

[web2py] Starting 2 web2py standalone applications at the same time

2020-07-22 Thread mostwanted
get bumbled up together the computer cant differentiate between the two. Regrads; Mostwanted -- 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

[web2py] Re: How to prevent submitting form details that already exist as a record in the database

2020-07-22 Thread mostwanted
After a form has failed to save because that information already exists in the database I wanna try & alter the value that determines a day where the info is saved in the db for the form to be saved in a different day that does not contain similar form details currently attempting to be saved an

[web2py] Re: How to prevent submitting form details that already exist as a record in the database

2020-07-21 Thread mostwanted
Impressive outlook Villas, thank you. On Tuesday, July 21, 2020 at 12:16:29 PM UTC+2, villas wrote: > > Your my_validator function iterates through the whole table. This is OK > when you have a few records, but very inefficient if you have > thousands/millions. Why not simply query the table?

Re: [web2py] web2py book error ImportError: Requires pygments module, but it is not available

2020-07-20 Thread mostwanted
> the python version you're using. In this way web2py's book application will > be able to use it ;-) > > Nico > > > Il giorno lun 20 lug 2020 alle ore 10:53 mostwanted > ha scritto: > >> I have downloaded the web2py book app but when I try to

Re: [web2py] web2py book error ImportError: Requires pygments module, but it is not available

2020-07-20 Thread mostwanted
y web2py's book application will > be able to use it ;-) > > Nico > > > Il giorno lun 20 lug 2020 alle ore 10:53 mostwanted > ha scritto: > >> I have downloaded the web2py book app but when I try to open from my >> laptop i get this error flashing: &

[web2py] web2py book error ImportError: Requires pygments module, but it is not available

2020-07-20 Thread mostwanted
I have downloaded the web2py book app but when I try to open from my laptop i get this error flashing: *web2py book error ImportError: Requires pygments module, but it is not available!* I am using web2py Version 2.20.4, how do I resolve it? Regards; Mostwanted -- Resources: - http

Re: [web2py] display items only entered by a logged in user in a dropdown menu of a reference table

2020-07-19 Thread mostwanted
uble session', 'evening single session', 'evening double session'], zero='Select A Session Period')), Field('the_time2', readable=False, writable=False), Field('class_room', requires=IS_IN_SET(['500',

[web2py] display items only entered by a logged in user in a dropdown menu of a reference table

2020-07-19 Thread mostwanted
27;, '505', '506'], zero='---Select A Class Room---')), Field('controller', readable=False, writable=False), Field('posted_by', 'reference auth_user', default=auth. user_id, readable=False, writable=False))

[web2py] Re: How to prevent submitting form details that already exist as a record in the database

2020-07-19 Thread mostwanted
Thank you On Saturday, July 18, 2020 at 10:16:09 PM UTC+2, Dave S wrote: > > > > On Friday, July 17, 2020 at 2:38:43 AM UTC-7, mostwanted wrote: >> >> Hey Dave, thanks for replying, >> This below is what I tried & it seems to be working, idont know if the >&g

[web2py] Re: How to prevent submitting form details that already exist as a record in the database

2020-07-17 Thread mostwanted
t: bold;") def index(): details=db(db.lecture).select() form=SQLFORM(db.lecture) if form.process(onvalidation=my_validator).accepted: response.flash=T('Submitted') return locals() On Friday, July 17, 2020 at 8:12:17 AM UTC+2, Dave S wrote: > > > >

[web2py] How to prevent submitting form details that already exist as a record in the database

2020-07-16 Thread mostwanted
with a flag message that warns the system user of a conflict thats causing failure to submit. (I have it in my head but i'm failing to put it on code) Regards; Mostwanted -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web

[web2py] Re: how to update a database field with a random value selected from a list using random.choice()

2020-07-16 Thread mostwanted
This is very impressive Villas, you see, this is what I meant by a better way of doing this, thank you. On Thursday, July 16, 2020 at 11:56:01 AM UTC+2, villas wrote: > > Hi Mostwanted > We always can optimise our code. > The dict could have keys for each possible session. Then y

[web2py] Re: how to update a database field with a random value selected from a list using random.choice()

2020-07-15 Thread mostwanted
ated. On Wednesday, July 15, 2020 at 11:20:01 PM UTC+2, villas wrote: > > We all have our styles of programming. I would probably create a dict of > times. > But any idea which works is fine. Everyone looks at their old code and > sees a better way. > My motto is: get something

Re: [web2py] Re: how to update a database field with a random value selected from a list using random.choice()

2020-07-15 Thread mostwanted
>> sees a better way. >> My motto is: get something working and move on! >> >> >> >> On Wednesday, 15 July 2020 19:26:33 UTC+1, mostwanted wrote: >>> >>> Thank you Villas, i updated my controller like this & its giving >>> resu

[web2py] Re: how to update a database field with a random value selected from a list using random.choice()

2020-07-15 Thread mostwanted
: evening_double_session_times=['1730-1930'] the_time=random.choice(evening_double_session_times) form.vars.the_time2=the_time @auth.requires_login() def index(): form=SQLFORM(db.lecture) if form.process(onvalidation=my_form_processing).accepted: re

[web2py] how to update a database field with a random value selected from a list using random.choice()

2020-07-15 Thread mostwanted
me ''' if db.lecture.class_session=='single session': the_time=random.choice(single_session_times) db.lecture.session_time.default=the_time elif db.lecture.class_session=='evening single session': the_time=random.choice(evening_single_session_times)

Re: [web2py] Setting options in IS_IN_SET() as links to pages with more links

2020-07-10 Thread mostwanted
tp://loudev.com/) > "We strongly suggest using the jQuery multiselect plugin to render > multiple fields." > > It's designed for multiselect obviously but i don't see why it > couldn't be adjusted to be used as a nice way of searching for and > selecting a si

[web2py] Setting options in IS_IN_SET() as links to pages with more links

2020-07-09 Thread mostwanted
7;---Select Level of Study---')))* If the above is not possible at all whats an alternative to solving my challenge (With exaples please ๐Ÿ˜Š) Regards; Mostwanted -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - http

[web2py] Having a user belong to 2 groups with different priviledges

2020-06-17 Thread mostwanted
; Mostwanted -- 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 the Google Groups "web2py-users"

[web2py] Re: invalid literal for long() with base 10: when linking 2 tables

2020-06-12 Thread mostwanted
at the inner-joins I just dont get how I can apply them here, a small example with regards to issue would go a long way. Thank you ๐Ÿ˜Š On Friday, June 12, 2020 at 9:49:04 AM UTC+2, Dave S wrote: > > > > On Thursday, June 11, 2020 at 8:55:16 AM UTC-7, mostwanted wrote: >> >>

[web2py] invalid literal for long() with base 10: when linking 2 tables

2020-06-11 Thread mostwanted
ial_place form=SQLFORM(db.temperatures) if form.process().accepted: response.flash=T('Temp Recorded') return locals() But this gives me an error: invalid literal for long() with base 10: I read somewhere that this occurs because *reference fields are intended to store

[web2py] How to clear a list in a view with jquery

2020-06-06 Thread mostwanted
I achieve this because? Regards; Mostwanted -- 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

[web2py] Re: Changing my datetime from UTC to local time

2020-06-04 Thread mostwanted
readable=False, writable=False), . . . Regards; Mostwanted On Wednesday, June 3, 2020 at 8:22:00 PM UTC+2, mostwanted wrote: > > > Hi guys has anyone ever tried this solution by Massimo & Nyphold ( > http://luca.dealfaro.org/code/web2py-recipes/utc-to-loc

[web2py] Changing my datetime from UTC to local time

2020-06-03 Thread mostwanted
ewhere in the Layout): * {{if is_timezone_unknown:}} $(function() { var tz_name = jstz.determine(); $.get("{{=URL('default', 'set_timezone')}}", tz_name); }); {{pass}} I wanna believe this is how this solution is used but I am not getting results!

[web2py] Re: How do i get mu download function to download my image with its original name

2020-06-03 Thread mostwanted
Thank you Dave, I'm just seeing you reply today but totally appreciated. On Friday, April 24, 2020 at 8:59:05 AM UTC+2, Dave S wrote: > > > > On Saturday, April 18, 2020 at 8:57:59 AM UTC-7, mostwanted wrote: >> >> I want to download an image but i want it to

[web2py] Re: Add to home screen

2020-05-28 Thread mostwanted
zes": "144x144", "type": "image/png" }, { "src": "/init/static/images/icon_152x152.png", "sizes": "152x152", "type": "image/png" }, { "src": "

[web2py] Add to home screen

2020-05-27 Thread mostwanted
%7Csort:date/web2py/rHBfs1zFG44/gKS6EOmlAgAJ nothing is working, if anyone has a way to achieve this with web2py i'd appreciate your assistance. Regards; Mostwanted -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Displaying images with their title in a for statement in an image slideshow

2020-05-18 Thread mostwanted
e) curr_image=0; show_image(id,curr_image); } //--> {{=title}} ยซ {{for i in range(len(images)):}} {{=i+1}} {{pass}} ยป ย  {{=images[0].title}} Regards; Mostwanted -- Resources: - http://web2py.com -

Re: [web2py] Re: SQLFORM keepvalues - only 1 field

2020-05-07 Thread mostwanted
Nice one On Thursday, April 30, 2020 at 9:14:48 PM UTC+2, Scott Hunter wrote: > > Would this do the job? > > form = SQLFORM.factory(*fields) > if form.process().accepted: > # update the database here > form2 = SQLFORM.factory(*fields) > form2.vars['state'] = form.v

[web2py] How do i get mu download function to download my image with its original name

2020-04-18 Thread mostwanted
* {{for details in details:}} {{=details.name}} *Download Image* {{=details.place}} {{pass}} *DOWNLOAD FUNCTION* def download(): return response.download(request, db) Regards; Mostwanted -- Resources: - http://web2py.com - http

[web2py] Re: Setting a default reference value as that of a specific group the logging in user is a member of

2020-02-25 Thread mostwanted
7;force' the hotel you want by using SQLFORM onvalidation > <http://www.web2py.com/books/default/chapter/29/07/forms-and-validators#onvalidation> > > > > On Tuesday, 25 February 2020 07:28:31 UTC, mostwanted wrote: >> >> I have 2 tables about a hotel, one tab

[web2py] Setting a default reference value as that of a specific group the logging in user is a member of

2020-02-24 Thread mostwanted
GTH(200)), Field('lunch_price'), Field('lunch_details', 'text', requires=IS_LENGTH(200)), Field('breakfast_price'), Field('breakfast_details', 'text', requires=IS_LENG

[web2py] Re: Substituting an email address with a reference in a web2py emailing form

2020-02-23 Thread mostwanted
if not sent:* *response.flash = 'Error sending message, please use email.' * return dict(form=form) Regards; On Sunday, February 23, 2020 at 8:03:04 PM UTC+2, Scott Hunter wrote: > > What error did it give you? Are you sure `details.email_address` is > defin

[web2py] Re: Substituting an email address with a reference in a web2py emailing form

2020-02-23 Thread mostwanted
I did try it without the quotes & it still gave me an error! On Sunday, February 23, 2020 at 2:59:04 PM UTC+2, Scott Hunter wrote: > > Did you try removing the quotes around the address? > > - Scott > > > > On Saturday, February 22, 2020 at 4:56:04 PM UTC-5, mostwant

[web2py] Substituting an email address with a reference in a web2py emailing form

2020-02-22 Thread mostwanted
7; % form.vars, subject=form.vars.subject, message = '%(message)s \nName: %(name)s \nEmail Address: %(email)s \nCell Number: %(cell_number)s' % form.vars) response.flash = T('Thank you, your form was submitted') #redirect(U

[web2py] Setting a background images with jQuery

2020-02-20 Thread mostwanted
setTimeout(doSlideshow,1000); }); } Even a simple script such as this one cant do it, i'm suspecting there is something wrong with way i'm calling the images, the path i'm giving, please help $(document).ready(function(){ $(".background2").css("backgro

[web2py] Re: Searching by date using SQLFORM.factory

2020-02-19 Thread mostwanted
one has a better way of solving my problem please assist! What I want is to use the {{ rows }} variable in another function like calling it in another function but I cant in web2py, i am getting an error, maybe i'm doing it wrong, show me how to do it. Regards; Mostwanted On Thursday,

[web2py] Re: Searching by date using SQLFORM.factory

2020-02-19 Thread mostwanted
pted: q = ((db.birthdays.bornday >= form.vars.start_date) &(db.birthdays.birthday <= form.vars.end_date)) rows = db(q).select() return locals() & it worked, but now I am facing a-little challenge, I want to use he results of rows in another function called clients,

[web2py] Searching by date using SQLFORM.factory

2020-02-19 Thread mostwanted
#x27;) if form.accepts(request): tokens=form.vars.SEARCH.split() query=reduce(lambda a,b:a&b, [db.birthdays.contains(k) for k in tokens]) people=db(query).select(orderby=db.birthdays.Person) else: people=[] return locals() Regards; Mostwanted -- Resources: -

Re: [web2py] list index out of range when removing some fields in SQLFORM.grid & clicking the remaining button

2020-02-15 Thread mostwanted
gt; iโ€™m quite sure that exist a switch like โ€œsearchable=Falseโ€ to disable the > search field. > Usually I get this error when the attribute on sqlform that Iโ€™m trying to > modified does not exist, maybe check the correct Index of the list. > > > Cheers. > > El El sรกb,

[web2py] list index out of range when removing some fields in SQLFORM.grid & clicking the remaining button

2020-02-15 Thread mostwanted
rch button grid[0][1][0][2] = '' #remove clear button .. .. But now when I click on the edit button for the field I want to edit I get an error: list index out of range Whats causing this error & how can I fix it?? Regards; Mostwanted --

[web2py] How i remove the export label in the SQLFORM.grid after removing the exportclasses?

2020-02-15 Thread mostwanted
Hi guys, I was able to remove the export classes *exportclasses=dict(xml=False, html=False, json=False, csv=False, tsv=False, tsv_with_hidden_cols=False, csv_with_hidden_cols=False))* but now the *Export:* label is left all alone, is there a way to remove it??? Regards; -- Resources: - http

Re: [web2py] Displaying only certain fields of choice with SQLFORM(...) update

2020-01-28 Thread mostwanted
tried writable=False > > When a field is marked with writable=False, the field is not shown in > create forms, and it is shown readonly in update forms. If a field is > marked as writable=False and readable=False, then the field is not shown > at all, not even in update forms.

Re: [web2py] Displaying only certain fields of choice with SQLFORM(...) update

2020-01-28 Thread mostwanted
> marked as writable=False and readable=False, then the field is not shown > at all, not even in update forms. > > db.table.var.readable= db.table.var.writable=False > > Em ter., 28 de jan. de 2020 ร s 13:21, mostwanted > escreveu: > >> I did employ this method (db.quotati

Re: [web2py] Displaying only certain fields of choice with SQLFORM(...) update

2020-01-28 Thread mostwanted
, 2020 at 12:50:31 PM UTC+2, Ramos wrote: > > Look in the docs > > http://web2py.com/books/default/chapter/29/07/forms-and-validators > in your controller before showing your form, > > db.yourtable.yourfield.readable=False!!! > > Em ter., 28 de jan. de 2020 ร s 10

[web2py] Displaying only certain fields of choice with SQLFORM(...) update

2020-01-28 Thread mostwanted
for SQLFORM()? I have some fields which only do calculations in my db tables & those are the fields I wanna hide during updates. Regards; Mostwanted -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.goog

[web2py] Re: Saving a view as an file/image

2020-01-27 Thread mostwanted
e a link that when clicked calls the above js function like this: Click to Download as PDF This should convert you view into PDF or Image as per the usage of both liraries. I hope the maintainers of the jsPDF & html2pdf libraries have not made adjustmets that may cause this not to wor

Re: [web2py] Using Ajax Callback() in a delete functions

2020-01-24 Thread mostwanted
. In > this case, the whole DIV with the link will be deleted. > > A typical application is: > > {{=A('click me', callback=URL('myaction'), delete='tr')}} > > in a table. Using the link will perform the callback and delete the table > row. > >

Re: [web2py] Using Ajax Callback() in a delete functions

2020-01-24 Thread mostwanted
aram > see here... > https://groups.google.com/forum/#!topic/web2py/V_e_c7h0l3A > > Em sex., 24 de jan. de 2020 ร s 08:54, mostwanted > escreveu: > >> I have been using the ajax function alot lately, there is a level of >> neatness about it. >> What I wanna do is to

[web2py] Using Ajax Callback() in a delete functions

2020-01-24 Thread mostwanted
():if db(db.quotation.id is not None): redirect(URL('View_Quotation', args=(session.detailsQuote.id))) else:redirect(URL('registeredClients'))return locals()* *VIEW* {{=A('Delete',callback=URL('deleteQuoteItem', args=quote.id)

[web2py] Re: how to LOAD a form with all the necessary details

2020-01-23 Thread mostwanted
{{=A('View Quotation', _href=URL('View_Quotation', args=session.quotation.id))}}* QUOTE A CLIENT You are advised to Quote up to a maximum of 20 items in a single Quotation for a clear and readable Quotation. *{{=LOAD('default',

[web2py] how to LOAD a form with all the necessary details

2020-01-23 Thread mostwanted
r a clear and readable Quotation. *{{=LOAD('default', 'quotationLoad.load', ajax=True)}}* TOP I am not sure if my question is clear, but if I could achieve this it would be great for my application. Or alternatively help me find a way to prevent my page from s

[web2py] Re: Displaying for loop results only once

2020-01-23 Thread mostwanted
Thanks alot Tim, this is all i did: {{for bookings in bookings:}} *Quoted* {{pass}} The red line above replaced alot of clearly unnecessary code! Regards; Mostwanted On Tuesday, January 21, 2020 at 2:26:35 PM UTC+2, Tim Nyborg wrote: > > Simplest fix: use "any" instead: &g

[web2py] Displaying for loop results only once

2020-01-18 Thread mostwanted
; } .blue { background-color: blue; color: white; font-weight: bold; font-size: x-small; } *VIEW* {{for bookings in bookings:}} {{for q in quotes:}} {{quoted=[q.customer.company]}} Quoted {{pass}} {{pass}} Please help!!! Regards; Mostwanted -- Resources: - http://web2py.com - http://web2p

[web2py] Re: Deleting all items of a selecte ID at the same time

2020-01-18 Thread mostwanted
gisteredClients')) return locals() Regards; Mostwanted On Tuesday, January 8, 2019 at 7:44:48 AM UTC+2, mostwanted wrote: > > With regards to validation considering the scope of the app i'm working > on, i will be using @auth.requires_membership() to control and restrict who >

[web2py] Re: Adding the loading gif to my application

2020-01-18 Thread mostwanted
The problem is when i click a link to go to other pages the links only works at loading the gif, they dont re-direct to relevant requested pages! What am i doing wrong? How can I fix it? *loading.load* *LOADING SCRIPT* #loading { visibility: hidden; } $(document).rea

[web2py] Adding the loading gif to my application

2020-01-17 Thread mostwanted
Mostwanted -- 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 the Google Groups "web2py-users&q

[web2py] Re: Calculating a percentage value in the database

2020-01-13 Thread mostwanted
']/* > *100.0**)*float(r['unitPrice']))),* > > > *??* > > > *but why integer?* > *you will have no precision.* > > > > Em segunda-feira, 13 de janeiro de 2020 13:54:25 UTC-3, mostwanted > escreveu: >> >> I'm trying to calc

[web2py] Re: Calculating a percentage value in the database

2020-01-13 Thread mostwanted
7;, compute=lambda r: (float(r['markup'])/100*float(r['unitPrice']))),* On Monday, January 13, 2020 at 6:54:25 PM UTC+2, mostwanted wrote: > > I'm trying to calculate a required percentage value for the entered figure > but i am getting the wrong answer > > Field

[web2py] Calculating a percentage value in the database

2020-01-13 Thread mostwanted
loat(r['unitPrice']))),* Field('markedupPrice', 'float', compute=lambda r: round(float(r['unitPrice' ])+r['markupCalc'])), On the code above I'm getting the markupCalc field wrong and it affects the markedUpPrice value. How can i correctly calcu

[web2py] Is there a way to style a SQLFORM.grid view page

2020-01-08 Thread mostwanted
Hi guys, complements of a new year. I was wondering if there is a way to style the view page of an SQLFORM.grid displayed by the view button? How do I override the default view page styling? Regards; Mostwanted -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http

[web2py] Calculating the number of days from given dates givesa null value!

2019-10-11 Thread mostwanted
trptime(r['returning_date'], '%Y-%m-%d') - datetime.strptime(r[ 'loaning_date'], '%Y-%m-%d')).days)) The highlited field saves a None value which is not what i am trying get!! Please help! Mostwanted -- Resources: - http://web2py.com - http://web2py.com/book (Do

[web2py] Re: Getting a PWA set up based on web2py

2019-10-10 Thread mostwanted
Hi @Valdeck Rowe, i wan to know if this approach worked for you in your PWA development. Were there any developments or changes to this approach? I am asking because i was hoping to use your approach in my desperate attempt at making one of my apps a PWA. Regards; Mostwanted On Wednesday

[web2py] Re: How can I disable SQLFORM.factory() form button after clicking once?

2019-09-27 Thread mostwanted
abled'. If it doesn't work, I think you can try to > use hide(), or prop('disabled', true) > > > On Friday, September 27, 2019 at 6:48:54 AM UTC-4, mostwanted wrote: >> >> I'm using SQLFORM.factory() to capture a specific detail but i want it to

[web2py] How can I disable SQLFORM.factory() form button after clicking once?

2019-09-27 Thread mostwanted
session.ref2=request.vars.Quotation_reference return locals() *VIEW* {{extend 'layout.html'}} $(document).ready(function(){ $('{{=qtnBtn}}').click(function(){ $('{{=qtnBtn}}').attr('disbled', true); }); }

[web2py] Checking the database items and seeing if they satisfy the condition before taking an action

2019-09-20 Thread mostwanted
What i want to achieve is to disable the quantity button in my shopping application that allows buyers to select the number of items they want if their number exceeds the number of available items. In my mind I can only achieve this if i were able to check first the quantity of the items we hav

[web2py] decremental subtraction of values in DB field 2

2019-09-17 Thread mostwanted
to do is to calculate for answer_x by subtracting the previously entered value of reading_x from the newly entered value of reading_x. How can i achive my task? Regards; Mostwanted -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: Determinign what information get displayed based on their content

2019-09-15 Thread mostwanted
Thanks again Paco Bernal, I can finally move on to other things. Regards; Mostwanted On Sunday, September 15, 2019 at 1:01:02 PM UTC+2, Paco Bernal wrote: > > > > * Is there a way i could choose what gets displayed in the view & what >> doesn't get displayed from

[web2py] Re: Why is my if/else statement not working

2019-09-15 Thread mostwanted
the hidden class we pass in the codition was not defined in your solution. Nonetheless it works like a charm. Thank you very much. Regards; Mostwanted On Sunday, September 15, 2019 at 12:30:35 PM UTC+2, Paco Bernal wrote: > > > > Maybe this can help > > > .refill { &g

Re: [web2py] Why is my if/else statement not working

2019-09-15 Thread mostwanted
x27;t know why!!! On Sunday, September 15, 2019 at 9:19:46 PM UTC+2, Dave S wrote: > > > > On Fri, Sep 13, 2019 at 2:31 PM mostwanted wrote: >> >>> This conditional statement should be simple & execute without any >>> issues, I have created a point of Sale

[web2py] Why is my if/else statement not working

2019-09-13 Thread mostwanted
lse { $('span.quantity').css({'color':'green'}); $('.refill').hide(); } }); {{=idx}} {{=p.Quantity}} Please Refill ... ... ... ...

[web2py] Determinign what information get displayed based on their content

2019-09-12 Thread mostwanted
}} But this is a desperate move, if *data-id={{=p.id}} *was in a link then something would probubly happen, maybe, i feel only a pure python script could work here. * Is there a way i could choose what gets displayed in the view & what doesn't get displayed from the database table based on

[web2py] Re: How can I update the record in one table with value entry of another table as soon as the value is entered?

2019-09-12 Thread mostwanted
Sorry @villas its just a bad habit that i have somehow over time gotten used to but i will heed your advice, thank you. Mostwanted On Thursday, September 12, 2019 at 12:43:29 PM UTC+2, villas wrote: > > for item1 in item1: > > I mentioned this to you before -- please do not do this!

[web2py] Re: How can I update the record in one table with value entry of another table as soon as the value is entered?

2019-09-12 Thread mostwanted
ue,price = db.product(key).price) Regards; Mostwanted On Thursday, September 5, 2019 at 7:59:21 AM UTC+2, mostwanted wrote: > > I have a website where I am selling items, what I desperately want to > achieve is to be able to show the buyers the remaining number of each item. > I have 2 ta

[web2py] Re: How can I update the record in one table with value entry of another table as soon as the value is entered?

2019-09-10 Thread mostwanted
) Anyone who can do this better please help. Regards; Mostwanted On Thursday, September 5, 2019 at 8:21:56 AM UTC+2, Dave S wrote: > > > > On Wednesday, September 4, 2019 at 10:59:21 PM UTC-7, mostwanted wrote: >> >> I have a website where I am selling items, what I desp

[web2py] Re: How can I update the record in one table with value entry of another table as soon as the value is entered?

2019-09-05 Thread mostwanted
oiceNo) >From what you said I felt if i could identify the sold items in the sale table and match them against the items in the product table and then from there update those that have the same id. As a concept in my head its easy but implementing it goes side ways: Mostwanted On Thursday

[web2py] How can I update the record in one table with value entry of another table as soon as the value is entered?

2019-09-04 Thread mostwanted
mer buys whatever number of items a new figure showing reduction in number of items should be displayed. Regards; Mostwanted -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] invalid view (default/index) error after uploading app to pythonanywhere

2019-09-03 Thread mostwanted
ow I could rectify this please assist. Regards Mostwanted -- 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 subscri

<    1   2   3   4   5   >