[web2py] Re: AD Authentication issues

2013-07-16 Thread Koen Vanhees
Thanks Derek! I found out the issue was caused by a mistake in the admin account creation... *facepalm* :) Op maandag 15 juli 2013 19:23:32 UTC+2 schreef Derek het volgende: Hello Koen! I have some vbscripts if the configuration is the issue. First, this lists all your domain controllers.

[web2py] SQLFORM grid returns a error : query object has no attribute _tablename

2013-07-16 Thread Sarbjit singh
I am doing the following steps : db = DAL('sqlite://storage.db') db.define_table('person', Field('name'), Field('country')) db.person.insert(name='John', country='UK') db.person.insert(name='David', country='US') query = db.person.name==David SQLFORM.smartgrid(query) Traceback (most

[web2py] Re: Am I outgrowing DAL?

2013-07-16 Thread Niphlod
that psycopg error is a postgresql error. I find very strange that a query run through psycopg gives you an error while the other tool doesn't. However, as stated earlier, in a query with a group by you must (read, should, even if some tool outsmarts the relationships) fetch either aggregates

[web2py] Re: trying to add a second button to a form but before the submit button

2013-07-16 Thread Annet
Maybe this will work: form.element('input[type=submit]', replace=lambda button: CAT(INPUT(_class=btn,_type=reset,_value=Reset, button))) Which adds a reset button, which is not a back button ... INPUT(_class=btn,_type=button,_value=Back,_onclick=javascript:history.go(-1);) Regards, Annet

[web2py] Re: Removing Foreign Key constraint?

2013-07-16 Thread Olivier Johner
Just a little modification and all is right. Le lundi 15 juillet 2013 16:21:13 UTC+2, Massimo Di Pierro a écrit : I made some simplification to your patch. Please check it in trunk. Thank you! On Monday, 15 July 2013 03:51:39 UTC-5, Olivier Johner wrote: I propose this patch Le

[web2py] Re: How to control smartgrid search widget height and width?

2013-07-16 Thread Rohitraj Sharma
go to static folder under that u will find css folder select web2py.css(if u r using latest version of web2py) You will find some thing like *Grid * * The default style for SQLFORM.grid even using jquery-iu or another ui framework * will look better with the declarations below * if needed

Re: [web2py] External Python Script

2013-07-16 Thread Rohitraj Sharma
I am using the flowing script, its ruining but did not import state table import csv # initialize with empty ints and dicts name,cities,countries,states=[],[],[],[] with open('ind.csv','rb') as csvfile: reader = csv.reader(csvfile, delimiter=',') reader.next() #skip header for

[web2py] Re: Am I outgrowing DAL?

2013-07-16 Thread Joe Barnhart
I think you're right. The SQL testing was done earlier with less data in the tables. I think at that time my Table A and B had the 1:1 relationship I planned for. Somewhere in the intervening data, the relationship changed and Postgres slapped me upside the head for doing something wrong.

[web2py] Re: Dynamic fields in dal

2013-07-16 Thread Massimo Di Pierro
Why 1? .table is there exactly to allow you to do what you are trying to do. I would do: pth = test.dbexists = os.path.exists(pth) # migrate_enabled false prevent to create a .tablesdb = dal.DAL(sqlite://{}.format(pth)) # 1 db.define_table(dynamic_fields, Field(f_name)) # 2, 4if *exists*:

Re: [web2py] Re: dynamic search form

2013-07-16 Thread Massimo Di Pierro
smartgrid does not allow a query argument (only grid does). smartgrid takes a table. On Tuesday, 16 July 2013 00:14:18 UTC-5, Sarbjit singh wrote: Hi, I have been trying to use the dynamic search with SMARTGRID. But it is not working. I modified the code as : results =

Re: [web2py] FPDF database image

2013-07-16 Thread Massimo Di Pierro
You need to pip install PIL or sudo apt-get install python-imaging or on mac brew brew install pil On Tuesday, 16 July 2013 00:52:15 UTC-5, Tribo Eila wrote: Mariano, I already took your advised. But I can't figure out this error: RuntimeError: FPDF error: PIL not installed

[web2py] Re: SQLFORM grid returns a error : query object has no attribute _tablename

2013-07-16 Thread Massimo Di Pierro
Answered in other thread... SQLFORM.grid(query) OK SQLFORM.smartgrid(table) OK SQLFORM.smartgrid(query) WRONG! SQLFORM.smartgrid(table, contraints={'tablename':query}) OK On Tuesday, 16 July 2013 01:03:58 UTC-5, Sarbjit singh wrote: I am doing the following steps : db =

[web2py] Re: Removing Foreign Key constraint?

2013-07-16 Thread Massimo Di Pierro
thanks. I would have swore I got this right. I am getting old. On Tuesday, 16 July 2013 02:17:12 UTC-5, Olivier Johner wrote: Just a little modification and all is right. Le lundi 15 juillet 2013 16:21:13 UTC+2, Massimo Di Pierro a écrit : I made some simplification to your patch. Please

[web2py] Re: Am I outgrowing DAL?

2013-07-16 Thread Niphlod
noprobl. Keep in mind for further references/posts/replies/etc that I'm actually a DBA in the business hours life, so these kinds of things are actually my life 8-10 hours a day :-P Il giorno martedì 16 luglio 2013 10:35:09 UTC+2, Joe Barnhart ha scritto: I think you're right. The SQL

[web2py] Re: File not stored in uploadfolder

2013-07-16 Thread lesssugar
OK, defining the field as below did the trick: Field('application', 'upload', uploadfolder=os.path.join(request.folder, 'uploads/applications'), autodelete=True) (and no blobs were involved) Thanks. On Tuesday, July 16, 2013 1:14:08 AM UTC+2, Niphlod wrote: no 'blob' fields involved ?

[web2py] Anyone having experience with web2py and ChromeLogger?

2013-07-16 Thread David Marko
Anyone having experience with web2py and ChromeLogger? http://craig.is/writing/chrome-logger https://github.com/ccampbell/chromelogger-python -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving

[web2py] Re: trying to add a second button to a form but before the submit button

2013-07-16 Thread Tim Richardson
Thanks, I'll try those suggestions, but what about the buttons = ['submit'], separator = ': ', argument to SQLFORM, which has these notes in the book: is a list of INPUTs or TAG.BUTTONs (though technically could be any combination of helpers) that will be added to a DIV where the submit

[web2py] Re: Dynamic fields in dal

2013-07-16 Thread Alan Etkin
Why 1? .table is there exactly to allow you to do what you are trying to do. I think Juan wants to avoid writing those .table files to the filesystem. I'm not sure that is supported. Would it (or is it currently) possible to make the migrations without using the filesystem, for example

[web2py] Fresh instal of web2py on raspberry

2013-07-16 Thread ajitam
Hi, Until now I install web2py with script setup-web2py-ubuntu.sh but now I need to run web2py manualy because I need to run it as sudo (to use GPIO). So I decided to do a fresh install of Rasberry and then clone web2py from github. When I run python web2py.py i got prompt for password and

[web2py] how to IS_IN_DB validator select all but records that have the field active=True ?

2013-07-16 Thread Eduardo Cruz
is there a way that I can make the IS_IN_DB validator to show all the records in an select in the form but not the ones that have the field active set to False? -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this

[web2py] Re: trying to add a second button to a form but before the submit button

2013-07-16 Thread Tim Richardson
In fact, this works and it just what I wanted (my back button is to go to a preceding step in a form) button_list = [TAG.button('Back',_type=button,_onClick = parent.location='%s' %URL(vars={'login_id':login_id,'step':step-1,'submitted_id':patient_id}, hmac_key=KEY + valid_code) )

[web2py] Re: how to IS_IN_DB validator select all but records that have the field active=True ?

2013-07-16 Thread Jim S
Check out the book and the _and parameter. Here is the sample from the book: subset=db(db.person.id100) db.dog.owner.requires = IS_IN_DB(db, 'person.id', '%(name)s', _and=IS_NOT_IN_DB(subset,'person.id')) -Jim On Tuesday, July 16, 2013 8:12:46 AM UTC-5,

[web2py] Re: Anyone having experience with web2py and ChromeLogger?

2013-07-16 Thread Eduardo Cruz
Nope, but I just try it and it works pretty well. console.log(test log) headers_console = console.get_header() response.headers[headers_console[0]] = headers_console[1] El martes, 16 de julio de 2013 07:15:49 UTC-4, David Marko escribió: Anyone having experience with web2py and ChromeLogger?

[web2py] Re: Anyone having experience with web2py and ChromeLogger?

2013-07-16 Thread Eduardo Cruz
Oh I forgot, this is a complete example: https://lh6.googleusercontent.com/-Ty-kti6vLXg/UeVTV5kFjhI/A-A/Z6KjViHeRMg/s1600/Captura.PNG import chromelogger as console def index(): console.log(auth.user) return dict() El martes, 16 de julio de 2013 09:57:39 UTC-4, Eduardo Cruz

[web2py] Re: Dynamic fields in dal

2013-07-16 Thread Juan BC
On Tuesday, 16 July 2013 09:51:22 UTC-3, Alan Etkin wrote: Why 1? .table is there exactly to allow you to do what you are trying to do. I think Juan wants to avoid writing those .table files to the filesystem. I'm not sure that is supported. Would it (or is it currently) possible to

[web2py] Table underneath footer

2013-07-16 Thread Koen Vanhees
I'm creating a custom view, with a form and underneath I'm building a table based on query results underneath. Now it seems that this table is created beneath the footer, as you can see in attachment. Why is that? I want to modify this footer afterwards, so fixing this without removing it

[web2py] Session Id changing between calls

2013-07-16 Thread jTony
Hi, I am using web2py to implement REST Server . I gave a 2 GET calls using same browser instance. I am finding the session id changing between the calls [Tue Jul 16 19:57:45 2013] response.session_id None:9f4c92be-9f70-4a1c-a22c-4b46d480d2c5 [Tue Jul 16 19:57:45 2013]

[web2py] Re: Table underneath footer

2013-07-16 Thread Niphlod
it all depends in the layout of your html page. check that and see where your fragments are inserted, and you'll easily see why they're placed like in your picture. Il giorno martedì 16 luglio 2013 16:52:15 UTC+2, Koen Vanhees ha scritto: I'm creating a custom view, with a form and

Re: [web2py] Re: how to IS_IN_DB validator select all but records that have the field active=True ?

2013-07-16 Thread Vinicius Assef
Also, you can pass a query to IS_IN_DB(), filtering only records you want. See here: http://web2py.com/books/default/chapter/29/07#Database-validators On Tue, Jul 16, 2013 at 10:34 AM, Jim S j...@qlf.com wrote: Check out the book and the _and parameter. Here is the sample from the book:

[web2py] ChromeLogger for web2py

2013-07-16 Thread Eduardo Cruz
Chrome Logger: http://craig.is/writing/chrome-logger Chrome Logger for web2py: https://github.com/ccampbell/chromelogger-python/pull/5 Hi, I made a little decorator to use chrome logger with web2py. So if you do this import chromelogger as console @console.ChromeLoggerWeb2Py(response=response)

Re: [web2py] Re: how to IS_IN_DB validator select all but records that have the field active=True ?

2013-07-16 Thread Eduardo Cruz
Sorry but I dont see how to pass a query to IS_IN_DB(), how can I? El martes, 16 de julio de 2013 11:24:32 UTC-4, viniciusban escribió: Also, you can pass a query to IS_IN_DB(), filtering only records you want. See here: http://web2py.com/books/default/chapter/29/07#Database-validators

Re: [web2py] Re: how to IS_IN_DB validator select all but records that have the field active=True ?

2013-07-16 Thread Eduardo Cruz
nevermind, I found it. El martes, 16 de julio de 2013 11:24:32 UTC-4, viniciusban escribió: Also, you can pass a query to IS_IN_DB(), filtering only records you want. See here: http://web2py.com/books/default/chapter/29/07#Database-validators On Tue, Jul 16, 2013 at 10:34 AM, Jim S

Re: [web2py] web2py roadmap

2013-07-16 Thread joseph simpson
I get a blank screen??? On Sun, Jul 14, 2013 at 1:30 PM, Niphlod niph...@gmail.com wrote: web2py's developers work often behind the curtain and users are not able to see what they're working on. Historically we tracked down feature-requests and todo-lists on google code, but it's a nightmare

[web2py] can't compare datetime.date to Field

2013-07-16 Thread lucas
can't i limit a query based on a between date thingy like below? today = datetime.date.today() tCls = db.classes rows = db((tCls.starting_date=today) (today=tCls.ending_date)).select() i also tried today = datetime.datetime.today() where the fields are defined as:

[web2py] Re: ChromeLogger for web2py

2013-07-16 Thread David Marko
Very nice :-) -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit

Re: [web2py] web2py roadmap

2013-07-16 Thread Richard Vézina
idem! On Tue, Jul 16, 2013 at 12:10 PM, joseph simpson jjs0...@gmail.com wrote: I get a blank screen??? On Sun, Jul 14, 2013 at 1:30 PM, Niphlod niph...@gmail.com wrote: web2py's developers work often behind the curtain and users are not able to see what they're working on. Historically

Re: [web2py] web2py roadmap

2013-07-16 Thread alokjoshiofaarmax
I too go the blank screen with Internet Explorer 9 but the site showed up perfectly in Chrome. On Tuesday, July 16, 2013 9:10:32 AM UTC-7, jjs0sbw wrote: I get a blank screen??? On Sun, Jul 14, 2013 at 1:30 PM, Niphlod nip...@gmail.com javascript:wrote: web2py's developers work often

Re: [web2py] web2py roadmap

2013-07-16 Thread Richard Vézina
Blank with chromium!! On Tue, Jul 16, 2013 at 1:13 PM, alokjoshiofaarmax alokjoshiofaar...@gmail.com wrote: I too go the blank screen with Internet Explorer 9 but the site showed up perfectly in Chrome. On Tuesday, July 16, 2013 9:10:32 AM UTC-7, jjs0sbw wrote: I get a blank screen???

Re: [web2py] web2py roadmap

2013-07-16 Thread Daniel González
Just add a backslash at the end of the url https://trello.com/b/d3aqBbBl/ El 16/07/13 19:31, Richard Vézina escribió: Blank with chromium!! On Tue, Jul 16, 2013 at 1:13 PM, alokjoshiofaarmax alokjoshiofaar...@gmail.com mailto:alokjoshiofaar...@gmail.com wrote: I too go the blank

Re: [web2py] web2py roadmap

2013-07-16 Thread Richard Vézina
Solve :) On Tue, Jul 16, 2013 at 1:33 PM, Daniel González dgzabal...@gmail.comwrote: Just add a backslash at the end of the url https://trello.com/b/d3aqBbBl/ El 16/07/13 19:31, Richard Vézina escribió: Blank with chromium!! On Tue, Jul 16, 2013 at 1:13 PM, alokjoshiofaarmax

