Re: [web2py] Re: ubuntu web2py

2016-02-12 Thread Mirek Zvolský
Yes. Thanks. But I have used the script from current stable version 2.13.4-stable+timestamp.2015.12.26.04.59.39 and that is bad idea. With up-to-date script from web2py respository it probably completly works without problems. But if you use the older version of setup-web2py-nginx-uwsgi-ubuntu.s

[web2py] Info: Good hosting service (virtual server)

2016-02-12 Thread Mirek Zvolský
forpsi.com provides - Webhosting Easy with Python/SQLite 0.8 EUR/month + 1.2 EUR Postgres (I have not tested this one) - virtual server Cloud Smart VPS Small (1G RAM, 20G SDD disk, 50G additional FTP, Debian or CentOS) 1.0 EUR/month. And of course higher level (and more expensive) hosting progra

[web2py] Re: Info: Good hosting service (virtual server)

2016-02-12 Thread Mirek Zvolský
Here you can see response of my nginx-uwsgi-web2py http://81.2.244.50 hope later there will be something different as /welcome -- 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] what is equivalent query related to this in web2py

2016-02-12 Thread prashant joshi
*This is in java* String user = req.getParameter("userName"); String pass = req.getParameter("userPassword"); pw.print(""); if (user.equals("select * from login where userId="+user+"and password"+pass) ) pw.println("Login Success...!"); else

[web2py] what is equivalent query related to this in web2py

2016-02-12 Thread Nico de Groot
Welcome to web2py! In web2py login is handled by the framework. You don't have to write code to create and handle a form and check the login. Please check the book http://web2py.com/books/default/chapter/29/09/access-control Nico de Groot -- Resources: - http://web2py.com - http://web2py.com/b

[web2py] Re: Rows not releasing all the memory back

2016-02-12 Thread Alfonso Serra
you still have alert_rows in memory. it would be for row in alert_rows.exclude ... pass del alert_rows gc.collect() On Friday, 12 February 2016 05:45:49 UTC, Jitun John wrote: > > I am using to remove rows... > > for row in alerts_rows.exclude(lambda row: row.id > 0): > pass > > > On Frida

[web2py] Re: Problems with Upload files

2016-02-12 Thread Val K
Upload field has custom_store param-see https://www.google.ru/url?q=https://groups.google.com/forum/m/%23!topic/web2py/8X-QlbtyxEQ&sa=U&ved=0ahUKEwiL2r_DlvLKAhWBOSwKHYgSDIwQFggNMAA&sig2=WkaSH-wCNyJiXG0Su3f8uA&usg=AFQjCNEu9h6olQktR8ir7Lk7KgBi1y8aoA -- Resources: - http://web2py.com - http://web2p

[web2py] Re: Web2py-appreport

2016-02-12 Thread Anthony Smith
Hi, I gather this plugin is not correct and doesn't work without lots of work. cheers Anthony On Tuesday, 9 February 2016 21:08:46 UTC+11, Anthony Smith wrote: > > Hi Massimo, > > Thanks for you help you can download form here > https://github.com/lucasdavila/web2py-appreport/wiki > > Thanks f

[web2py] Re: alternative autocomplete widget

2016-02-12 Thread tim . nyborg
I've been thinking about doing this exact thing for a while, so I'll be eagerly watching your plugin On Thursday, 11 February 2016 16:18:28 UTC, Carlos Cesar Caballero wrote: > > Hi, right now I am working in a plugin with an autocomplete widget using > typeahead.js: > > https://github.com/daxs

[web2py] Re: Web2py-appreport

2016-02-12 Thread LightDot
I've been using it in production for years, generating quite a few pdfs daily. If I remember correctly, I made only minor modifications for my needs. Can't help with your issue though. Regards On Friday, February 12, 2016 at 1:05:22 PM UTC+1, Anthony Smith wrote: > > Hi, > I gather this plugin

Re: [web2py] Re: ubuntu web2py

2016-02-12 Thread Jim S
I'm confused by which script you're running for installation. When I install web2py on ubuntu I go through the following steps. 1. Install Ubuntu 2. sudo apt-get install git 3. in my home directory -> git clone https://github.com/web2py/web2py.git 4. cd web2py/scripts 5. sudo chmod +x setu

Re: [web2py] Re: alternative autocomplete widget

