Re: [web2py] Re: wrong record getting selected in recursive select

2016-09-01 Thread brooks lee
The extra space before "if t:" must have caused the syntax error.Sorry,my bad.The code with the correct syntax is as follows: #models/db1.py db.define_table('Restaurant', Field('Name',unique=True), ..

[web2py] Re: does db.rollback() roll back all concurrent users' data?

2016-09-01 Thread Dave S
On Thursday, September 1, 2016 at 6:11:12 PM UTC-7, Alex Glaros wrote: > > does db.rollback() roll back everyone's data in multi-tenant app, or just > that one user's? > > thanks > > Alex Glaros > Inside a transaction (and requests are automatically a transaction), the rollback should only be

[web2py] Re: Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Brian Boatright
so it's just something in the web2py code base that has a problem with the word "items" as a database table name. -- 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] Smartgrid search: How do I search on integers and linked tables?

2016-09-01 Thread Luciano Laporta Podazza
Hello, 1. I noted that Smartgrid does not search on integers unless I select that specific field on the dropdown search widget menu, so I would like to know how to "enable" this by default so users can search by numbers too. 2. On the other hand, I would like to search on linked tables too.

[web2py] does db.rollback() roll back all concurrent users' data?

2016-09-01 Thread Alex Glaros
does db.rollback() roll back everyone's data in multi-tenant app, or just that one user's? thanks Alex Glaros -- 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: Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Dave S
On Thursday, September 1, 2016 at 5:20:36 PM UTC-7, Brian Boatright wrote: > > thanks to Yoel pointing out that "item" works I just changed the table > name to "item" instead of "items" but I would really like to see this issue > fixed or at least explained. it's either a bug or a reserved

[web2py] Re: Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Brian Boatright
thanks to Yoel pointing out that "item" works I just changed the table name to "item" instead of "items" but I would really like to see this issue fixed or at least explained. it's either a bug or a reserved word that isn't being detected correctly. Thanks all for the help so far. --

[web2py] Re: Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Brian Boatright
indeed! I'm new to web2py and python. if I knew a bit more I would try to edit the base.py function for define_table that might give some more details. the error stops right on line 819 of base.py. would be good to have self.tables print out as part of the error or even directly on the page.

[web2py] Re: Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Dave S
On Thursday, September 1, 2016 at 4:09:13 PM UTC-7, Brian Boatright wrote: > > I haven't figured out how to get an interactive console on my windows > machine > -command > BUT I did upload the package to pythonanywhere and used their bash shell. > > The only tables created were the

[web2py] Re: Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Brian Boatright
I haven't figured out how to get an interactive console on my windows machine BUT I did upload the package to pythonanywhere and used their bash shell. The only tables created were the standard authentication tables.

[web2py] Re: profanity filter

2016-09-01 Thread Alex Glaros
thanks Dave, you're right. If you have time, do you see any speed inefficiencies in my code? Trying to improve. for anyone interested, here is extensive bad-word list for many languages: https://github.com/LDNOOBW/List-of-Dirty-Naughty-Obscene-and-Otherwise-Bad-Words -- Resources: -

[web2py] Re: Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Dave S
On Thursday, September 1, 2016 at 3:42:59 PM UTC-7, Brian Boatright wrote: > > just to be sure it wasn't some odd cache issue or something I missed I > created a brand new simple app in the admin called "forum" and created a > new model file models.py and created a very basic items table. > >

[web2py] Re: profanity filter

2016-09-01 Thread Dave S
On Thursday, September 1, 2016 at 3:11:42 PM UTC-7, Alex Glaros wrote: > > thanks Niphlod and Luis. It was always unclear to me how, where, and if > possible, to install packages. So that helps my long-term understanding a > lot. > > For the time being, can anyone please remind me how to

[web2py] Re: Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Brian Boatright
just to be sure it wasn't some odd cache issue or something I missed I created a brand new simple app in the admin called "forum" and created a new model file models.py and created a very basic items table. # -*- coding: utf-8 -*- > db.define_table('items', >

[web2py] Re: profanity filter

2016-09-01 Thread Alex Glaros
thanks Niphlod and Luis. It was always unclear to me how, where, and if possible, to install packages. So that helps my long-term understanding a lot. For the time being, can anyone please remind me how to extract the bad word without braces in controller below? def

