[web2py] A none responsive If statement in the view

2019-06-11 Thread mostwanted
My task is very simple but its failing, I have some words in the database that i am comparing to a list of words in the view, if any of the words from the database matches those in the view all the details of that word from the database should be displayed in a div in the view but if no word fr

Re: [web2py] A none responsive If statement in the view

2019-06-11 Thread Massimiliano
Your last if is out of the for loop. Try this way (not tested ) {{letters=['Finance', 'Accountant'] for jobs in details: if jobs.category in letters: }} ... {{ else: }} *NO LISTINGS!* {{ pass }} {{ pass }} On Tue, Jun 11, 2019 at 9:04 AM mos

[web2py] Re: Datatables serverside JSON/Ajax

2019-06-11 Thread Leonel Câmara
It's because you're not using the generic.json view and you're also not setting the response.headers content-type to json. I would simply change your function to this which will do everything for you: def manageCareer(): rows = db((db.Career.faculty == db.Faculty.id)&(db.Career.degree == db

Re: [web2py] A none responsive If statement in the view

2019-06-11 Thread mostwanted
Still doesn't give desired results, it only duplicates the *NO LISTINGS* statement! On Tuesday, June 11, 2019 at 9:59:57 AM UTC+2, Massimiliano wrote: > > Your last if is out of the for loop. > Try this way (not tested ) > > {{letters=['Finance', 'Accountant'] > for jobs in details:

[web2py] Re: Datatables serverside JSON/Ajax

2019-06-11 Thread John Bannister
@Leonel .. I think this will work well with client side but not serverside datables but may be wrong. @Cristina: My understanding of serverside processing is that you will need to have a few more items returned to datatables as outlined in the DT docs for serverside processing. Your response

[web2py] Re: A schedule automatic delete from Database

2019-06-11 Thread Dave S
On Monday, June 10, 2019 at 9:52:59 PM UTC-7, mostwanted wrote: > > I am yet to understand how the scheduler works. > > Thanks Dave > > It's simple: the Scheduler runs as an independent process that watches only one thing: the list of queued tasks. When it finds that it is time to run a queu

[web2py] Re: A schedule automatic delete from Database

2019-06-11 Thread Dave S
On Tuesday, June 11, 2019 at 8:20:13 AM UTC-7, Dave S wrote: > > > > On Monday, June 10, 2019 at 9:52:59 PM UTC-7, mostwanted wrote: >> >> I am yet to understand how the scheduler works. >> >> Thanks Dave >> >> > It's simple: the Scheduler runs as an independent process that watches > only one

[web2py] Re: A schedule automatic delete from Database

2019-06-11 Thread mostwanted
Thanks for the elaborate explanation Dave, really means a-lot. On Tuesday, June 11, 2019 at 5:20:13 PM UTC+2, Dave S wrote: > > > > On Monday, June 10, 2019 at 9:52:59 PM UTC-7, mostwanted wrote: >> >> I am yet to understand how the scheduler works. >> >> Thanks Dave >> >> > It's simple: the Sche

[web2py] Re: Form and insertion.

2019-06-11 Thread Dave S
On Monday, June 10, 2019 at 4:42:52 PM UTC-7, Dave S wrote: > > > > On Monday, June 10, 2019 at 4:11:25 PM UTC-7, Quang Lam wrote: >> >> Hi Dave, if i set the mode field to readable false and writable true, how >> i can display the mode field in the view page. i know we can make it >> temporari

Re: [web2py] Generating graph with chartjs

2019-06-11 Thread Dave S
On Sunday, June 9, 2019 at 3:06:01 PM UTC-7, Christian Varas wrote: > > II have this site www.climbersoul.cl using AdminLTE, and I with graphics > too. > https://imgur.com/HQTI1u7 > [image: image.png] > > > you need to include the libraries first: > > https://www.chartjs.org/samples/latest/utils

Re: [web2py] Generating graph with chartjs

