Re: [web2py] Autocomplete and list:string

2016-01-17 Thread Saeed
In fact that is the the problem. I want to fill the country widget with just a list (ordinary python list of strings) of countries so the user can select from that list. So essentially the backing list of the auto complete isn't part of the db but just a bunch of strings in an ordinary list On 18

[web2py] Re: django type adding or append fields using plus sign to your table

2016-01-17 Thread Ron Chatterjee
Thank you Massimo, It seems that will only work with string. But for an example of file upload validator, this wouldn't work. Or if I have a DAL validator like is URL(). In other words... Let's say I want someone to create a profile of his work by adding multiple url links to their portfolio us

[web2py] Re: Length and requires is not null together

2016-01-17 Thread Massimo Di Pierro
requires = IS_LENGTH(50) should be sufficient On Sunday, 17 January 2016 16:29:32 UTC-6, DenesL wrote: > > When you need several validators on a field you create a list of them: > > ... requires=[ IS_NOT_EMPTY(), IS_LENGTH(50) ] > > Denes > > On Sunday, January 17, 2016 at 4:22:38 PM UTC-5, Ales

[web2py] Re: websockets

2016-01-17 Thread Massimo Di Pierro
I think it is in from pydal.adapters.base import BaseAdapter On Sunday, 17 January 2016 15:52:37 UTC-6, 黄祥 wrote: > > i've followed the steps but end it with an error occured : > *running run_iochat.py from terminal* > > (site)MacBook:~ MacBookPro$ python ~/site/web2py/run_iochat.py > > Traceba

Re: [web2py] Autocomplete and list:string