2016-02-12 Thread Richard Vézina
This is mostly it : # Code in controller @cache('json_feed', time_expire=60) def json_feed(): rows = db().select(db.table_name_all.ALL) options = [] for i, row in enumerate(rows): options.append({'option': row.field_name, 'id': row.id}) from gluon.contrib import simplejson

Re: [web2py] Re: ubuntu web2py

2016-02-12 Thread Mirek Zvolský
Yes! Exactly. You use web2py script from web2py repository (2016, Feb) - this is good idea. I have used web2py script from web2py stable (2015, Dec) - this is bad idea (missing ini file). Dne pátek 12. února 2016 15:25:52 UTC+1 Jim S napsal(a): > > I'm confused by which script you're running

Re: [web2py] Re: ubuntu web2py

2016-02-12 Thread Jim Steil
Thanks for the clarification! I'm looking at the script and working on a mod that will install the systemd init script as well. I'm not real good with shell scripting but will try to get it done. -Jim On Fri, Feb 12, 2016 at 10:45 AM, Mirek Zvolský wrote: > Yes! Exactly. > You use web2py scri

[web2py] Re: Displalay a form in light box or pop up window in view

2016-02-12 Thread billmackalister
In the book it says load in the view. Nothing in the controller. I was just wondering if we can add a button in the view and call the ajax from the view with the argument. If we need to call the LOAD from the view, its {{=LOAD('default','manage_things',ajax=True)}} Then it fails for m_count.

[web2py] Re: File picker

2016-02-12 Thread Val K
http://www.web2py.com/books/default/chapter/29/14/other-recipes#Publishing-a-folder On Tuesday, February 9, 2016 at 5:35:41 AM UTC+3, Heinrich Piard wrote: > > Hi all, > > does anyone have an example of a web button which allows me to browse > through the local file system on the web server to pi

[web2py] Re: Displalay a form in light box or pop up window in view

2016-02-12 Thread Val K
I mean passing args/vars in main_page(): def main_page(): main_pg=DIV() m_cont = LOAD(f='*modal_content**.load*', *args=[ ], vars={ }*, ajax=True, ajax_trap=True ) ... But may be you want to pass something from client side, i.e. args are defined by some user action.

[web2py] Email not working

2016-02-12 Thread Tom Russell
I have since my last time trying to get email sending working with the built in registration process moved to Amazon AWS SES mail services which I know works well with other people. I have put in all the required info in db.py needed but still cannot send an email. I have tried gmail, a few oth

[web2py] Re: Email not working

2016-02-12 Thread Niphlod
web2py uses smtplib. as long as on the other side there's an smtp-compatible interface, there's no reason to blame web2py :P On Friday, February 12, 2016 at 8:38:38 PM UTC+1, Tom Russell wrote: > > I have since my last time trying to get email sending working with the > built in registration pro

Re: [web2py] Re: form.accepts fails with 'links' browser

2016-02-12 Thread Anthony
On Thursday, February 11, 2016 at 11:39:49 PM UTC-5, /dev/sdc3 wrote: > > > OK. Is it useful for me to submit a patch? > Maybe. We would want to confirm that the div is hidden and takes up no space in all (non-text-based) browsers, probably going back to at least IE 7 or 8. > Browser, BTW, i

[web2py] Re: Displalay a form in light box or pop up window in view

2016-02-12 Thread billmackalister
What I have done with your code is change the contoller to be: def main_page(): main_pg=DIV('hello world') m_cont = LOAD(f='modal_content.load', ajax=True, ajax_trap=True ) dialog = modal_wrapper(m_cont, _id='cont_id', header='Header', footer='footer') #show_modal_btn = BUTTON

[web2py] Re: Email not working

2016-02-12 Thread Tom Russell
Yea I am not trying to blame web2py but it just seems I am not having any luck getting an email to send. I am using a smtp interface on the other side. I am just at a loss as to what the issue is and how to solve it. Thanks, Tom On Friday, February 12, 2016 at 2:40:43 PM UTC-5, Niphlod wrote:

Re: [web2py] Re: Displalay a form in light box or pop up window in view

2016-02-12 Thread Валерий Кучеров
OK, but what do you mean under "pass that argument from my view" ? view is processed and rendered to html page at server side, JS runs only on the client side. so, if you can pass arg from veiw (i.e. arg is defined on server side), also you can pass it in main_page(): def main_page():