[web2py] Re: Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Brian Boatright
I always delete the database in mysql and create it again (no tables). Then delete all the files in the database folder. When it runs again, as far as I know, everything is clean. My connection string is just a simple > uri: mysql://root:password@localhost/project and I don't see anything

[web2py] Re: profanity filter

2016-09-01 Thread Niphlod
definitely the way to go if you can, and I'd also add to learn about virtualenv as soon as you can. for simple packages you may also place their source into site-packages on the web2py root dir (works even with the binaries) Profanity doesn't depend on 3rd party packages, and the source code is

Re: [web2py] Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Yoel Benitez Fonseca
i don't know of "items" but "item" is not a keyword for Python or Web2py ... i'm using it right now in one of my projects: db.define_table('item', # item metadata Field('provider', 'string', length=100, default=''), Field('provider_service', 'string'), Field('pubstatus', 'string',

Re: [web2py] Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Niphlod
items isn't a roblem for check_reserved. On Thursday, September 1, 2016 at 10:14:47 PM UTC+2, Richard wrote: > > > http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=reserved+word#Reserved-keywords > > Do you have it in your connection string? > > You should be

Re: [web2py] Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Richard Vézina
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=reserved+word#Reserved-keywords Do you have it in your connection string? You should be notified that it a mysql reserved word... If not... Have you change database? New empty database sound like you restart

[web2py] Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Brian Boatright
Is "items" a keyword for Python or Web2py? I'm using mysql and having web2py models file define a new table named "items" but it gives me an error that says the table already exists. If I change the name of the table to something like "items2" in the models.py file it works. The mysql

[web2py] Re: SQLForm.grid csv export

2016-09-01 Thread Remco Boerma
Although it's been half a year; for the record, see this post: https://groups.google.com/d/msg/web2py/6W-jf3EPb04/x3hSC5ySCgAJ Op donderdag 28 juli 2016 10:17:50 UTC+2 schreef Ryan Hood: > > Hello, > > > > I'm pretty new to Web2py. I need some help with the SQLForm.grid export > CSV

[web2py] Re: wrong record getting selected in recursive select

2016-09-01 Thread Dave S
On Thursday, September 1, 2016 at 11:47:55 AM UTC-7, @brooks wrote: > > So my question goes as follows: > #models/db1.py > > db.define_table('Restaurant', > Field('Name',unique=True), > .. >

Re: [web2py] Best way to pre-populate a database on start-up

2016-09-01 Thread Richard Vézina
private/* would be a good place to store it. Richard On Wed, Aug 31, 2016 at 3:15 PM, Niphlod wrote: > same deal, "different" organization. > With an external script you can't call that function if not from an > external process. > Having it in a separated controller incurs

[web2py] wrong record getting selected in recursive select

2016-09-01 Thread @brooks
So my question goes as follows: #models/db1.py db.define_table('Restaurant', Field('Name',unique=True), .. ...auth.signature,format='%(Name)s') db.define_table('Menu',

[web2py] redirection using ajax with javascript variables passed in the url.

2016-09-01 Thread @brooks
I am doing the following to pass the javascript variable from the view to the controller: ##default/rough2.html {{extend 'layout.html'}} var x=document.getElementById("demo"); jQuery(document).ready(function(){ geolocation(); }) function geolocation() { if

[web2py] Re: profanity filter

2016-09-01 Thread Alex Glaros
okay, I forgot have to use the web2py source distribution to install -- 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

[web2py] Re: profanity filter

2016-09-01 Thread Alex Glaros
from the web2py directory in DOS, I tried: pip install C:\alex\language\content\profanity-1.1\profanity but received error: Unknown or unsupported command 'install' -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: profanity filter

2016-09-01 Thread Alex Glaros
have not installed anything before in web2py Luis. How to implement in Windos? Instructions say: ##Installation pip install profanity thanks, Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)

[web2py] Re: profanity filter

2016-09-01 Thread luis . valladares
I've found some python packages, maybe it suits your needs: https://pypi.python.org/pypi/profanity/1.1 https://github.com/jared-mess/profanity-filter Or maybe adapting this: https://www.languagetool.org/ El miércoles, 31 de agosto de 2016, 17:34:54 (UTC-4), Alex Glaros escribió: > > anyone have