2016-01-17 Thread Massimo Di Pierro
I do not see a db.company.country, although I am not sure that is the problem. On Sunday, 17 January 2016 15:14:12 UTC-6, Seraaj Muneer wrote: > > db.define_table('company', > Field('name', 'string', length=20, represent=lambda name, row: name. > capitalize(), required=True, > unique=True, notn

[web2py] Re: request.args

2016-01-17 Thread Massimo Di Pierro
should eb def vistaSIMFDB(): ufile=request.args(0) #ufile='SIMFDB_2016011509341800.csv' #form=legacy_db(legacy_db.SIMFDB.filename==ufile).select() form = SQLFORM.grid(legacy_db.SIMFDB.filename==ufile, csv=True, args=request.args[:1] ) return dict(form=form) you have to tell the grid whic

[web2py] Re: django type adding or append fields using plus sign to your table

2016-01-17 Thread Massimo Di Pierro
Field('something','list:string') ? On Sunday, 17 January 2016 12:28:06 UTC-6, Ron Chatterjee wrote: > > Hello, > > I saw a similar post on this once but don't quite recall. Basically > looking for a similar feature like django admin. Let's say I have a table > below, I want to be able to add/app

[web2py] Re: multi tenant

2016-01-17 Thread Massimo Di Pierro
That URL structure assumes you have a single app running at the domain. So I am going to assume that is the case. first of all you have to map the tenant name ($domain) into request.args(0) using routes.py routes_in = [['/$domain','/yourapp/default/index/$domain'], ['/$doma

[web2py] Re: Using open source code in web2py app for commercial use

2016-01-17 Thread Massimo Di Pierro
Each appliances has its own license. If it was created by me than, you can consider them public domain. I cannot speak for appliances created by others. There is no requirement to say "powered by web2py" if you use web2py as a framework. The rules are described in the LGPL license. On Friday,

[web2py] Re: Error No module named copy_reg after upgrading web2py

2016-01-17 Thread Massimo Di Pierro
it is not broken today. We can replace it with something better. Until then we can be careful and make sure it works. And even if it does not work 100% of the times, it is better than nothing. On Friday, 15 January 2016 06:57:45 UTC-6, Niphlod wrote: > > On Friday, January 15, 2016 at 1:51:24 PM

[web2py] Use auto complete without SQL

2016-01-17 Thread Seraaj Muneer
Hello everyone from Accra Ghana. I've a small issue I'm not sure how to go about. I've a number of companies in the database. What I want to do is create a form with just a select field containing the companies in the database, and naturally a submit button to post the form to a controller. How

Re: [web2py] New to web app development -- is web2py a good choice

2016-01-17 Thread Seraaj Muneer
Greetings from Accra Ghana! Quite an old thread, but adding my 2 cents here for anyone who stumbles on this with a question similar to the OP. Having been doing Java EE for almost 5 years now, I can say wholeheartedly web2py is the most time-saving, intuitive, common sense oriented framework I

[web2py] Re: Length and requires is not null together

2016-01-17 Thread 'DenesL' via web2py-users
When you need several validators on a field you create a list of them: ... requires=[ IS_NOT_EMPTY(), IS_LENGTH(50) ] Denes On Sunday, January 17, 2016 at 4:22:38 PM UTC-5, Alessio Varalta wrote: > > Hi I have a problem with filed and validate > > > Field('nome',),type="string",leng

[web2py] Re: websockets

2016-01-17 Thread 黄祥
i've followed the steps but end it with an error occured : *running run_iochat.py from terminal* (site)MacBook:~ MacBookPro$ python ~/site/web2py/run_iochat.py Traceback (most recent call last): File "/Users/MacBookPro/site/web2py/run_iochat.py", line 8, in from gluon.main import wsgibas

[web2py] Re: how to import_from_csv or export_to_csv without primary key

2016-01-17 Thread 'DenesL' via web2py-users
The concept is applicable to any number of tables. Tables store the names of their fields in db.table.fields so you can create a copy of that without the id field (or any other(s)) an use it to select the rows in your program. Denes On Sunday, January 17, 2016 at 1:20:10 PM UTC-5, Alex Glaros

[web2py] Length and requires is not null together

2016-01-17 Thread Alessio Varalta
Hi I have a problem with filed controll i have this Field Field('nome',),type="string",length=50,requires=IS_NOT_EMPTY()), I generate the table with sqlform grid and when i add new element and try to compile requires is not empty is active not length=50 if i eliminate requires is not

Re: [web2py] Autocomplete and list:string

2016-01-17 Thread Seraaj Muneer
db.define_table('company', Field('name', 'string', length=20, represent=lambda name, row: name. capitalize(), required=True, unique=True, notnull=True, requires=[IS_NOT_EMPTY(error_message='You must enter a company name'), IS_MATCH('^[a-zA-Z0-9][a-zA-Z0-9 ,-.]*$') ]), Field('user_id', 'refere

[web2py] Re: how to import_from_csv or export_to_csv without primary key

2016-01-17 Thread Alex Glaros
regarding error statement DataError: value too long for type character varying(512) I removed all 512 length statements from db.py, reloaded PlythonAnywhere, etc, but still get the error. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web

[web2py] Re: request.args

2016-01-17 Thread goome
this is making me mad(i think i am missing somethng obvious, bt i don't know what): This work: def vistaSIMFDB(): ufile=request.args[0] #ufile='SIMFDB_2016011509341800.csv' form=legacy_db(legacy_db.SIMFDB.filename==ufile).select() #form = SQLFORM.grid(legacy_db.SIMFDB.filename==ufile, csv

[web2py] Dynamic Search

2016-01-17 Thread Anthony Smith
Hi All, I am using the dynamic search (http://www.web2pyslices.com/slice/show/1403/dynamic-search), is it possible to have the results to be a post, if so do I go about it. cheers Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/w

[web2py] Re: how to import_from_csv or export_to_csv without primary key

2016-01-17 Thread Alex Glaros
@Denes, I know referential integrity would not result, but I just wanted to get a lot o f the lookup tables transferred to the the db @Anthony, yes that would be by far the best solution but when tried, I couldn't find which files were causing the error. web2py Shell 2.9.5-stable+timestamp.2014

[web2py] Re: request.args

2016-01-17 Thread Anthony
Is that all you have in routes, because your URL excludes the controller, which would also be implemented via the routes? Also, when you get that error, is the exact URL in the address bar of the browser http://127.0.0.1:8000/PROVE/dettaglio_aggiornamenti/SPE/SPE_2016011518051300.csv

[web2py] Re: How use T in modules of web2py?

2016-01-17 Thread Anthony
That looks correct. What's happening? On Sunday, January 17, 2016 at 12:05:53 PM UTC-5, Yasmany Yantalla wrote: > > #!/usr/bin/env python > # -*- coding: utf-8 -*- > from gluon import * > > def getMenu(id): > # busco los datos de los hijos en la db > > db = current.db > menus = db

[web2py] Re: how to import_from_csv or export_to_csv without primary key

2016-01-17 Thread Anthony
Have you tried this approach: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#CSV--all-tables-at-once- It will generate new ids but still maintain all references. Anthony On Sunday, January 17, 2016 at 1:20:10 PM UTC-5, Alex Glaros wrote: > > sorry Denes, I forgot

[web2py] django type adding or append fields using plus sign to your table

2016-01-17 Thread Ron Chatterjee
Hello, I saw a similar post on this once but don't quite recall. Basically looking for a similar feature like django admin. Let's say I have a table below, I want to be able to add/appends fields to "link" or "files" using a plus sign next to my field (see attached picture). Or minus to subtrac

[web2py] Re: how to import_from_csv or export_to_csv without primary key

2016-01-17 Thread Alex Glaros
sorry Denes, I forgot to explain that I'm migrating to Postgres and doing all tables at once. Would like to automate the ."id" removal. Any ideas on that? for table in db.tables: rows = db(db[table]).select() table_name = str([table]) + '.csv' rows.export_to_csv_f

[web2py] Re: how to import_from_csv or export_to_csv without primary key

2016-01-17 Thread 'DenesL' via web2py-users
Since the export_to_csv_file acts on a rows object you can select the fields to your liking. rows = db(qry).select(*list_of_fields_to_export) rows.export_to_csv_file(open(...)) Denes On Saturday, January 16, 2016 at 11:27:18 PM UTC-5, Alex Glaros wrote: > > is there a way to import_from_csv wit

[web2py] Re: best advice on customer/client picklist popup.

2016-01-17 Thread 'DenesL' via web2py-users
How about using an autocomplete? http://web2py.com/books/default/chapter/29/07/forms-and-validators#Autocomplete-widget Denes On Sunday, January 17, 2016 at 9:54:32 AM UTC-5, lucas wrote: > > oh, i forgot to mention, that i know how to do an ajax query and pass post > variable to it using web2py

[web2py] How do I make my web2py app able to use the device hardwares like camera?

2016-01-17 Thread henryjacker01
also how to make it able to use some other apps on the device? -- 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 s

[web2py] Facebook Login

2016-01-17 Thread Anurag Mishra
I am using the following code for implementing login using facebook through OAuth. I am using my app id and app key instead of FB_CLIENT_ID and FB_CLIENT_SERET. *FB_CLIENT_ID='XXX'* *FB_CLIENT_SECRET="YYY"* *## import required modules* *try:* *import json* *except ImportError:* *from gl

[web2py] Re: Grid links in component do not open in new window properly

2016-01-17 Thread fbenhamo102
Could you indicate whether what you did work, please? I've the same problem, when using appadmin/manage, which internally uses the smartgrid: opening a link in a new tab does not work (nor do the next / previous buttons). The problem I have when trying to implement Anthony's solution is the fo

[web2py] How use T in modules of web2py?

2016-01-17 Thread Yasmany Yantalla
#!/usr/bin/env python # -*- coding: utf-8 -*- from gluon import * def getMenu(id): # busco los datos de los hijos en la db db = current.db menus = db((db.menu.parent == id) & (db.menu.is_enabled == True)).select(db.menu.page, db.menu.name, db.menu.id, db.menu.url_internal, db.me

[web2py] Re: How to access the auth tables in appadmin?

2016-01-17 Thread Dmitry Chuvikovsky
This is because in the file models/db.py variable 'db' is defined first time in row 20: if not request.env.web2py_runtime_gae: ## if NOT running on Google App Engine use SQLite or other DB db = DAL(myconf.take('db.uri'), pool_size=myconf.take('db.pool_size', cast=int), check_reserved=['al

[web2py] Record versioning and list:xxxx field - KeyError on update if I only add a list:xxxx item

2016-01-17 Thread Miquel Fontanals
Hi, I'm using web2py as a restful api, and model has record_versioning and auth.signature enabled. db.define_table('article', Field('title', 'string', length=1024, required=True, unique=True), Field('slug', 'string', length=1024, required=True, unique=True), Field('body', 'text', req

[web2py] Re: Edit form style

2016-01-17 Thread 'DenesL' via web2py-users
The 3 at the end is calculated in the _inner function of the formstyle_bootstrap3_inline_factory function in sqlhtml.py (around line 909 in 2.12.03). Denes On Friday, January 15, 2016 at 4:41:33 AM UTC-5, desta wrote: > > I would like to make a change a the Login form. > Currently I see that t

[web2py] Re: request.args

2016-01-17 Thread goome
i have route_in that about this app has : ('/PROVE','/PROVE/default/index') Il giorno domenica 17 gennaio 2016 14:06:51 UTC+1, Niphlod ha scritto: > > are you using routes.py ? > > On Sunday, January 17, 2016 at 11:12:16 AM UTC+1, goome wrote: >> >> i have this url : >> http://127.0.0.1:8000/PROV

[web2py] Re: websocket messaging

2016-01-17 Thread Ron Chatterjee
https://groups.google.com/d/msg/web2py/nJmML_jeZfc/10MhyVao9bcJ Thank you Ricardo for posting this. On Wednesday, January 6, 2016 at 3:30:08 PM UTC-8, Ron Chatterjee wrote: > > Take back the post. > > This seems to works fine for me. > > https://github.com/rpedroso/w2pchat > > > > On Wednesda

Re: [web2py] Re: How do I select and output multiple checkboxes

2016-01-17 Thread Ron Chatterjee
Yes. This is a classic example of multi select. Another work around is using multiselect widget. db.define_table('mytable', Field('name', type='list:string',requires=IS_IN_SET (('True','False', 'Neither','True','False', 'Neither','True','False', 'Neither','True','False', 'Neithe

[web2py] Re: best advice on customer/client picklist popup.

2016-01-17 Thread lucas
oh, i forgot to mention, that i know how to do an ajax query and pass post variable to it using web2py. i don't know the best javascript/jQuery method for creating and displaying the proper HTML code and inputs/buttons/and such, and then pass the result back to the main parent page. -- Resou

[web2py] best advice on customer/client picklist popup.

2016-01-17 Thread lucas
hello one and all, this is not web2py directly, but you'all have great advice. say i have 10,000 customers/clients and i don't want to dump them into a select/option input and force the end user to sift through all of those to pick the right client. i would rather have a child popup window wit

Re: [web2py] Re: How can I add a compiler to my site like the ones Codecademy, ideone and W3 schools have?

2016-01-17 Thread aston . ribat
But where, how and which files do I upload files for C compiler so that I may be able to use subprocess. On Sunday, January 17, 2016 at 7:11:37 PM UTC+5:30, Bear wrote: > > If it is a small and nonsafety project, You need to use subprocess or you > need to run the code in the sandbox vm. > On Ja

Re: [web2py] Re: How can I add a compiler to my site like the ones Codecademy, ideone and W3 schools have?

2016-01-17 Thread BearXu
If it is a small and nonsafety project, You need to use subprocess or you need to run the code in the sandbox vm. On Jan 17, 2016 6:48 AM, wrote: > > Someone please help me with this. It's very urgent and I have no idea how to compile C programs in web2py (plus it should not be running online with

[web2py] Re: request.args

2016-01-17 Thread Niphlod
are you using routes.py ? On Sunday, January 17, 2016 at 11:12:16 AM UTC+1, goome wrote: > > i have this url : > http://127.0.0.1:8000/PROVE/dettaglio_aggiornamenti/SPE/SPE_2016011518051300.csv > > generated by: > > href="{{=URL(r=request,f='dettaglio_aggiornamenti',args=['SPE',ultimoFileSpe])}

[web2py] Re: How can I add a compiler to my site like the ones Codecademy, ideone and W3 schools have?

2016-01-17 Thread aston . ribat
Someone please help me with this. It's very urgent and I have no idea how to compile C programs in web2py (plus it should not be running online with the help of other sites like ideone as it has to be deployed in the college campus) On Sunday, January 17, 2016 at 5:37:57 PM UTC+5:30, aston...@g

[web2py] How can I add a compiler to my site like the ones Codecademy, ideone and W3 schools have?

2016-01-17 Thread aston . ribat
I need a C++ 14 compiler on my site. -- 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 Gr

[web2py] Re: SQLFORM.grid and jQuery-bootgrid help

2016-01-17 Thread Val K
Hi! > Using Bootgrid the TD column html is converted into string. It's very strange, do you check your SQLFORM.grid without using Bootgrid? May be it happens (html to string) at server-side? In your example why do you set *data-formatter* if TD contains already rendered link? On Sunday, Ja

[web2py] I have to create a replica of ideone.com for C++ programmers. How do I install C compiler in web2py?

2016-01-17 Thread aston . ribat
I need a C++ 14 compiler to work. -- 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 Grou

[web2py] SQLFORM.grid and jQuery-bootgrid help

2016-01-17 Thread piero crisci
Hi I am new using jQuery and not very skilled in general with Javascript. I am using the Basic Jquery Bootgrid example on a SQLFORM.grid and it worked fine, except for one thing. One of the TD column contains a "Server Generated link" with user_signature.

[web2py] request.args

2016-01-17 Thread goome
i have this url : http://127.0.0.1:8000/PROVE/dettaglio_aggiornamenti/SPE/SPE_2016011518051300.csv generated by: href="{{=URL(r=request,f='dettaglio_aggiornamenti',args=['SPE',ultimoFileSpe])}} i believed that request.args[0] == 'SPE' and request.args[1]== 'SPE_2016011518051300.csv' but i got