[web2py] Re: Dynamic fields in dal

2013-07-16 Thread Massimo Di Pierro
Than you can do: from gluon import * from gluon.dal import ADAPTERS, UseDatabaseStoredFile,SQLiteAdapter class MySQLiteAdapter(UseDatabaseStoredFile, SQLLiteAdapter): pass ADAPTERS['sqlite:custom'] = MySQLiteAdapter db = DAL('sqlite:custom://') and the .table will go in the database itself.

[web2py] Re: can't compare datetime.date to Field

2013-07-16 Thread Massimo Di Pierro
rows = db((tCls.starting_date=today) (tCls.ending_date=today)).select() The syntax is always field=value, never value=field. On Tuesday, 16 July 2013 11:16:07 UTC-5, lucas wrote: can't i limit a query based on a between date thingy like below? today = datetime.date.today() tCls =

[web2py] Re: Fresh instal of web2py on raspberry

2013-07-16 Thread Massimo Di Pierro
Not sure about the question. web2py does not need apache. The error you get is that web2py is already running and therefore you cannot get another server using the same port. On Tuesday, 16 July 2013 02:54:13 UTC-5, ajitam wrote: Hi, Until now I install web2py with script

[web2py] sqlform doesn't update after update_record

2013-07-16 Thread Koen Vanhees
All, I have a weird issue going on, although I'm obviously a newbie. This is my code (I have added some debugging stuff): def viewdata(): msg2 = result2 = result=db1(db1.data.id == request.vars.id).select().first() msg = str(result.Status) form = SQLFORM.factory(

