[web2py] T function and database records -> html entities

2012-08-16 Thread Calycé
Hi all, I'm using the T function to produce some text in a multilingual application, but I'm facing a small problem. If i use T('Aller à') I receive the exact same string but when using T('> blabla') I receive '> blabla'. In the second case the greater than sign is correctly rendered in html e

[web2py] Re: Where should I put functions that are useful/common to muliple applications?

2012-08-16 Thread pbreit
I suppose you could use URL(a=??) in order to share those files across apps although I think that's fairly uncommon. I find that I learn SQL even as I use DAL. But if you still do want to use raw SQL you can use the DAL's db.executesql() function. But you lose a ton of DAL functionality. --

[web2py] Re: incorporate carsales from web into web2py on my computer

2012-08-16 Thread jayvandal
I put my applications in c:/python27/projects i make my application = cars I change my directory to cars I run some program tar zxvf/\/c:/web2py/applications/web2py.app.carsale.w2p i am running Vista what should tar zxvf be in Vista? I think web2py is good for learning web in python! I appreciat

[web2py] Re: embeded python code in web2py raise error

2012-08-16 Thread Anthony
Is that code inside a function, or just at the top level in the controller? You probably want it in a function. How does request.vars.url get set? Note, if there is no "url" GET or POST variable, request.vars.url will be None, and Request(url) will raise an exception. Anthony On Thursday, Aug

[web2py] Re: embeded python code in web2py raise error

2012-08-16 Thread howesc
we can't tell what the problem is from the pasted code (aside from indentation that was probably messed up in copy/paste). can you show us an example of your default.py file and the traceback you are getting with the error? On Thursday, August 16, 2012 12:29:25 AM UTC-7, Hojat Taheri wrote: > >

[web2py] Re: Can web2py serve REST data of many-to-may tables via parse_as_rest?

2012-08-16 Thread howesc
i personally have not used parse_as_rest so i might be out in left field here.but are you able to access the output of the query and update it before it is returned? or perhaps even better, add a format parameter to the table definitions so that you can format the display of references (to

[web2py] Re: Using Decorators for RESTful URLs

2012-08-16 Thread Anthony
Using the pattern-based system, you have two options (which can be mixed) -- Python regular expressions as well as an alternative simpler syntax, both described here: http://web2py.com/books/default/chapter/29/4#Pattern-based-system. There are many additional resources on the internet for learn

[web2py] Re: Using Decorators for RESTful URLs

2012-08-16 Thread deepak
I just want to know how to create URL pattern in routes.py, what i really want to understand is, how to parse parameters in URL patterns like the one, Massimo showed in his example -- *('/article/(?P\d+)' , '/appname/default/article/$id')* *(?P\d+) * * * I would be really helpful if I could g

[web2py] Re: Where should I put functions that are useful/common to muliple applications?

2012-08-16 Thread curiouslearn
Hello pbreit, Thanks, I will look into that. After posting I realized, I have the same question for css style files and js files. Where can I store those? Can I just store them in one application, and call them using URL() function? Is that the best way, or is there something better? I am new

[web2py] Re: Using Decorators for RESTful URLs

2012-08-16 Thread deepak
Anthony and Massimo, I'd really thank you ppl for giving me a solution with some code! Thats wonderful!. It really helped me get going. Thanks again guys. :) Deepak On Thursday, 16 August 2012 22:37:41 UTC+5:30, Anthony wrote: > > web2py does not use decorators to specify routes like Flask do

[web2py] Re: Where should I put functions that are useful/common to muliple applications?

2012-08-16 Thread pbreit
I guess site-packages: http://web2py.com/books/default/chapter/29/4?search=site-packages But why oh why aren't you using DAL? --

[web2py] Help me to write SQL query in web2py

2012-08-16 Thread Amit
I have written one sql query: select device_id, sensor_id, max(created_on) from test.abc_tbl where date_sub(now(), interval interval_time minute) > created_on group by device_id, sensor_id; How to write it in web2py? Please help me to do the same. Thanks. --

[web2py] Where should I put functions that are useful/common to muliple applications?

2012-08-16 Thread curiouslearn
Hello, What is the recommended place in web2py folder where I should store custom functions that are useful to multiple applications? For example, suppose I have a function such as the following: *def connecttodb():* *if request.is_local:* *user="user"* *passwd="passed"* *

[web2py] Book bug: auth callback example

2012-08-16 Thread JoeCodeswell
auth.settings.register_onaccept.append(lambda form:\ mail.send(to='y...@example.com',subject='new user', message='new user email is %s'%form.vars.email)) Above causes a ticket saying: auth.settings.verify_email_onaccept(lambda form:\ TypeError: 'list' object is not callable Th

[web2py] Re: incorporate carsales from web into web2py on my computer

2012-08-16 Thread Massimo Di Pierro
BTW... it is a very simple example written by a student. On Thursday, 16 August 2012 21:11:01 UTC-5, Massimo Di Pierro wrote: > > You should use admin to install applications. If you want to do it > manually you need do > > cd applications > mkdir appname > cd appname > tar zxvf /path/to/web2py.

[web2py] Re: incorporate carsales from web into web2py on my computer

2012-08-16 Thread Massimo Di Pierro
You should use admin to install applications. If you want to do it manually you need do cd applications mkdir appname cd appname tar zxvf /path/to/web2py.app.carsales.w2p at voila'? The w2p files do not contain the parent folder because, to avoid conflict, they want you to name the app. On Thu

[web2py] Re: Electronic voting anybody?

2012-08-16 Thread Massimo Di Pierro
I think all the three issues have been addressed. About 1). Now only the voter, the managers (who get copy of the receipt) can see the receipt before the election is closed. After they become public. The managers can get see the receipt. The officer who creates the election can see the results

[web2py] incorporate carsales from web into web2py on my computer

2012-08-16 Thread jayvandal
I down;oaded a file of web2py examples and I wanted to put carsales in my web2py applications sso I could see how the application looks. I downloaded the file that contained car sales and unzipped it .I thought I could unzip it into my folder projects where I could have my applications.I canno

[web2py] Re: Electronic voting anybody?

2012-08-16 Thread Massimo Di Pierro
1) is actually a feature. All ballots are always public. Anonymous of course. Perhaps they should only be public after the election is closed? Massimo On Thursday, 16 August 2012 19:35:36 UTC-5, Rob_McC wrote: > > Massimo: > > > > *>Can you please give it one more try?* > . But of course. > > *B

