[web2py] Re: 'tzinfo' is an invalid keyword argument for this function

2014-01-13 Thread Graham Robbins
Option 2 is fine for me, changing d = datetime.date(year , value.month , value.day

[web2py] Re: parse_as_rest, multiple fields to select

2014-01-13 Thread Zbigniew Pomianowski
Sounds great! In my opinion it would be very useful feature. W dniu sobota, 11 stycznia 2014 21:54:54 UTC+1 użytkownik Massimo Di Pierro napisał: > > No but it should be easy to add the ability to do it. I would use the > syntax > > "/friend[person]/{person.id}/:field1,field2" > > Please open a

[web2py] Re: How to use a bootstrap button group as radio buttons in a custom form

2014-01-13 Thread David Gawlowski
Thanks Alan - I'm still trying to get the intended result: Bootstrap buttons that function like radio buttons. I studied fields being brought in as normal radios, and like you suggested added the names: which DOES work until you change the type to button: at which point the value is NO

[web2py] Re: How to use a bootstrap button group as radio buttons in a custom form

2014-01-13 Thread Alan Etkin
> > Thanks Alan - I'm still trying to get the intended result: Bootstrap > buttons that function like radio buttons. I studied fields being brought > in as normal radios > Have you tried setting name="opt" for this input instead (leaving the options with their original attributes)? -- Re

[web2py] REF: Web2py database issue

2014-01-13 Thread Teddy Nyambe
I have two web2py apps, one updates database the other app should just read. But i want the readonly app to have its own db to ready from with selected tables from the main db. Whats the best way to replicate selected tables and monitor changes to main db. Secondly what would be the configuration o

[web2py] rocket-server and --interface

2014-01-13 Thread Martin Weissenboeck
What I want to have: A website, which could be accessed by the https-protocoll (for the administration) and by the http-protokoll (as service for some ip-phones). I have tried: - nohup /usr/local/bin/python2.7 web2py.py -a 123456 --interface xx.xx.xx.xx:8008:server.key:server.crt & -

[web2py] Re: Suggestions required for Sorting GRID

2014-01-13 Thread Massimo Di Pierro
You can do something like: results = results.sort(lambda row: row.first_name) On Sunday, 12 January 2014 22:21:03 UTC-6, Sarbjit wrote: > > As per suggestions from this > post.I > ha

[web2py] Crash on SQLFORM submission

2014-01-13 Thread Neil
I'm having a problem that I can't get to the bottom of. The crash happens when a user submits an automatically generated SQLFORM. Here is the traceback from the ticket: File "/home/aicbt/webapps/alternate_config/web2py2.5.1/gluon/html.py", line 2189, in process self.validate(**kwargs) F

Re: [web2py] rocket-server and --interface

2014-01-13 Thread Jonathan Lundell
On 13 Jan 2014, at 5:28 AM, Martin Weissenboeck wrote: > What I want to have: > > A website, which could be accessed by the https-protocoll (for the > administration) and by the http-protokoll (as service for some ip-phones). > > > I have tried: > > nohup /usr/local/bin/python2.7 web2py.py -a

[web2py] Re: keepvalues - need help with this

2014-01-13 Thread Massimo Di Pierro
Have you tried replacing value="{{=form.custom.inpval['country']}}" with value="{{=form.custom.dspval['country']}}" On Sunday, 12 January 2014 22:50:43 UTC-6, subbaram...@gmail.com wrote: > > Really would like some help with this. Anyone have suggestions? > Thank you, > Kiran > > On Saturday, J

[web2py] Re: Crash on SQLFORM submission

2014-01-13 Thread Massimo Di Pierro
DataError is not a web2py or a python error. It is an error from the driver. I suspect you have an "integer" field which you changed to "string". Web2py knows about the change but the database does not and refuses to store a string in it. Delete everything under "databases". You will lose data

Re: [web2py] rocket-server and --interface

2014-01-13 Thread Jonathan Lundell
On 13 Jan 2014, at 6:10 AM, Jonathan Lundell wrote: > On 13 Jan 2014, at 5:28 AM, Martin Weissenboeck wrote: >> What I want to have: >> >> A website, which could be accessed by the https-protocoll (for the >> administration) and by the http-protokoll (as service for some ip-phones). >> >> >>

Re: [web2py] Re: request.uri_language

2014-01-13 Thread Gael Princivalle
Thanks Alan, Jonathan. I've test more this simple solution: routers = dict( BASE = dict(default_application=' test'), test = dict(languages=['en', 'it'], default_language='it'), ) And it works fine for me. The only problem I have now if for switching between two languages reloading the

Re: [web2py] Re: request.uri_language

2014-01-13 Thread Jonathan Lundell
On 13 Jan 2014, at 7:00 AM, Gael Princivalle wrote: > Thanks Alan, Jonathan. > > I've test more this simple solution: > routers = dict( > BASE = dict(default_application=' > test'), > test = dict(languages=['en', 'it'], default_language='it'), > ) > > And it works fine for me. > > The

Re: [web2py] Re: request.uri_language

2014-01-13 Thread Gael Princivalle
That's a good solution, thanks. In the meantime I've found that you have to specify with C=...the controller and f=... the functiuon in the URL helper. That like that it works fine: {{response.menu.append(('IT', False, URL('it', f=request.function), [('EN', False, URL('en', f=request.function),

Re: [web2py] Re: request.uri_language

2014-01-13 Thread Jonathan Lundell
On 13 Jan 2014, at 7:48 AM, Gael Princivalle wrote: > That's a good solution, thanks. > > In the meantime I've found that you have to specify with C=...the controller > and f=... the functiuon in the URL helper. > > That like that it works fine: > {{response.menu.append(('IT', False, URL('it',

[web2py] Re: keepvalues - need help with this

2014-01-13 Thread subbaraman . kiran
Massimo, Yes, I did. Does not make a difference. Thanks for the suggestion, Kiran On Monday, January 13, 2014 7:49:15 PM UTC+5:30, Massimo Di Pierro wrote: > > Have you tried replacing > > value="{{=form.custom.inpval['country']}}" > > with > > value="{{=form.custom.dspval['country']}}" > > On S

Re: [web2py] Re: Writing Web2Py specification and finding free lance Web2Py coders

2014-01-13 Thread Calvin Morrison
elance.com? On 11 January 2014 23:04, Simon Ashley wrote: > Often thought that it would be good to push this to another level. We have > projects from time to time that would be good to outsource, if people were > interested. Something like a project post board, with bidders, assignment, > monito

[web2py] Re: Crash on SQLFORM submission

2014-01-13 Thread Neil
This doesn't seem to be the case: - I looked at the database, and the types match the definition in the model - I can't see how that would only cause problems for one user out of thousands. Any other things I can check out? On Monday, 13 January 2014 14:21:55 UTC, Massimo Di Pierr

[web2py] Detecting OS issue

2014-01-13 Thread Andrew Evans
Hello I am trying to figure out how to detect if a computer is running Windows or Macintosh then load the appropriate files and if any other system Linux/Mobile etc then load the other files The reason for this is I am using Google Earth in a project and I want to load Google Maps if it is not ava

[web2py] Re: Crash on SQLFORM submission

2014-01-13 Thread Neil
Figured it out - I was on the wrong track. It was something the user was typing in. There is a field called "Year of birth", and the user was typing in date, month, year & ?? (e.g. "2909501950"). It passed the integer validator, but it is out of range for a postgresql integer. I guess I shoul

[web2py] Re: Crash on SQLFORM submission

2014-01-13 Thread Rob Mayhue
Have a look at the request vars on the ticket page and see what was actually submitted. That might provide you a clue. On Monday, January 13, 2014 1:10:43 PM UTC-5, Neil wrote: > > This doesn't seem to be the case: > >- I looked at the database, and the types match the definition in the >

[web2py] Re: iframe without iframe

2014-01-13 Thread Rob Mayhue
Have a look at jQuery.load() http://api.jquery.com/load/ You should be able to do something like $( '#element').load( "//web2py/a/f/c/view.html" ); On Sunday, January 12, 2014 6:30:40 PM UTC-5, Kenneth wrote: > > Hello, > > is there a way of integration data from an web2py site into an other

Re: [web2py] REF: Web2py database issue

2014-01-13 Thread Richard Vézina
web2py readonly : You implement select only in your app function everywhere : db().select() SQLFORM(..., readonly=True) SQLFORM.grid(..., deletable=False, editable=False, create=Flase, details=True, selectable=True) Replication : An audit trail on your table that received the new data should be

Re: [web2py] REF: Web2py database issue

2014-01-13 Thread Anthony
Also, set DAL(..., migrate_enabled=False) to prevent migrations. Anthony On Monday, January 13, 2014 2:35:40 PM UTC-5, Richard wrote: > > web2py readonly : > You implement select only in your app function everywhere : > > db().select() > > SQLFORM(..., readonly=True) > > SQLFORM.grid(..., deletab

[web2py] linux shell scripts and web2py

2014-01-13 Thread Adam Detektyw
Hi I consider use web2py but I have one question. I have big linux application built from many linux shell scripts and I would like to run it under web2py, but I dont know it is possible. Generally I want to use web2py/html/jquery as grapfic interface to that all scripts. Is any inner functio

[web2py] Re: keepvalues - need help with this

2014-01-13 Thread Massimo Di Pierro
Strange. How about {{=request.vars.country or form.custom.inpval['country']}} On Monday, 13 January 2014 11:13:33 UTC-6, subbaram...@gmail.com wrote: > > Massimo, > Yes, I did. Does not make a difference. > > Thanks for the suggestion, > Kiran > > On Monday, January 13, 2014 7:49:15 PM UTC+5:30,

[web2py] Re: Crash on SQLFORM submission

2014-01-13 Thread Derek
look at is_int_in_range()... http://web2py.com/examples/static/epydoc/web2py.gluon.validators.IS_INT_IN_RANGE-class.html Also, don't store years as ints. Database basics, man. On Monday, January 13, 2014 11:30:12 AM UTC-7, Neil wrote: > > Figured it out - I was on the wrong track. It was somethi

Re: [web2py] linux shell scripts and web2py

2014-01-13 Thread Richard Vézina
It's surely possible... Don't know the complexity of you shell script, but I would suggest to pick some of the simple one and try to implement them in web2py directly... Maybe Fabric could be of some interest for you since it a pretty nice gateway to shell script from python... Richard On Mon, J

[web2py] Re: Detecting OS issue

2014-01-13 Thread Limedrop
Have a look at python's platform module. For example: import platform if platform.system() == 'Windows': elif platform.system() == 'Linux': On Tuesday, January 14, 2014 7:26:09 AM UTC+13, Jon Smith wrote: > > Hello I am trying to figure out how to detect if a comput

[web2py] Re: Detecting OS issue

2014-01-13 Thread Niphlod
that's going to tell if the SERVER is win,linux or mac @john. start "small". embed {{=BEAUTIFY(request.user_agent())}} in your view and start from there to see what's the missing key you're trying to inspect. On Monday, January 13, 2014 9:12:24 PM UTC+1, Limedrop wrote: > > Have a look a

[web2py] Does migration from a 'string' field to a 'list:string' field preserve data?

2014-01-13 Thread User
Does a migration from a 'string' field to a 'list:string' field preserve string data that is already in the database and convert it to the format required by list:string? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Pygal

2014-01-13 Thread Janko Strusa
I am trying to use http://pygal.org/ with my web2py. But I can't import paygal. Since I am new to python programing I've got lost. I've tried "easy_install pygal" in shell, like from this example http://www.web2pyslices.com/slice/show/1634/beauty-graphics-and-charts-with-pygal but it does not

Re: [web2py] Pygal

2014-01-13 Thread José Ricardo Borba
Maybe you can try this [1] to import pygal. With this example, you need to generate a SVG file and after, show in the page [2]. [1] - http://pygal.org/first_steps/ [2] - http://edutechwiki.unige.ch/en/Using_SVG_with_HTML5_tutorial#Embeding_SVG_in_HTML_5_with_the_src_tag Cheers, 2014/1/13 Janko

Re: [web2py] Re: Writing Web2Py specification and finding free lance Web2Py coders

2014-01-13 Thread Simon Ashley
Yep but more community based and focused. W2p is still just a small subset of the hire a contractor market. Elements could be open sourced and used by the wider community as slices. Maybe bounties/ rewards/ competitions to push applications that are currently thought bubbles (albeit mature ones

[web2py] Compile app from command line

2014-01-13 Thread Wonton
Hello everyone, I'm compiling my local apps with this command: python -c "import gluon.compileapp; gluon.compileapp.compile_application('applications/')" And everything is working well. But when I try to do the same thing in the server (as admin), in the production environment I get this error

Re: [web2py] Compile app from command line

2014-01-13 Thread Ricardo Pedroso
On Mon, Jan 13, 2014 at 11:08 PM, Wonton wrote: > Hello everyone, > > I'm compiling my local apps with this command: > > python -c "import gluon.compileapp; > gluon.compileapp.compile_application('applications/')" > > And everything is working well. But when I try to do the same thing in the > ser

[web2py] Re: Does migration from a 'string' field to a 'list:string' field preserve data?

2014-01-13 Thread User
I just test this with a simple app using SQLite database and it seems that it doesn't quite work. It appears it will truncate the string data that exists in the string field. Specifically it will remove the first and last character of whatever is in the string field. For example: "hello" ->

Re: [web2py] Compile app from command line

2014-01-13 Thread Wonton
That must be the problem. Both versions are very different. My local version is 2.7.5 (default, Aug 25 2013, 00:04:04) and the server version is 2.4.3 (#1, Jun 18 2012, 08:55:23). I will try to update the server versionand see what happens. Thank you very much Ricardo! On Tuesday, January 14,

Re: [web2py] LDAP Auth

2014-01-13 Thread Maggs
Hi Richard, Thank you for your reply. I have since made this work for my purposes by modifying the framework. Thanks, Maeghan On Friday, December 20, 2013 6:43:35 AM UTC-8, Richard wrote: > > Could you show your mods? > > It could help to understand the issue you have how we can solve them...

[web2py] LDAP Auth

2014-01-13 Thread Maggs
Hi all, I am running web2py 2.5.1 and have my auth set up to use secure ldap. Since switching from regular to secure ldap, I've noticed that web2py no longer saves the passwords of any newly added accounts to the db. Though I understand the reason for this since it's secure and all, I do actual

Re: [web2py] REF: Web2py database issue

2014-01-13 Thread Teddy Nyambe
Brilliant, am using mural db...have found an inbuilt replication feature in mysql. So will try out the dam(..., migrate_enabled=False) feature for read only. And of course will use only select statements in the read only app. Thanx On 13 Jan 2014 21:42, "Anthony" wrote: > Also, set DAL(..., migr

[web2py] Storing lots of txt files: Database or Filesystem? Advantages/Disadvantages

2014-01-13 Thread Brando
- The files will not be larger than say 200kb, but there will be lots of them(1000's). - Users will need to download the original file. - The files will be parsed on the initial upload, but I don't expect to touch the files much after that. - The files will have sensiti

[web2py] Need a Web2py tutor/mentor.

2014-01-13 Thread Brando
I don't know anyone who builds webapps with python. I've watched A LOT of videos and read A LOT of posts about web2py. I've got the basics down and have built a couple of basic apps using web2py. I'd like to find a tutor/mentor who could spend a couple of hours with me (skype/google hangout

[web2py] Re: Storing lots of txt files: Database or Filesystem? Advantages/Disadvantages

2014-01-13 Thread 黄祥
please check this discussion. https://groups.google.com/forum/#!topic/web2py/t83nQfT24gE best regards, stifan -- 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)

Re: [web2py] Compile app from command line

2014-01-13 Thread LightDot
Looking at your python version, you're running a RHEL 5 (or a derivative, such as CentOS). Just a word of caution if you decide to attempt updating the OS python's version - search the net for previous experiences. It's not straightforward, as other important parts of the OS depend on it (ie. yu

[web2py] Re: How to use a bootstrap button group as radio buttons in a custom form

2014-01-13 Thread David Gawlowski
Thanks again Alan, but the name in the original was just an example and in the second post I reverted to actual variables, which is why you see "parts"... and alas that did not fix it. that said I *think* I have it working, just need to battle through the CSS nightmare that is bootstrap and fig

Re: [web2py] Re: keepvalues - need help with this

2014-01-13 Thread Kiran Subbaraman
Yes, that works: use request.vars.*. That was the option which I had mentioned I may need to resort to, since *keepvalues *doesn't seem to work for me. This basically comes down to me creating a bunch of widgets; mirroring the ones in web2py, where a widget would have logic, similar to the one

[web2py] Is there a way to have a field in one table be computed by a field in another table?

2014-01-13 Thread Apple Mason
In the online doc on computed field, the computed fields uses a field in the current table, and not in another table. I modified the one-to-many example by adding a 'total_items' field on person. If I want 'total_items' to be the sum of all items the person currently has, and this field should

[web2py] Re: SQLFORM and IS_IN_SET problem

2014-01-13 Thread User
So I tested the migration feature and string to list:string doesn't work. So we are left with the fact that a list:string field with IS_IN_SET multiple=False will not select the current value in an SQLFORM. Seems kind of like a bug to me, does anyone else think so? On Tuesday, January 7, 2014

[web2py] Re: Does migration from a 'string' field to a 'list:string' field preserve data?

2014-01-13 Thread User
It appears it will leave the string data that exists in the string field alone in the database, however web2py will interpret it such that the first and last character are truncated. For example: "hello" -> "ell" "something" -> "omethin" "world" -> "orl" As soon as you add another list item

Re: [web2py] Is there a way to have a field in one table be computed by a field in another table?

2014-01-13 Thread Kiran Subbaraman
|compute=#lamdba r: db(db.thing.owner_id == r).count()| Would something like this work? Am just guessing here, and not something that I have tried out. Kiran Subbaraman http://subbaraman.wordpress.com/about/ On 1/14/2014 11:18 AM, Apple Mason wrote: In

[web2py] Re: Data Fixtures

2014-01-13 Thread User
I have the same question. Is there any update on this almost 2 years later? On Thursday, March 8, 2012 4:32:45 PM UTC-5, Bruce Wade wrote: > > Hi, > > I have seen lots of postings about people wanting to pre-load data > (fixtures) in web2py. However I have never found a standard solution. > > Wh