2019-06-11 Thread Lovedie JC
I'm following this discussion. Does the chart have a print to image(jpg, png, svg) or pdf? Hicharts does a nice job. Regards On Tue, 11 Jun 2019, 19:25 Dave S wrote: > > > On Sunday, June 9, 2019 at 3:06:01 PM UTC-7, Christian Varas wrote: >> >> II have this site www.climbersoul.cl using AdminLT

[web2py] Hiding grid's columns (SQLFORM.grid) for smaller screen sizes

2019-06-11 Thread Vlad
how would I hide certain fields of the grid generated by SQLFORM.grid() depending on a screen size? normally I would use media breakpoints, but I am not sure how to manage it with SQLFORM.grid, as grid doesn't seem to expose any widgets explicitly... -- Resources: - http://web2py.com - http:/

[web2py] managing users with no email

2019-06-11 Thread Vlad
Trying to figure out how to manage the following: some users will manage themselves. this means that they have email and they log into the system and do whatever they want. other users don't use email (and generally aren't online altogether). so I want an admin to manage them, i.e. they would

[web2py] Re: managing users with no email

2019-06-11 Thread Vlad
seems to me that the ideal solution would be to allow an email field in auth_user to contain something other than email (for example, a phone number). but besides that I am not sure how to relax this requirement on the email field in auth_user, this solution seems to be politically incorrect, a

[web2py] Re: managing users with no email

2019-06-11 Thread Val K
As far as I remember, it is possible add extra fields to auth_user table + you can make your own login form (phone/password) + you can retrieve record (and email that could be a fake) from auth_user, using extra field (phone number) - db(auth_user.phone == form.vars.phone).select(auth_user.ema

Re: [web2py] A none responsive If statement in the view

2019-06-11 Thread Dave S
On Tuesday, June 11, 2019 at 1:57:31 AM UTC-7, mostwanted wrote: > > Still doesn't give desired results, it only duplicates the *NO LISTINGS* > statement! > What did you put where Massimaliano had "..."; that's where you have to show the value. {{=jobs.info}} And to show the No Listing only

[web2py] Re: managing users with no email

2019-06-11 Thread Vlad
sounds like a perfect solution thank you! p.s. I've made one enhancement: instead of fake email I created a catch-all email for the domain, and will instruct the admin to specify a "real" email for a new customer (like "customer.first_name.last_n...@mydomain.com") - it will be a fake, of course

[web2py] Display a list in SQLFORM.grid

2019-06-11 Thread Quang Lam
how could i wrap a list and display it into SQLFORM.grid to ensure there is no characters in the list truncated when displayed Please help -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2

[web2py] Re: web2py on Raspbian and Python 2 or 3?

2019-06-11 Thread Donald McClymont
Why not just use the built in rocket server on a pi? Seems far simpler and performance is always going to be fairly limited given the hardware you are running on? On Saturday, June 8, 2019 at 12:31:28 AM UTC+1, Val K wrote: > > uWSGI is very cool, but since you are on Raspbian maybe gunicorn is

[web2py] Re: Web3py

2019-06-11 Thread 黄祥
since cython3 is needed to successful run 'python3 setup.py install' (detail in prev messages in this thread), just test it to run with cython3 in ubuntu docker, pls ignore, if not plan to support cython3 in the future *steps* apt install -y git python3-pip cython3 cd git clone https://github.com

Re: [web2py] Re: setting up pscycopg2

2019-06-11 Thread Dave S
On Tuesday, June 4, 2019 at 3:42:49 PM UTC-7, Dave S wrote: > >>> Is site-packages the wrong location? > >> That's web2py/applications/myapp/site-packages > > No, it's not. It's just web2py/site-packages. > > I see gluon/packages/dal/pydal/drivers.py attempts to import psycopg2. What's the

Re: [web2py] A none responsive If statement in the view

2019-06-11 Thread mostwanted
Now i am in business!!! This is how i implemented the changes you suggested: {{letters=['Finance', 'Accountant'] found=False for jobs in details: if jobs.category in letters: found=True }} Company: {{=jobs.company}} Post: {{=jobs.post}