Re: [web2py] What is the code to delete an entry for a query from the database table?

2015-12-14 Thread Selman Kocael
if you want delete person whose id is equal 3: >>> db(db.person.id == 3).delete() http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#count--isempty--delete--update 2015-12-14 9:52 GMT+02:00 RAGHIB R : > As intuitive, 'delete' doesn't match for the keyword for deleti

[web2py] Re: Bug on checkboxes

2015-12-14 Thread Alfonso Serra
Hi Anthony, Thanks again but it isnt working on postback. chk = True if chk: _input = INPUT(_type="checkbox", _name=field.name, _class="checkbox", _value="on", _checked="on") else: _input = INPUT(_type="checkbox", _name=field.name, _class="checkbox", _value="on", _checked="on") Still r

[web2py] Re: Sitemap Question

2015-12-14 Thread Gael Princivalle
Hi Joe. I think you can resolve it by a pattern-based system routes.py configuration. Personally I use a simple parameter-based system routes.py configuration and I think it's difficult with it to obtain an URL like http://www.mydomain.com/sitemap.txt . So I put sitemaps.txt in a static folder

[web2py] Re: Bug on checkboxes

2015-12-14 Thread Alfonso Serra
Hi Anthony, Thanks again but it isnt working on postback. chk = True if chk: _input = INPUT(_type="checkbox", _name=field.name, _class="checkbox", _value="on", _checked="on") else: _input = INPUT(_type="checkbox", _name=field.name, _class="checkbox", _value="on", _checked="on") Still r

Re: [web2py] Re: Bug on checkboxes

2015-12-14 Thread Carlos Correia
On 14-12-2015 08:56, Alfonso Serra wrote: Hi Anthony, Thanks again but it isnt working on postback. | chk =True ifchk: _input =INPUT(_type="checkbox",_name=field.name,_class="checkbox",_value="on",_checked="on") else: _input =INPUT(_type="checkbox",_name=field.name,_class="checkbox",_

Re: [web2py] Re: Bug on checkboxes

2015-12-14 Thread Alfonso Serra
Wow thanks. that was unintuitive since all attributes are prefixed but ye it does work, indeed. Its documented tho, my bad. -- 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] Re: Sitemap Question

2015-12-14 Thread Joe
Hi Gael, Thanks for the reply. Yes, I tried to configure the routes.py file but I couldn't change the URL. I just thought you might know how to do it, so I thought I'd ask. Actually, I have an other post running regarding the URL issue but it's not resolved yet. For example, if I want to have

[web2py] SSL certificates for three different domains/apps

2015-12-14 Thread dirman
I have three apps with their own domain. Am running web2py-nginx on ubuntu 12.04.how and where do i configure SSL for the three different domains -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p

[web2py] Web2py and the Semantic Web question or problem

2015-12-14 Thread Bruce Whealton
Hello, I recently started a course on Web2py on Pluralsight. I was excited to see support for marking up web pages with RDFa. It is a great idea to get more people using the Semantic Web technologies. So, I downloaded the semantic appliance. At first I thought maybe I only n

[web2py] Re: letsencrypt google appengine with web2py

2015-12-14 Thread Jacinto Parga
Solved, thanks. It doesn't have to do with web2py. I solved it just with letsencrypt configuration. El lunes, 7 de diciembre de 2015, 10:24:48 (UTC+1), Jacinto Parga escribió: > > Hi, > > I want to use letsencrypt ssl certificates ( https://letsencrypt.org/ ) > in a web2py application deployed

[web2py] Re: block tags replace the content, but also still print where they stand.

2015-12-14 Thread Encompass solutions
This is the base file {{block page_title}}{{end}} This is the basics of the file that has the block that overwrites. {{block page_title}} History {{end}} {{extend 'base_layout.html'}} It worked, except that I get the "History" in both places. Where the block is in the li and above the except li

[web2py] Re: block tags replace the content, but also still print where they stand.

2015-12-14 Thread Anthony
Put the block after the extend. -- 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] CUSTOM VALIDATOR

2015-12-14 Thread Laurent Lc
Hi i have created a custom validator in the the directory modules *customvalidators.py* class COUNT_TEXT(): def __call__(self, value): size = 25 error = None try: if len(value.split()) > size: error="too much words" except:

RE: [web2py] CUSTOM VALIDATOR