[web2py] Re: Enforcing - like gmail: first character of your username should be a letter (a-z) or number.

2012-08-16 Thread Anthony
> > *With all of the below validations > *1- Do they ALL execute > or > 2- Execution stops at the first one that fails, > > What I mean is say a user uses a username="bill" > the first validator will display the message, but does web2py continue to > evaluate the others? > > > *If so.. > *

[web2py] Re: Enforcing - like gmail: first character of your username should be a letter (a-z) or number.

2012-08-16 Thread Rob_McC
Anthony: . Thanks for submitting a patch. *Quick Question: With all of the below validations *1- Do they ALL execute or 2- Execution stops at the first one that fails, What I mean is say a user uses a username="bill" the first validator will display the message, but does web2py continue t

[web2py] Re: Electronic voting anybody?

2012-08-16 Thread Rob_McC
Massimo: *>Can you please give it one more try?* . But of course. *But first, I wanted to say thanks for creating web2py, and supporting it, it really is excellent just excellent... * *- - - - - - - - - - - - - - - - - - - - - - - *Here is my Beta test report: Name of Election: *"

Re: [web2py] Re: Can't import external modules

2012-08-16 Thread Massimo Di Pierro
Can you help us test this. If anything caused it, could be changeset: 3324:ef7523559742 --- a/gluon/custom_import.py Wed Jun 06 11:37:28 2012 -0500 +++ b/gluon/custom_import.py Thu Aug 16 18:18:23 2012 -0500 @@ -287,14 +287,14 @@ return super(_Web2pyImporter, self) \

[web2py] Re: Electronic voting anybody?

2012-08-16 Thread Massimo Di Pierro
You found a bug. It is now fixed. Can you please give it one more try? massimo On Thursday, 16 August 2012 15:49:20 UTC-5, Rob_McC wrote: > > Be glad to test some more, > here are details from my previous test: > > *Here are the TWO confirmation email I received. > > * Times are noted, they

[web2py] Re: I'm looking sourc Web2Py Electronic Health Record

2012-08-16 Thread Derek
Just what I was thinking about also. However it looks like the "working demo" is now invalid. On Thursday, August 16, 2012 9:34:44 AM UTC-7, Anthony wrote: > > Are you talking about this: http://code.google.com/p/web2pyhl7/ > > Anthony > > On Thursday, August 16, 2012 4:14:12 AM UTC-4, Ulugbek Nu

[web2py] class nav-collapse in layout.html