[web2py] Re: Table underneath footer

2013-07-16 Thread Koen Vanhees
Indeed this was caused by improper (HTML) formatting... Learning slowly obviously. Op dinsdag 16 juli 2013 17:06:08 UTC+2 schreef Niphlod het volgende: it all depends in the layout of your html page. check that and see where your fragments are inserted, and you'll easily see why they're

[web2py] new matplotlib tcl problem

2013-07-16 Thread Marian Siwiak
Hi, I try to run a module starting with: def mymodule(*variables*): import matplotlib matplotlib.use('Agg') from pymol import * When I call it, I get error - piece of traceback is included below. File /usr/lib/pymodules/python2.7/matplotlib/pyplot.py, line 343, in figure

[web2py] Re: Fresh instal of web2py on raspberry

2013-07-16 Thread dhmorgan
if there is something else that needs to run on 8000, use an alternative port with: $ sudo python.py web2py.py -a 'password' -p 8001 to find out which process is running on 8000, try: $ sudo netstat -lpn | grep 8000 if it is only an unwanted web2py instance, at the end of this

[web2py] Serve images from action call or web service call

2013-07-16 Thread Diego Carvallo
I am using Web2Py and need to serve images from folder external to Web2py, user images are dynamical and have to be loaded from a different system in the same server therefore they cannot be moved to be contained in the web2py application directory. So I cannot have a relative path to the