2015-12-14 Thread Saifuddin Rangwala
Your file format should be dos (i.e. every line ends with \r\n). If you vim you should be able to execute :set ff=unix to fix this. Thanks. From: web2py@googlegroups.com [mailto:web2py@googlegroups.com] On Behalf Of Laurent Lc Sent: 14 December 2015 22:06 To: web2py-users Subject: [we

[web2py] jQuery.ajax

2015-12-14 Thread lucas
hello one and all, i know this isn't a web2py question, per se. but you'all are very excellent at helping. so i am asking. so i have this code in a javascript section under head: jQuery.ajax({url: "http://web.fscj.edu/Lukacs/misc/fscj.txt";, dataType: "html", method: "GET", timeout: packe

[web2py] Kudos for the simple_examples + Happy Holidays

2015-12-14 Thread JoeCodeswell
Dear web2py Family, Kudos to you all for the (new to me) "simple examples ". The are at a low enough "level of granularity" so as to be used to *customize an app* as needed by a web developer like me. Thanks for the exegesis. Ha

[web2py] Can someone tell me stepwise how to upload web2py app on pythonanywhere after buying the domain?

2015-12-14 Thread RAGHIB R
Is buying domain from godaddy ok? How do I use that domain in pythonanywhere after that and does pythonanywhere give hosting facilities? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/i

[web2py] Re: Pre-populated Forms

2015-12-14 Thread villas
By 'prototype' I believe he means the record which you wish to use as a 'template'. 1. Find your 'template' record which will be used for setting the default values of the fields in the new record. 2. Set the field.default accordingly. 3. Do not pass a record to SQLFORM. If you do, it will upd

[web2py] Re: Scheduler error: Exception in thread Thread-1 and connection is closed

2015-12-14 Thread kenny c
Sorry for late reply and thank you so much, Niphlod! I am still playing with Scheduler, so I didn't know how I should use it. One more question, I am testing the scheduler to write a csv file from reading JSON formatted data, The scheduler stops at one point, I get "STOPPED" on the terminal

[web2py] Can web2py app be hosted on any other host other than pythonanywhere?

2015-12-14 Thread RAGHIB R
If yes, where else? -- 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-use

[web2py] how can i learn number of row

2015-12-14 Thread xmarx
i want to learn number of rows from Rows object in view. in controller: rows=db(db.test).select() in view: {{=rows.length}} id didn't work. AttributeError: 'Rows' object has no attribute 'length' -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com

[web2py] Re: Can web2py app be hosted on any other host other than pythonanywhere?

2015-12-14 Thread Anthony
On Monday, December 14, 2015 at 1:49:25 PM UTC-5, RAGHIB R wrote: > > If yes, where else? > Any VPS (e.g., Digital Ocean, Linode), Paas (e.g., Heroku, Google App Engine), Iaas (e.g., AWS, Rackspace), and even shared hosting (e.g., WebFaction). In other words, *anywhere*. Anthony -- Resources:

[web2py] Re: how can i learn number of row

2015-12-14 Thread Anthony
len(rows) Anthony On Monday, December 14, 2015 at 1:47:19 PM UTC-5, xmarx wrote: > > i want to learn number of rows from Rows object in view. > > > in controller: > rows=db(db.test).select() > > in view: > > {{=rows.length}} > > id didn't work. > > AttributeError: 'Rows' object has no attribute

[web2py] Re: Scheduler error: Exception in thread Thread-1 and connection is closed

2015-12-14 Thread kenny c
I think it has to do with csvkit since loading big file creates this issue. Thank you as always! Let's go! Web2PY! On Monday, December 14, 2015 at 1:45:25 PM UTC-5, kenny c wrote: > > Sorry for late reply and thank you so much, Niphlod! > > I am still playing with Scheduler, so I didn't know how

Re: [web2py] Re: how can i learn number of row

2015-12-14 Thread Selman Kocael
sorry:) javascript confusion 2015-12-14 21:14 GMT+02:00 Anthony : > len(rows) > > Anthony > > > > On Monday, December 14, 2015 at 1:47:19 PM UTC-5, xmarx wrote: >> >> i want to learn number of rows from Rows object in view. >> >> >> in controller: >> rows=db(db.test).select() >> >> in view: >>

[web2py] How do I upload web2py project on google app engine? I can't get any resource to learn this.

2015-12-14 Thread RAGHIB R
Also, the youtube video went out of my mind as I have never used MAC. Please tell it with context with windows or ubuntu. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Re

Re: [web2py] How do I upload web2py project on google app engine? I can't get any resource to learn this.

2015-12-14 Thread Mathieu Clabaut
/usr/bin/appcfg.py --oauth2 update web2py/ On Mon, Dec 14, 2015 at 8:33 PM RAGHIB R wrote: > Also, the youtube video went out of my mind as I have never used MAC. > Please tell it with context with windows or ubuntu. > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Document

[web2py] Re: letsencrypt google appengine with web2py

2015-12-14 Thread Dave S
On Monday, December 14, 2015 at 4:38:07 AM UTC-8, Jacinto Parga wrote: > > Solved, thanks. It doesn't have to do with web2py. I solved it just with > letsencrypt configuration. > Thanks for posting the followup. It's good too know you aren't sitting there lost; maybe some of the rest of us wi

[web2py] Re: 2 different registration form

2015-12-14 Thread Alessio Varalta
You can simple for example insert the membership with a query and set the right references. For exmpale for the registration you can recovery the id of the user in this way last record or by the form in the controller i think you have form.accept? After yuon can make a query that insert the us

[web2py] Re: 2 different registration form

2015-12-14 Thread Alessio Varalta
For the membership you can create the two field with appadmin and after you have to set the field in Role table where you use the id user that you have recovery and the static id for example > > >> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/w

[web2py] new feature - fabfile - please check it

2015-12-14 Thread DiPierro, Massimo
I included a fabfile in web2py which is derived from some work done by niphlod some time ago. Do you can setup a new server follows (requires pip install fabric): cd web2py fab -H root@host create_user:newuser # create a new user, setup ssh keys, give sudo permissions fab -H newuser@host i

[web2py] nested reference fields in IS_IN_DB validator

2015-12-14 Thread Pierre-Antoine Roiron
Hi, I'm stuck so I think I'll ask some help, considering the ususal searches in this group and book don't help enough considering my beginner level. I'll try to summarize my problem: I'm writing an app to make quotes and invoice for my business which is repairing and making guitars. db.define_t

[web2py] Re: jQuery.ajax

2015-12-14 Thread lucas
ok, i think i figured it out. i just had to go with the " /Lukacs/misc/fscj.txt " part for the url because there are some rules where there are no cross-domain references made. alright, lucas -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: using custom upload button when using SQLFORM

2015-12-14 Thread Jitun John
Here is the Code from the Model defining the table db.define_table('logs_db', Field('case_num'), Field('case_desc'), Field('log_gen_time', writable=False, readable=False), Field('log_uniq_name', writable=False, readable=False, unique

[web2py] How to add security check up for sign up?

2015-12-14 Thread RAGHIB R
One should a get a confirmation mail through enail. How to do that? -- 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

[web2py] How to not show menu bar in certain views and keep the view look normal?

2015-12-14 Thread RAGHIB R
When I remove "{{extend 'layout.html'}}" it looks so dull. I just want to remove the menu bar and nothing else. -- 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

[web2py] Re: Can web2py app be hosted on any other host other than pythonanywhere?

2015-12-14 Thread Gael Princivalle
Hi Raghib. I think what can do the difference between all these hostings is the support. I don't have a large experience but what I can say is that webfaction have a really good support, and the new base SSD plan have a low price and is fast. Regards. Il giorno lunedì 14 dicembre 2015 19:49:2

[web2py] How to hide certain fields from the table in the form?

2015-12-14 Thread RAGHIB R
How do I do that? -- 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] How to edit writable field of Table?

2015-12-14 Thread RAGHIB R
I made both writable and readable false for not showing them in the form. But I need to edit them later on. How do I do that? -- 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] Re: How to edit writable field of Table?

2015-12-14 Thread RAGHIB R
Sorry it is *unwritable On Tuesday, December 15, 2015 at 11:58:27 AM UTC+5:30, RAGHIB R wrote: > > I made both writable and readable false for not showing them in the form. > But I need to edit them later on. How do I do that? > -- Resources: - http://web2py.com - http://web2py.com/book (Docume

[web2py] Why is this not working?

2015-12-14 Thread RAGHIB R
I have created wall.html where users can edit their dp (display picture). And I added extra field for dp in auth: auth = Auth(db) auth.settings.extra_fields['auth_user']= [ Field('dp', type='upload' ), ] wall is: def wall(): form = SQLFORM(db.auth_user.dp).process() return loca

[web2py] How to add security check up for sign up?

2015-12-14 Thread Nico de Groot
Please read the section Access Control in the Web2py book, http://web2py.com/books/default/search/29?search=verify_email Nico -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/lis

[web2py] Why is this not working?

2015-12-14 Thread Nico de Groot
Don't call process() here, see the Web2py book for an example using a form and the full story at http://web2py.com/books/default/chapter/29/07/forms-and-validators Nico -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: How to edit writable field of Table?

2015-12-14 Thread Nico de Groot
You can reset these values in a new controller. In the corresponding view the field will be visible or editable. Nico -- 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

[web2py] Re: How to not show menu bar in certain views and keep the view look normal?

2015-12-14 Thread xmarx
you can edit layout.html. for delete menu you can customize this lines. {{=response.flash or ''}} {{=response.logo or ''}} {{='auth' in globals() and auth.navbar(mode="dropdown") or ''}} {{if response.menu:}} {

[web2py] Re: Why is this not working?

2015-12-14 Thread RAGHIB R
def wall(): form = FORM(INPUT(_type='submit'), _action=(db.auth_user.dp=name)) return locals() I figured out this too doesn't work. Can you please tell me the exact code to upload an image into db.auth_user.dp? On Tuesday, December 15, 2015 at 12:18:38 PM UTC+5:30, RAGHIB R wrote: > > I