Re: [web2py] Re: Displalay a form in light box or pop up window in view

2016-02-12 Thread billmackalister
What I mean by passing argument from the view to the controller is this (let us consider in my view): (1) Apply (2) Apply In the above (1) is calling that URL with an argument id. (2) is a button, when I click on that, it goes to the controller function my_controler_def, and in my_controler

[web2py] Re: Displalay a form in light box or pop up window in view

2016-02-12 Thread Dave S
On Friday, February 12, 2016 at 12:04:08 PM UTC-8, billmac...@gmail.com wrote: > > Works fine. Because I see the button and I click and see the pop up. > Great. Only issue is, I need to update the table with my argument. For > example: > > [...] > > So, I need to pass that argument from my view

Re: [web2py] Re: Displalay a form in light box or pop up window in view

2016-02-12 Thread Валерий Кучеров
it's easy: 1. Place modal_wrapper() function in your_web2py_app/modUles named 'my_util.py' (just for example) - you have to import html-helpers in it: from gluon.html import * 2. In view place: ... {{=BUTTON( 'Apply',_type="button",_class = "btn btn-default",_onclick="$('#cont_id').modal('

[web2py] Re: Email not working

2016-02-12 Thread Dave S
On Friday, February 12, 2016 at 12:17:57 PM UTC-8, Tom Russell wrote: > > Yea I am not trying to blame web2py but it just seems I am not having any > luck getting an email to send. I am using a smtp interface on the other > side. > > I am just at a loss as to what the issue is and how to solve

Re: [web2py] Re: Displalay a form in light box or pop up window in view

2016-02-12 Thread billmackalister
You got it to work? Because I get this: default/main_page.html", line 83, in NameError: name 'modal_wrapper' is not defined *Controller is now:* def main_page(): main_pg=DIV('hello world') #m_cont = LOAD(f='modal_content.load', ajax=True, ajax_trap=True ) #dialog = modal_wrapper

Re: [web2py] Re: Displalay a form in light box or pop up window in view

2016-02-12 Thread billmackalister
My bad. I forgot the my_util.py On Friday, February 12, 2016 at 4:10:00 PM UTC-5, Val K wrote: > > it's easy: > 1. Place modal_wrapper() function in your_web2py_app/modUles named > 'my_util.py' (just for example) - you have to import html-helpers in it: > > from gluon.html import * > > 2. In

Re: [web2py] Re: Displalay a form in light box or pop up window in view

2016-02-12 Thread billmackalister
y", line 12, in modal_wrapper close_cross = BUTTON(SPAN(XML('×'), **{'_aria-hidden':"true"}),_type="button", _class="close",data={'dismiss':"modal"},**{'_aria-label':"Close"}) NameError: global name 'BUTTON' is not defined How do I get the BUTTON to work in my_util? O n Friday, Februar

Re: [web2py] Re: Displalay a form in light box or pop up window in view

2016-02-12 Thread billmackalister
Look at that! request.args(0) '1' Thank you Val. This is great. On Friday, February 12, 2016 at 4:25:18 PM UTC-5, billmac...@gmail.com wrote: > > My bad. I forgot the my_util.py > > On Friday, February 12, 2016 at 4:10:00 PM UTC-5, Val K wrote: >> >> it's easy: >> 1. Place modal_wrapper() func

Re: [web2py] Re: Displalay a form in light box or pop up window in view

2016-02-12 Thread billmackalister
I got to tell you...this is way more fun than Django. In django all I am worried using that is the framework and url redirect. Here, the least thing to worry about is framework and I can focus more on the development and logic! Add such a helpful community. Thank you for all your help! On Frid

[web2py] GRID export broken for CSV but not for JSON

2016-02-12 Thread olivier hubert
I implemented a clone of Notifier application from Massimo. If I try to export data from the grid via the grid bottom button I receive an error if I use export to CSV, HTML & TSV but not with JSON or XML. *default.py* @auth.requires_login() def tasks(): db.task.created_on.readable = True

[web2py] Script timed out before returning headers: wsgihandler.py - web2py v2.8.2