[web2py] Re: Dynamic fields in dal

2013-07-16 Thread Alan Etkin
db = DAL('sqlite:custom://') Awsome! Does the postgres adapter supports this also? -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to

[web2py] Re: Dynamic fields in dal

2013-07-16 Thread Juan BC
btw i have this error whitout importing all gluon RuntimeError: only MySQL/Postgres can store metadata .table files in database for now On Tuesday, 16 July 2013 16:47:48 UTC-3, Alan Etkin wrote: db = DAL('sqlite:custom://') Awsome! Does the postgres adapter supports this also? --

[web2py] Re: Dynamic fields in dal

2013-07-16 Thread Juan BC
On Tuesday, 16 July 2013 16:47:48 UTC-3, Alan Etkin wrote: db = DAL('sqlite:custom://') Awsome! Does the postgres adapter supports this also? can i redefine the adapter sqlite whitout breaking something? ADAPTERS['sqlite'] = type(InDBSQLiteAdapter, (UseDatabaseStoredFile,

[web2py] Re: better calendar.js?

2013-07-16 Thread LightDot
Looks nice. Probably worth looking into this... Regards, Ales On Thursday, July 11, 2013 9:26:15 PM UTC+2, Jim S wrote: I agree it is nicer and easier to use than the current date/time popup. Yes, it does support time. Is there a way it could be an optional feature you could turn on if

[web2py] Re: web2py resources

2013-07-16 Thread Marian Siwiak
Does anyone know who runs web2pyslices? Something has gone wrong and it issues tickets... Maybe it's worth to mention it to the admin. On Sunday, 5 May 2013 01:03:06 UTC+2, Anthony wrote: You can post recipes and articles here: http://www.web2pyslices.com. There was at least one wiki in the

[web2py] how to use auth.wiki extra and env

2013-07-16 Thread dhmorgan
I'm experimenting with auth.wiki() using the book's instructions; using web2py 2.60; created new simple app (authwiki) via the admin wizard I'm attempting to utilize @(join:a,b,c) in the body of my wiki page, having first set the controller to return auth.wiki(env=dict(join=lambda

[web2py] How to make app setup / is it possible to have modelless app?

2013-07-16 Thread Dragan Matic
What would be the best way to create an app setup? After uploading/installing an app to a server I would like a user to be able to start a setup page where he would choose a database/user/password and a few other configuration parameters. Problem is that for every called page model is executed

[web2py] Tags Plugin

2013-07-16 Thread Mark Finkelstein
The plugins site has been down for a rather long time now. I wanted to download the tags plugin to see how it is organized, where would I get that? -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop

Re: [web2py] web2py roadmap

2013-07-16 Thread Niphlod
sorry all, was working a few days ago. anyway, corrected it, thanks for pointing it out. On Tuesday, July 16, 2013 7:44:21 PM UTC+2, Richard wrote: Solve :) On Tue, Jul 16, 2013 at 1:33 PM, Daniel González dgzab...@gmail.comjavascript: wrote: Just add a backslash at the end of the url

[web2py] Re: Dynamic fields in dal

2013-07-16 Thread Alan Etkin
RuntimeError: only MySQL/Postgres can store metadata .table files in database for now It looks like the sql command for creating the metadata table in DatabaseStoredFile for sqlite is missing so the class throws a not implemented message. Is there any particular issue about using sqlite

[web2py] Errors after upgrade

2013-07-16 Thread Maggs
So I upgraded from web2py version 1.99.7, which I've been using for some time, to version 2.5.1. I have a module called utility under my modules folder that has multiple functions and is imported at the top of the controller. When I upgraded to version 2.5.1 I am now getting this error: type

Re: [web2py] web2py roadmap

2013-07-16 Thread José Ricardo Borba
Awesome! 2013/7/16 Niphlod niph...@gmail.com sorry all, was working a few days ago. anyway, corrected it, thanks for pointing it out. On Tuesday, July 16, 2013 7:44:21 PM UTC+2, Richard wrote: Solve :) On Tue, Jul 16, 2013 at 1:33 PM, Daniel González dgzab...@gmail.comwrote: Just