2012-08-16 Thread Martin Weissenboeck
I have a program with a menu and I tried Firefox and Google Chrome: Chrom shows the menu, Firefox not. Line 76 in layout.html is: I could not find a definition for the class "nav-collapse". Next step: I removed this class definition {{is_mobile=request.user_agent().is_mobile}

[web2py] is_impersonating again...

2012-08-16 Thread Martin Weissenboeck
I have am menu with someting like ('stop_impersonating', ... is_impersonating()),... This menu entry should only be activ when impersonating is activ. Now I have tried a fresh installation of web2py and I got: Traceback (most recent call last): File "/etc/web2py/gluon/restricted.py", line 20

Re: [web2py] Re: Can't import external modules

2012-08-16 Thread Anthony
Do you still have all the __init__.py files (i.e., in /web2py, /applications, /yourapp, and /yourapp/modules)? On Thursday, August 16, 2012 5:29:30 PM UTC-4, Anthony wrote: > > You should not need to use local_import, which is deprecated. Regular > import should work, so there is a problem somew

Re: [web2py] Re: Can't import external modules

2012-08-16 Thread Anthony
You should not need to use local_import, which is deprecated. Regular import should work, so there is a problem somewhere. Anthony On Thursday, August 16, 2012 4:52:54 PM UTC-4, Matt wrote: > > > > On Thursday, August 16, 2012 12:24:34 AM UTC-4, Matt wrote: >> >> On Wed, Aug 15, 2012 at 10:03 PM

Re: [web2py] map_hyphens and pattern-based routes

2012-08-16 Thread Jonathan Lundell
On 16 Aug 2012, at 10:33 AM, Neil wrote: > I'm using a pattern-based routes.py file. How can I enable "map_hyphens" > functionality? Do I have to come up with a regex for my routes_in and > routes_out, yes > or is there a way to mix pattern-based and parameter-based systems? no --

Re: [web2py] Re: Can't import external modules

2012-08-16 Thread Matt
On Thursday, August 16, 2012 12:24:34 AM UTC-4, Matt wrote: > > On Wed, Aug 15, 2012 at 10:03 PM, Anthony wrote: > >> Is there any way around this? This seems to have broken only with the > >> upgrade to Mountain Lion. We develop this app primarily on (and for) > linux, > >> however I do mos

[web2py] Re: Electronic voting anybody?

2012-08-16 Thread Rob_McC
Be glad to test some more, here are details from my previous test: *Here are the TWO confirmation email I received. * Times are noted, they were quite close NOTE: Will you have a TIME ZONE setting for the application? Then, I would know, what time voted on based on my time zone... Candidate

[web2py] Web2py GAE strange error [Errno 13] file not accessible: (jQuery.js)

2012-08-16 Thread Akash Kakkar
Hi, I have tried deploying an earlier version of my app on gae and was successful, unfortunately the product release version of my app is faltering when I try to run locally on gae before deploying and was getting undefined error. In the process of debugging I made changes in my app.yaml file

[web2py] Re: IS_IN_DB doesn't show dropdown for the table with primarykey ?

2012-08-16 Thread Omi Chiba
Anthony, Nevermind, I finally understand what you mean by "IS_IN_DB does not produce a dropdown when it is in a list" I changed like the following and it works !! db.EDXHLF00.HLHSHH.requires=IS_IN_DB(db,db.TDMHLL00.HLHSHH) On Thursday, August 16, 2012 2:42:03 PM UTC-5, Anthony wrote: > > IS_IN_

[web2py] Re: IS_IN_DB doesn't show dropdown for the table with primarykey ?

2012-08-16 Thread Omi Chiba
So I have to define it in Controller like below ? I just want to use dopdown list from another table just like person, dog tables but why it's acting differently when I use primarykey ? def index(): (...) query = (db.table.field == 'xyz') #in practice 'xyz' would be a variable db.tabl

Re: [web2py] Re: Functions in Views

2012-08-16 Thread Pystar
I goofed, A big apology to Anthony and Max. It works now, I actually didnt define a FIELDTYPE in my db definition so I guess it just defaulted to storing the field values as a string. On Thursday, August 16, 2012 8:37:56 PM UTC+1, Anthony wrote: > > Can we see your model? Are you sure the "times

Re: [web2py] Complex query in DAL?

2012-08-16 Thread Anthony
On Thursday, August 16, 2012 3:07:12 PM UTC-4, pbreit wrote: > > I'd rather stay in app code. If I do db.executesql(..., as_dict=True) > could I copy that into a Storage object to get something roughly similar to > a DAL object? You might try something like this: http://stackoverflow.com/quest

[web2py] Re: IS_IN_DB doesn't show dropdown for the table with primarykey ?

2012-08-16 Thread Anthony
IS_IN_DB does not produce a dropdown when it is in a list, only when it stands alone. If you want the dropdown and want to use additional validators, use it's "_and" argument -- see http://web2py.com/books/default/chapter/29/7#Database-validators. Anthony On Thursday, August 16, 2012 3:27:30 P

Re: [web2py] Re: Functions in Views

2012-08-16 Thread Anthony
Can we see your model? Are you sure the "timestamp" field is a datetime field and not a string field? When I try prettydate with a datetime field, it works fine? Anthony On Thursday, August 16, 2012 3:26:24 PM UTC-4, Pystar wrote: > > To Max, > Like Anthony said, why is a datetime object I retr

Re: [web2py] Re: Functions in Views

2012-08-16 Thread Pystar
I would also like to know the format that the request.now value which is equivalent to datetime.datetime.now() follow? i,e, If I was to convert a string to a datetime object using the datetime.datetime.strptime("datetimestring", [format]), I tried passing %Y-%m-%d %h:%m:%f but I got a traceback

[web2py] IS_IN_DB doesn't show dropdown for the table with primarykey ?

2012-08-16 Thread Omi Chiba
It shows the dropdown list when I define IS_IN_DB like this. (See OK) But doesn't appear when I use the table with primary key (See NG) OK -- db.define_table('person', Field('modified_on', 'datetime', d

[web2py] Re: calling custom_store and custom_retrieve using parameters

2012-08-16 Thread Jim Gregory
Never mind. I out the problem :) -Jim On Thursday, August 16, 2012 2:06:28 PM UTC-5, Jim Gregory wrote: > > Thanks, that is helpful. But the path does not seem to be passed in the > custom retrieve. > Field('file','upload', > uploadir='/path/to/folder', custom_store=lambda > file,filename,pat

Re: [web2py] Re: Functions in Views

2012-08-16 Thread Pystar
To Max, Like Anthony said, why is a datetime object I retrieved from my database in a controller automatically converted to a string object? and how come prettydate() cant convert datetime objects that are strings too? Is this a feature of a bug? I also discovered that if i do this in my view

Re: [web2py] Complex query in DAL?

2012-08-16 Thread pbreit
I'd rather stay in app code. If I do db.executesql(..., as_dict=True) could I copy that into a Storage object to get something roughly similar to a DAL object? I started trying to build it in DAL and got part of the way. I was seeing a problem with the counts where it wasn't executing multiple

[web2py] Re: calling custom_store and custom_retrieve using parameters

2012-08-16 Thread Jim Gregory
Thanks, that is helpful. But the path does not seem to be passed in the custom retrieve. Field('file','upload', uploadir='/path/to/folder', custom_store=lambda file,filename,path:store_file(file,filename,path), custom_retrieve=retrieve_file On Wednesday, August 8, 2012 6:51:44 AM UTC-5, Anthon

[web2py] Re: in trunck - cannot access web2py site with IE when it's running under apache

2012-08-16 Thread Omi Chiba
Massimo, Sorry, for the late reply. I downloaded the latest "Version 2.0.0 (2012-08-15 17:30:38) dev" and confirmed it fixed now. On Tuesday, August 7, 2012 5:01:56 PM UTC-5, Massimo Di Pierro wrote: > > It is probably because of this line in gluon/main.py > > if not is_valid_ip_address(request.

[web2py] map_hyphens and pattern-based routes

2012-08-16 Thread Neil
Hopefully this is an easy one. I'm using a pattern-based routes.py file. How can I enable "map_hyphens" functionality? Do I have to come up with a regex for my routes_in and routes_out, or is there a way to mix pattern-based and parameter-based systems? Thanks, Neil --

Re: [web2py] Re: Functions in Views

2012-08-16 Thread Anthony
Does this break backward compatibility, or do you consider this a bug? Note, Pystar's problem is not that the function was failing silently, but that his item.now value was a string when he expected it to be a datetime object (i.e., now it will still fail, but not silently). Anthony On Thursda

[web2py] Re: Question about Human-readable forms + REST CRUD APIs.

2012-08-16 Thread Matthew Wood
I'v been fiddling with these ideas. They are very similar to the flask/sqlalchemy solutions I've seen in my other queries. Thanks a ton for the suggestions. This is a pretty nice community. On Sunday, July 29, 2012 11:16:53 PM UTC-6, Anthony wrote: > > - if you define your models carefully w

[web2py] Re: Image doesn't appear?

2012-08-16 Thread lyn2py
Thanks Massimo! Although the [file|delete] overlaps with the browse button. On Friday, August 17, 2012 1:05:48 AM UTC+8, Massimo Di Pierro wrote: > > form = SQLFORM(db.staff,record) > > should be > > form = SQLFORM(db.staff,record,upload=URL('download')) > > On Thursday, 16 August 2012 11:43:14

[web2py] Re: Question about Human-readable forms + REST CRUD APIs.

2012-08-16 Thread Matthew Wood
"If you have any advice". :-) I most certainly don't! I wish I had enough experience to really get in on this conversation. Your ajax solution seems pretty doable, but you're absolutely correct that it would require javascript at all times. For what it's worth, the suggestions from the flask

[web2py] Re: Using Decorators for RESTful URLs

2012-08-16 Thread Massimo Di Pierro
I would recommend Anthony's solution but you can do something similar like this: 1) create a file routes.py with # begin routes_in = [ ('/' , '/appname/default/api_root'), ('/articles' , '/appname/default/api_articles'), ('/article/(?P\d+)' , '/appname/default/article/$id

[web2py] Can web2py serve REST data of many-to-may tables via parse_as_rest?

2012-08-16 Thread Matthew Wood
I'm posting this question here as well as on stackoverflow. So hopefully the extra exposure will help me out! I need to serve REST data about a many-to-many relationship. I've been

Re: [web2py] Re: Functions in Views

2012-08-16 Thread Massimo Di Pierro
you are right. I think this is now fixed on google code (not on github because I am behind a firewall and cannot push to github right now). Massimo On Thursday, 16 August 2012 00:42:34 UTC-5, Anthony wrote: > > Massimo, note that prettydate() does fail silently due to a try/except > (the except

[web2py] Re: Using Decorators for RESTful URLs

2012-08-16 Thread Anthony
web2py does not use decorators to specify routes like Flask does (which can get cumbersome and difficult to maintain with lots of routes). Instead, first, you get default routing without making any explicit routing specifications -- see the link I posted earlier: http://web2py.com/books/default

[web2py] Re: Image doesn't appear?

2012-08-16 Thread Massimo Di Pierro
form = SQLFORM(db.staff,record) should be form = SQLFORM(db.staff,record,upload=URL('download')) On Thursday, 16 August 2012 11:43:14 UTC-5, lyn2py wrote: > > Hi guys, > > I'm using > Version 2.00.0 (2012-08-07 22:45:43) dev > > model > db.define_table('staff', > Field('user_id','reference

[web2py] Re: Electronic voting anybody?

2012-08-16 Thread Massimo Di Pierro
Did the two voted at times very close to each other... Did you vote first for 1 or first for 3? On Thursday, 16 August 2012 09:15:10 UTC-5, Rob_McC wrote: > > Massimo: > > Thanks... > > I did more testing this morning, > > 1- set up 3 voters, one with email ending in .on.ca, and I didn't get >

[web2py] Image doesn't appear?

2012-08-16 Thread lyn2py
Hi guys, I'm using Version 2.00.0 (2012-08-07 22:45:43) dev model db.define_table('staff', Field('user_id','reference auth_user',default=auth.user_id,writable= False,readable=False), Field('photo', 'upload', uploadfield='image_file'), Field('image_file', 'blob') ) controller def fo

[web2py] Re: postgres not creating table -- need help with migrate settings

2012-08-16 Thread weheh
Thanks, Massimo. I screwed up -- earlier on I had deleted the *.table file for mytable but I must have not set fake_migrate to False. I just did it again, making sure the fake_migrate=False, and it works. Life is good. --

[web2py] Re: I'm looking sourc Web2Py Electronic Health Record

2012-08-16 Thread Anthony
Are you talking about this: http://code.google.com/p/web2pyhl7/ Anthony On Thursday, August 16, 2012 4:14:12 AM UTC-4, Ulugbek Nurjonov wrote: > > HI all > who can give source Web2Py Electronic Health Record --

[web2py] Re: Small Book Update Needed chapter/29/7#SQLFORM

2012-08-16 Thread Anthony
That's odd -- it's in the markmin. Massimo, any idea what the problem is? On Thursday, August 16, 2012 11:54:45 AM UTC-4, JoeCodeswell wrote: > > Dear web2py Book Team, > > In chapter/29/7#SQLFORM where it is explaining the arguments of the > SQLFORM function, the *buttons *argument doesn't have

[web2py] Re: postgres not creating table -- need help with migrate settings

2012-08-16 Thread Massimo Di Pierro
If you set fake_migrate=True you mean "my table are there, do not create them, but make the .table files". The .table files tell web2py that the tables are in the database. If you then fake_migrate=False and migrate=True, web2py checks the .table and decides the tables are there (because you sa

[web2py] Re: index in list of fields

2012-08-16 Thread Anthony
Field objects inherit from the DAL Expression class, which overloads the "==" operator, which produces a Query object rather than actually testing for equality. So, when comparing the argument passed to index() against Field objects in the list, you will never get a False. If the first item in

[web2py] Re: Is using composite key with SQLFORM.grid allowed ?

2012-08-16 Thread Massimo Di Pierro
No SQLFORM.grid does not support keyed tables. Sorry. On Thursday, 16 August 2012 07:23:15 UTC-5, Mandar Vaze wrote: > > I've an associate table for many-to-many relationship with composite > key defined as follows : > > db.define_table('user_skill', > Field('user', db.user), > Field('

[web2py] Re: Electronic voting anybody?

2012-08-16 Thread Massimo Di Pierro
Strange problem. I have not seen it before. I will double check it. The editor is cleditor. I never used it before but looked simple enough. In particular the plugins are very easy to make compared to other editors. I also like that it supports tables. Massimo On Thursday, 16 August 2012 09:15

Re: [web2py] SQLFORM.smartgrid field labels not I18N

2012-08-16 Thread Massimo Di Pierro
You can use github but mind github does not send notification and sometime they wait there for longer then they should. I always apply patches manually because I have to manage both git and hg. If you email me the patch (or a diff) or post it in a google code issue it is even better for me. Mass

[web2py] Re: index in list of fields

2012-08-16 Thread Massimo Di Pierro
On a second thought probably the index method compares with == and not "is". as in def index(list,value): for k,vin enumerate(list): if v==value: return k raise ValueError, "%s is not in list" % value while it should do def index(list,value): for k,vin enumerate

[web2py] Re: index in list of fields

2012-08-16 Thread Massimo Di Pierro
Cannot reproduce: >>> a=[1,2,3] >>> a.index(0) Traceback (most recent call last): File "", line 1, in ValueError: 0 is not in list On Thursday, 16 August 2012 08:31:51 UTC-5, simon wrote: > > Please can someone explain why, for a list of fields, that > fields.index("anything at all") always e

[web2py] Re: postgres not creating table -- need help with migrate settings

2012-08-16 Thread weheh
Nothing changes if fake_migrate=False and db.define_table('mytable', ... migrate=True). What I want is 'mytable' to be built, which it isn't. On Thursday, August 16, 2012 7:58:44 PM UTC+8, Niphlod wrote: > > and this is fine because you have fake_migrate=True, so, what do you want ? > > On Thursd

[web2py] Small Book Update Needed chapter/29/7#SQLFORM

2012-08-16 Thread JoeCodeswell
Dear web2py Book Team, In chapter/29/7#SQLFORM where it is explaining the arguments of the SQLFORM function, the *buttons *argument doesn't have its name in front of its explanation. Love and peace --

[web2py] ExtendedLoginForm incompatible with class LinkedInAccount?

2012-08-16 Thread Carl
Is ExtendedLoginForm intended to be used by OAuth implementations such as LinkedInAccount? Or only for authentications that use a HTML form to prompt the user for credentials? --

Re: [web2py] Re: client-side validation plugin

2012-08-16 Thread Alec Taylor
Thanks :) On Fri, Aug 17, 2012 at 1:15 AM, Franco wrote: > Try with this version. I need to warning you the python regex are > different of javascript regex, so it could be problematic depending of the > regex that you use. > > El miércoles, 15 de agosto de 2012 00:37:35 UTC-3, Alec Taylor escri

Re: [web2py] Re: client-side validation plugin

2012-08-16 Thread Franco
Try with this version. I need to warning you the python regex are different of javascript regex, so it could be problematic depending of the regex that you use. El miércoles, 15 de agosto de 2012 00:37:35 UTC-3, Alec Taylor escribió: > > Thanks a heap Franco :) > > The only suggestion I have is

[web2py] Re: Is using composite key with SQLFORM.grid allowed ?

2012-08-16 Thread Mandar Vaze
OK, the following may be my own mistake (I changed a normal table to the one with composite key without changing rest of the code) Now, next question : via appadmin, how can I edit a record from a table with contains the composite key ? Normally, user would click on "id" shown in the table which

[web2py] Re: Electronic voting anybody?

2012-08-16 Thread Rob_McC
Massimo: Thanks... I did more testing this morning, 1- set up 3 voters, one with email ending in .on.ca, and I didn't get that one, maybe it is our server, I checked JUNK email, nothing 2- the other 2 emails worked, got email, got voting confirmation, BUT.. confirmation shows I definetly v

Re: [web2py] SQLFORM.smartgrid field labels not I18N

2012-08-16 Thread Felipe Meirelles
Nah, I'll do it, the community is so supportive and its make me on the mood to contribute (: I'll just will need some help to send you a patch, never did it on github On Thu, Aug 16, 2012 at 10:53 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > That would be great. Or simply list the

[web2py] SQLFORM.smartgrid field labels not I18N

2012-08-16 Thread Massimo Di Pierro
That would be great. Or simply list the parts not internationalized --

[web2py] SQLFORM.smartgrid field labels not I18N

2012-08-16 Thread Felipe Meirelles
Yarrr! So, I'm using the smartgrid beta and noticed that some parts of it are not I18N. Should I fix it and send a patch or you guys are working on it already? Thanks --

[web2py] index in list of fields

2012-08-16 Thread simon
Please can someone explain why, for a list of fields, that fields.index("anything at all") always evaluates to 0. For example this prints 23 and 0. t=db.todo fields = [t.id, t.customer, t.subject, t.completed, t.modified_by] if 23 in fields: print("23 is in there") print(fields.index("hshshshs

[web2py] Is using composite key with SQLFORM.grid allowed ?

2012-08-16 Thread Mandar Vaze
I've an associate table for many-to-many relationship with composite key defined as follows : db.define_table('user_skill', Field('user', db.user), Field('skill', db.skill), primarykey=['user', 'skill']) When I use SQLFORM.grid for the above table, I get the following error : Fi

[web2py] Re: postgres not creating table -- need help with migrate settings

2012-08-16 Thread Niphlod
and this is fine because you have fake_migrate=True, so, what do you want ? On Thursday, August 16, 2012 1:55:31 PM UTC+2, weheh wrote: > > > The log shows that the table that's not getting created was created but > with the comment "faked!" after it. Postgres inspection shows table not > create

[web2py] Re: postgres not creating table -- need help with migrate settings

2012-08-16 Thread weheh
The log shows that the table that's not getting created was created but with the comment "faked!" after it. Postgres inspection shows table not created. On Thursday, August 16, 2012 7:07:15 PM UTC+8, Niphlod wrote: > > just open sql.log in the databases folder and see what is going on > > On T

Re: [web2py] Re: LinkedIn Integration - my step by step tutorial

2012-08-16 Thread Alec Taylor
I'm running almost the latest trunk, # 4e02406b61c9de725a0b73ae9b73b71f4b1c2413 (from 16 hours ago) And have been getting this error. Maybe I've misordered things... here is my db.py: http://pastebin.com/1gE50Rnn (my controller is the same as in the web2pyslice page) On Thu, Aug 16, 2012 at 8:

Re: [web2py] I'm looking sourc Web2Py Electronic Health Record

2012-08-16 Thread Alfonso de la Guarda
Hello, I know this list is by web2py and I am a regular user of the framework to generate valuable content, however, when it comes to EMR, we refer to an entire complex system that must be related to imaging, laboratory and administrative systems even that HL7 or Mirth without mentioning ... That

[web2py] Re: How to find duplicate rows with Web2py DAL

2012-08-16 Thread Niphlod
group by your unique columns, count the rows, find the ones with count > 1. db.define_table( 'finddup', Field('f1_name'), Field('f2_name'), Field('f3_name') ) fd = db.finddup count = fd.id.count() rtn = db(fd.id>0).select(fd.f1_name, fd.f2_name, fd.f3_name, count, groupby= fd.f

[web2py] Re: postgres not creating table -- need help with migrate settings

2012-08-16 Thread Niphlod
just open sql.log in the databases folder and see what is going on On Thursday, August 16, 2012 12:12:09 PM UTC+2, weheh wrote: > > Bother again! There is another table that's not getting created, so this > is still an issue. --

Re: [web2py] Re: LinkedIn Integration - my step by step tutorial

2012-08-16 Thread Carl Roach
Then you got a real note resting exception: No module named google.appengine.api I didn't get this. I'm using latest Web2py. On 16 Aug 2012, at 11:51, Alec Taylor wrote: > I'm not using GAE, I've tried to get it working on the Rocket server > and on Red Hat's server (Apache), but both give me

Re: [web2py] Re: LinkedIn Integration - my step by step tutorial

2012-08-16 Thread Alec Taylor
I'm not using GAE, I've tried to get it working on the Rocket server and on Red Hat's server (Apache), but both give me that same error. On Thu, Aug 16, 2012 at 8:48 PM, Carl Roach wrote: > I haven't integrated this LinkedIn with GAE just yet. I'll see if I get the > same exception when I do. >

[web2py] Re: [ANNOUNCE] FPDF for python v1.7: unicode ttf support, png alpha channel and more!

2012-08-16 Thread Andrew
In services chapter. Main heading. Reportlab and PDF. I think the opening sentence should be changed or given some context. I don't know enough about the choices to offer a suggestion. --

Re: [web2py] Re: LinkedIn Integration - my step by step tutorial

2012-08-16 Thread Carl Roach
I haven't integrated this LinkedIn with GAE just yet. I'll see if I get the same exception when I do. On 16 Aug 2012, at 11:45, Alec Taylor wrote: > I for one couldn't get the session variable to work properly, and > received an error (see: > https://groups.google.com/forum/#!topic/web2py/D7hwg

Re: [web2py] Re: LinkedIn Integration - my step by step tutorial

2012-08-16 Thread Alec Taylor
I for one couldn't get the session variable to work properly, and received an error (see: https://groups.google.com/forum/#!topic/web2py/D7hwgsbBemk) On Thu, Aug 16, 2012 at 8:38 PM, Carl wrote: > Having used Udi's additions to Web2py to get basic authentication using > LinkedIn working I'd like

[web2py] I'm looking sourc Web2Py Electronic Health Record

2012-08-16 Thread Ulugbek Nurjonov
HI all who can give source Web2Py Electronic Health Record --

Re: [web2py] Graphs

2012-08-16 Thread Andrew
I plan to do one, but you simply provide a json or csv service / URL with web2py, and then use it in a view with the d3 JavaScript code. D3 takes some learning, and I still have a long way to go. --

[web2py] Re: LinkedIn Integration - my step by step tutorial

2012-08-16 Thread Carl
Having used Udi's additions to Web2py to get basic authentication using LinkedIn working I'd like to interact with the LinkedIn API. I can get to this functonality using linkedin.py (by Ozgur Vatansever) in a controller using "auth.settings.login_form.session.linkedin" e.g., auth.settings.login_

[web2py] Re: postgres not creating table -- need help with migrate settings

2012-08-16 Thread weheh
Bother again! There is another table that's not getting created, so this is still an issue. --

[web2py] Re: postgres not creating table -- need help with migrate settings

2012-08-16 Thread weheh
Ah, heck. I decided to rename the table and got it to work. I'm wondering ... I have a function under models where it says def migrate_queue(): I'm wondering if this creates a conflict and causes the system to not create the desired table? --

[web2py] postgres not creating table -- need help with migrate settings

2012-08-16 Thread weheh
I've added a new table to my existing postgres db but it's not getting created. My DAL and table settings are as follows: db = DAL( 'postgres://...my_credentials...', pool_size=20, migrate_enabled=True, fake_migrate=True, ) db.define_table( 'migrate_queue', Field('use

[web2py] Re: KeyError: 'name' when inserting/updating via appadmin

2012-08-16 Thread Mandar Vaze
Duplicate of http://code.google.com/p/web2py/issues/detail?id=648 The error goes away if "unique=True" is removed. -Mandar On Monday, August 13, 2012 1:02:55 PM UTC+5:30, Mandar Vaze wrote: > > Done. > http://code.google.com/p/web2py/issues/detail?id=931 > > -Mandar > > On Saturday, August 11, 2

[web2py] Re: Table Inheritance (Was Re: KeyError : 'name' when inserting/updating via sqlform.grid)

2012-08-16 Thread Mandar Vaze
Duplicate of http://code.google.com/p/web2py/issues/detail?id=648 The error goes away if "unique=True" is removed. -Mandar On Thursday, August 9, 2012 9:13:36 PM UTC+5:30, Mandar Vaze wrote: > > I figured out that problem is due to the way I have defined Table > Inheritance for mother/father/chi

[web2py] How to find duplicate rows with Web2py DAL

2012-08-16 Thread Loreia
Hi, I am looking for a way to automatically find any possible duplicate records (rows) in one table of my Postgres database. Quick google-ing reveals it is easy to do it with pure SQL, e.g. one way specific for Postgres: http://stackoverflow.com/questions/1746213/how-to-delete-duplicate-entries

  1   2   >