2016-02-12 Thread csebranek
Today our alert system notified us that the websites were not accessible. I looked into the apache logs during the time of the website outage and I observed a bunch of these errors: [Fri Feb 12 00:58:05 2016] [error] [client 195.159.183.42] Script timed out before returning headers: wsgihandl

[web2py] Seeking guidance with linked tables and smart grids

2016-02-12 Thread drew Roberts
As I learning exercise I have set up a little volunteer database. You can recreate by doing the following: 1. Create a new simple application called smartgridex 2. At the bottom of db.py paste the following: db.define_table('volunteer', Field('firstname', requires=[IS_NOT_EMPTY()]), Field('

[web2py] Re: web2py Italy

2016-02-12 Thread Massimo Di Pierro
Ma certo! On Thursday, 11 February 2016 08:42:15 UTC-6, Francesco Ronzitti wrote: > > Sarebbe bello fossimo nella lista... > http://www.web2py.com/examples/default/usergroups > > Un saluto a tutti i Devel Ita > > Il giorno mercoledì 18 dicembre 2013 20:57:17 UTC+1, Gael Princivalle ha > scritto:

[web2py] Re: markmin.js

2016-02-12 Thread Massimo Di Pierro
Yes. On Thursday, 11 February 2016 09:02:42 UTC-6, Niphlod wrote: > > hardly 99% it's another markmin version entirely :°°°D > > On Thursday, February 11, 2016 at 3:48:49 PM UTC+1, Massimo Di Pierro > wrote: >> >> For basic thinks like **bold**, ''italic'', ``code``, it is the same. But >>

[web2py] reading from external db

2016-02-12 Thread yarecki wr
I'm quite new to Python and web2py hence when I started a little project for displaying some stats on a website I quickly got to points where I just got stack. I'll describe one hopefully someone would help with and provide some explanations. Basically it work but for the moment mostly manual wh

[web2py] web2py csv files

2016-02-12 Thread Felipe dos Santos Ferreira
Hi guys, I am new to web2py. Recently I was trying to import some data from a csv file to my sqlite database through the web2py admin area. The problem was I had to create several different csv files untilll I've found one which I could import properly. All the others files i've had tried retu

[web2py] Re: what is equivalent query related to this in web2py

2016-02-12 Thread Massimo Di Pierro
That code is vulnerable to SQL injection. Anybody can login without a password with that code. On Friday, 12 February 2016 04:21:50 UTC-6, prashant joshi wrote: > > *This is in java* > > String user = req.getParameter("userName"); > String pass = req.getParameter("userPassword"); >

[web2py] Re: Script timed out before returning headers: wsgihandler.py - web2py v2.8.2

2016-02-12 Thread Jim S
Chad I've seen this problem with nginx and it is due to the nginx and/or uwsgi timeout values being set too low. Do apache/mod_wsgi have similar parms you could adjust? -Jim On Friday, February 12, 2016 at 4:01:40 PM UTC-6, cseb...@wisc.edu wrote: > > > Today our alert system notified us that

[web2py] Re: web2py csv files

2016-02-12 Thread Anthony
You don't need the id field. The best approach might be to add a few dummy records to the table and export to CSV -- then look at the structure of that file. Anthony On Friday, February 12, 2016 at 5:01:41 PM UTC-5, Felipe dos Santos Ferreira wrote: > > Hi guys, > > I am new to web2py. Recentl

[web2py] Re: GRID export broken for CSV but not for JSON

2016-02-12 Thread Anthony
Which version of web2py? On Friday, February 12, 2016 at 5:01:40 PM UTC-5, olivier hubert wrote: > > > I implemented a clone of Notifier application from Massimo. > If I try to export data from the grid via the grid bottom button I receive > an error if I use export to CSV, HTML & TSV but not wit

[web2py] Re: GRID export broken for CSV but not for JSON

2016-02-12 Thread Anthony
This can probably be improved, but the problem is that your grid does not include all the fields needed by the "represent" function (i.e., it is missing the "id" field). You could (a) re-write the represent so it doesn't fail when the "id" field is missing, (b) use one of the "hidden column" do

[web2py] Re: Check to see if a field is in another table in a computed field

2016-02-12 Thread Greg White
At our facility we order a lot of unique items but also have an inventory of some items. I am trying to add some logic that when ordering an item, there is a check to see if the ordered item name is in the inventory (inventory.name). Then person ordering is made aware that a similar item is in