Re: [web2py] Re: Minify (compress) response HTML

2013-07-16 Thread Elcimar
Hi there. Here I had to edit the module to exclude script... /script tags from minification, otherwise the javascript code I have in the bottom of layout.html doesn't work (!?). -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To

[web2py] Is there an issue with my web2py install? can't pickle function objects

2013-07-16 Thread Joe Magaro
Hi, Lately when I'm in the admin section, when I perform an action such as installing a new app, or deleting a view I keep getting the error below. Im not sure what changed to affect this, please help! raceback (most recent call last): File /home/www-data/web2py/gluon/main.py, line 606, in

[web2py] Re: can't compare datetime.date to Field

2013-07-16 Thread lucas
omg, that is amazing. strange syntax. why not interchangeable? lucas -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to

[web2py] Deadlock found when trying to get lock; try restarting transaction

2013-07-16 Thread vince
we are testing web2py with galera cluster and notice lots of Deadlock found when trying to get lock; try restarting transaction ticket. those ticket don't come with request/session info, we have no idea where and when did this problem occur. does that mean that web2py already handle the retry?

[web2py] Re: How to handle multiple domains with the same application

2013-07-16 Thread Marcio Andrey Oliveira
Derek is right. He explained exactly what I want (sorry my bad English). Massimo, thanks for the solution. I started studying web2py these days and it seems the right tool for the work. Thank all. On Sunday, July 14, 2013 8:22:31 PM UTC-3, Marcio Andrey Oliveira wrote: Hi. Currently I