[web2py] Change title of db field in a DAL select

2013-03-06 Thread at
Can we change title of a field in DAL select? e.g. in rows=db().select(db.persons.name, db.persons.dob, db.persons.occupation), can we change db.persons.dob title to Date of Birth in resultset i.e. in rows? Thanks -- --- You received this message because you are subscribed to the Google

[web2py] Re: GAE Hosting Issue

2013-03-06 Thread Philip Kilner
Hi Christian, On 06/03/13 07:42, Christian Foster Howes wrote: the ticket you linked to looks like it is not failing on the connection, but rather failing on a query. these 2 line are of interest to me: File /base/data/home/apps/s~gk-hercules/1.365624770532609305/gluon/dal.py, line 4115,

[web2py] Re: Change title of db field in a DAL select

2013-03-06 Thread 黄祥
yes, it can please use label e.g. db.person.dob.label=T('Date of Birth') or if you use sqltable you can use headers http://web2py.com/books/default/chapter/29/06#Serializing-Rows-in-views -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To

[web2py] Re: [newbee] - JqGrid - To get back the valor of a field

2013-03-06 Thread openoc80
On Tuesday, March 5, 2013 7:19:45 PM UTC+1, open...@gmail.com wrote: Hi, I am newbee on Web2py, I am exploring it. I installed the jqGrid_plugin that works fine. But now I should like to get back the id of the record or the valor of a field but it is a JQuery that I don't know. I did

[web2py] Re: [newbee] - JqGrid - To get back the valor of a field

2013-03-06 Thread openoc80
Richard, dlypka, Willoughby Thanks for your reply. I think that I am going to see the SQLFORM and its possibilities (I follow the Richard 's advice ). I don't know javascript and I think it will be too complicated to do an application quickly if I have to learn JQuery. I am going to try all

[web2py] Raising HTTP errors as JSON?

2013-03-06 Thread Alec Taylor
How do I raise HTTP errors as JSON? My attempt: In [1]: import json In [2]: from gluon.http import HTTP In [3]: raise HTTP(412, json.dumps({'error': 'must accept terms'})) --- HTTP

[web2py] Re: Change title of db field in a DAL select

2013-03-06 Thread at
thanks for the swift response! when this label statement should be run ... before or after running * db().select*? regards On Wednesday, 6 March 2013 13:29:21 UTC+5, 黄祥 wrote: yes, it can please use label e.g. db.person.dob.label=T('Date of Birth') or if you use sqltable you can use

[web2py] Re: Raising HTTP errors as JSON?

2013-03-06 Thread Niphlod
what did you expect ? On Wednesday, March 6, 2013 9:37:26 AM UTC+1, Alec Taylor wrote: How do I raise HTTP errors as JSON? My attempt: In [1]: import json In [2]: from gluon.http import HTTP In [3]: raise HTTP(412, json.dumps({'error': 'must accept terms'}))

[web2py] Re: Change title of db field in a DAL select

2013-03-06 Thread 黄祥
i'm usually use it on models for : db.person.dob.label=T('Date of Birth') the other solution is to use labels in form (SQLFORM, CRUD, GRID) http://web2py.com/books/default/chapter/29/07 -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To

[web2py] Re: SQLFORM.grid in Components oddity

2013-03-06 Thread Niphlod
Use different formname(s) parameter for each grid. Should solve all the issues you're seeing. -- --- 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: Book 5th edition out

2013-03-06 Thread Niphlod
I had started to code an app for that but parsing MARKMIN fragments is a PITA ATM it can only show the raw markmin source differencies. On Wednesday, March 6, 2013 2:05:57 AM UTC+1, Aleš Holubec wrote: Is there simple way how to highlight changes against last version? Dne úterý, 5.

[web2py] Re: Change title of db field in a DAL select

2013-03-06 Thread at
actually I wanted to change this label just in current record set, I mean in *rows* only; is it possible? thanks On Wednesday, 6 March 2013 14:18:32 UTC+5, 黄祥 wrote: i'm usually use it on models for : db.person.dob.label=T('Date of Birth') the other solution is to use labels in form

[web2py] Re: web2py 2.4.2 is OUT

2013-03-06 Thread Niphlod
there's a scheduler monitor plugin too. On Wednesday, March 6, 2013 12:41:22 AM UTC+1, Tim Richardson wrote: Thanks for 2.4.2. I manually updated on Windows and my apps are all working (although for a couple I needed to delete the scheduler tables and update some queries to new field names,

[web2py] Re: SQLFORM.grid in Components oddity

2013-03-06 Thread Philip Kilner
Hi Niphlod, On 06/03/13 09:19, Niphlod wrote: Use different formname(s) parameter for each grid. Should solve all the issues you're seeing. D'oh! Sorted - thank you. -- Regards, PhilK e: p...@xfr.co.uk - m: 07775 796 747 'work as if you lived in the early days of a better nation' -

[web2py] Re: SQLFORM.grid in Components oddity

2013-03-06 Thread Niphlod
glad it works ok. happened at me some time ago and I sent a patch for that. On Wednesday, March 6, 2013 10:28:33 AM UTC+1, Philip Kilner wrote: Hi Niphlod, On 06/03/13 09:19, Niphlod wrote: Use different formname(s) parameter for each grid. Should solve all the issues you're seeing.

[web2py] Re: Change title of db field in a DAL select

2013-03-06 Thread Niphlod
you can do it after retrieving it. After all, you define a model to be consistent ^_^ . PS: the resultset is ~ a list of dictionaries, so you can play with it freely. On Wednesday, March 6, 2013 10:21:39 AM UTC+1, at wrote: actually I wanted to change this label just in current record set, I

Re: [web2py] Re: Raising HTTP errors as JSON?

2013-03-06 Thread Alec Taylor
Oh, looks like it works on an endpoint level; not sure how to get rid of the XML style comment though !-- -- Output from curl: GET /arbg/error HTTP/1.1 Host: localhost Accept: */* HTTP/1.1 404 NOT FOUND Set-Cookie: session_id_arbg=127.0.0.1-d5613ca1-ff65-4c0e-a5ce-737c6024655d; Path=/

[web2py] GAE orderby date not working

2013-03-06 Thread Jaime Sempere
Hi, I've been searching about this but can't found any info abut it. I have an application which locally work well, but when I upload and test it in google app engine this line gives me error: for row in db(db.posts.thread_id==thread_id).select(orderby=db.posts. post_date): Google app

Re: [web2py] Re: web2py 2.4.2 is OUT

2013-03-06 Thread Alec Taylor
For Windows PyDot is the native Python solution; which unlike PyGraphViz; doesn't require C extensions built. Will have a go at abstracting the implementation so either can be used first chance I get (probably not starting for another 7 days) On Wed, Mar 6, 2013 at 6:16 AM, Derek

Re: [web2py] Re: web2py 2.4.2 is OUT

2013-03-06 Thread António Ramos
Why dont you use a javascript library for the graph? This way you dont have problems with with windows/linux 2013/3/6 Alec Taylor alec.tayl...@gmail.com For Windows PyDot is the native Python solution; which unlike PyGraphViz; doesn't require C extensions built. Will have a go at

Re: [web2py] Re: Raising HTTP errors as JSON?

2013-03-06 Thread Ricardo Pedroso
On Wed, Mar 6, 2013 at 9:43 AM, Alec Taylor alec.tayl...@gmail.com wrote: Oh, looks like it works on an endpoint level; not sure how to get rid of the XML style comment though !-- -- Output from curl: GET /arbg/error HTTP/1.1 Host: localhost Accept: */* HTTP/1.1 404 NOT FOUND

Re: [web2py] Re: Raising HTTP errors as JSON?

2013-03-06 Thread Alec Taylor
401 was actually the error code that would be relevant there. Surprised that the XML comments were removed in 2.4.2; had been tracing the commits. Just checked and noticed I am on 02.21.10.15.58 and it was fixed in 02.22.18.44.48 . Thanks for the other tips; should be helpful :D On Wed, Mar 6,

Re: [web2py] Re: web2py 2.4.2 is OUT

2013-03-06 Thread Phyo Arkar
D3.js is far better than pydot , pygraphviz . On Wed, Mar 6, 2013 at 5:05 PM, António Ramos ramstei...@gmail.com wrote: Why dont you use a javascript library for the graph? This way you dont have problems with with windows/linux 2013/3/6 Alec Taylor alec.tayl...@gmail.com For Windows

Re: [web2py] Re: Raising HTTP errors as JSON?

2013-03-06 Thread Alec Taylor
FYI: I get: Content-Type: application/json When I have: `response.view = 'generic.json'`, e.g.: on a `@request.restful()` On just a regular GET request on a `@service.json` endpoint I get: Content-Type: text/html; charset=UTF-8 And with a POST that has its args given with `-d` curl arg I get:

Re: [web2py] Re: web2py 2.4.2 is OUT

2013-03-06 Thread Alec Taylor
TBH: They're all lacking. The best option would be to get model import with wwwsqldesigner working: https://github.com/ondras/wwwsqldesigner Using just JavaScript, it currently allows you to visually design your database schemas. At the moment it only supports export to web2py DAL; but if

Re: [web2py] Re: Raising HTTP errors as JSON?

2013-03-06 Thread Niphlod
If on old version, you can zero out the returning an iterator (or a list) instead of the body, i.e raise HTTP(401, [json.dumps(whatever)]) vs raise HTTP(401, json.dumps(whatever)) On Wednesday, March 6, 2013 12:15:07 PM UTC+1, Alec Taylor wrote: 401 was actually the error code that would

Re: [web2py] Detect web2py main process exit on cron process

2013-03-06 Thread Álvaro J . Iradier
Proposition: I have made a small proposed patch to newcron.py, in order to keep a list of cron subprocesses and send a terminate signal when web2py exists. See attached newcron.py.diff. A lock should be added when accessing the _cron_subprocs list, to avoid thread concurrency. Also, I noticed

Re: [web2py] Re: Raising HTTP errors as JSON?

2013-03-06 Thread Alec Taylor
Not to worry, already upgraded all my servers On Wed, Mar 6, 2013 at 11:58 PM, Niphlod niph...@gmail.com wrote: If on old version, you can zero out the returning an iterator (or a list) instead of the body, i.e raise HTTP(401, [json.dumps(whatever)]) vs raise HTTP(401,

[web2py] Re: web2py 2.4.2 is OUT

2013-03-06 Thread Paolo Caruccio
For a similar project please see https://groups.google.com/d/msg/web2py/6obMbP6OY6A/QfjoDpZqCJAJ It uses javascript libraries and it is simple to implement. I didn't tested extensively so please report your feedback. Il giorno martedì 5 marzo 2013 18:48:27 UTC+1, LightDot ha scritto: I know

Re: [web2py] Re: [newbee] - JqGrid - To get back the valor of a field

2013-03-06 Thread Richard Vézina
If you have no particular reason to use jqGrid, for example inline edition or other feature that offer this jQuery plugin stay away from it because not many users here we be able to help you with it. You will have much more help if you stick with web2py feature like SQLFORM.grid(). Cheer!

Re: [web2py] GAE orderby date not working

2013-03-06 Thread Jonathan Lundell
On 6 Mar 2013, at 2:12 AM, Jaime Sempere jaimesemp...@gmail.com wrote: I've been searching about this but can't found any info abut it. I have an application which locally work well, but when I upload and test it in google app engine this line gives me error: for row in

[web2py] Is this a bug? DAL update records using an expression

2013-03-06 Thread Cliff Kachinske
Apparently I can add a negative number in an update expression but I cannot subtract a positive number. Snippet: delta = new_allocation - record.quantity_allocated db(db.production_jobs.id==record.production_job_id).update( quantity_on_hand=db.production_jobs.quantity_on_hand -

[web2py] Cascading drop down list with a SQLFORM

2013-03-06 Thread José Manuel López Muñoz
Hi, I have a table with Offers that belongs to hotels that belongs to Cities . Now I have a SQLFORM that help me to create new offers and I want to make a cascading drop down list for all the hotels in a City when a City is created. I have found the way that Massimo recommends:

[web2py] [solved] Re: Facebook conect and ExtendedLoginForm()

2013-03-06 Thread Relsi Hur Maron
Hi, I managed to solve it using the Diego Sorrilha sample [1https://github.com/r4bugento/web2social]. If more anyone to need, gets the reference. =) [1] https://github.com/r4bugento/web2social Em terça-feira, 5 de março de 2013 00h17min48s UTC-3, Relsi Hur Maron escreveu: Hi guys!!

[web2py] Web2Py hangs

2013-03-06 Thread Demsar
Hi! I am completely newbie in web2py and I'm my first application with it Today I discovered that after some changes in model in my application (uses sqlite) web2py hangs! Web2py - newest version System: Windows x64 It * it does not respond to WebBrowser requests. There is just no answer to

[web2py] /n is shown when reading from file and shown in view

2013-03-06 Thread Kashif
I'm connecting remotely to a server and executing script. I am also see the output on my web2py page, but the problem is when I use view then instead of aligning things in new lines I see /n and lines are not separated. Pls let me know how can I get the actual new line instead of /n characters.

[web2py] Re: Book 5th edition out

2013-03-06 Thread Alan Etkin
ATM it can only show the raw markmin source differencies. More than enough for those wanting to update older edition translations. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails

[web2py] Re: Book 5th edition out

2013-03-06 Thread Niphlod
It's based on git diffs anyway, but nonetheless I'll work on it tonight, an maybe later we can think to an addition to the current web2py-book app. On Wednesday, March 6, 2013 5:29:21 PM UTC+1, Alan Etkin wrote: ATM it can only show the raw markmin source differencies. More than enough for

Re: [web2py] Re: web2py 2.4.2 is OUT

2013-03-06 Thread Adnan Smajlovic
Thanks for a new version. Will upgrade production tonight or tomorrow morning :) On Sunday, March 3, 2013 8:38:19 PM UTC-7, Massimo Di Pierro wrote: The book will be out shortly describing this version. I am sure there are some corners to iron but I could not wait any longer. Changelog:

Re: [web2py] Web2Py hangs

2013-03-06 Thread Philip Kilner
Hi Demsar, On 06/03/13 13:16, Demsar wrote: At this point I restarted it twice and its started to work and, at least, show Tickets. But theese hangups really worry me :( Have you made extensive changes to your modal against an SQLite database? SQLite is very convenient, but has some

[web2py] good linux security tips

2013-03-06 Thread Massimo Di Pierro
http://plusbryan.com/my-first-5-minutes-on-a-server-or-essential-security-for-linux-servers -- --- 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: Is this a bug? DAL update records using an expression

2013-03-06 Thread Massimo Di Pierro
According to the code: if self.type in ('integer','bigint'): result_type = 'integer' elif self.type in ['date','time','datetime','double','float']: result_type = 'double' else: raise SyntaxError(subtraction operation not supported for type) what is the type

Re: [web2py] good linux security tips

2013-03-06 Thread António Ramos
nice! 2013/3/6 Massimo Di Pierro massimo.dipie...@gmail.com http://plusbryan.com/my-first-5-minutes-on-a-server-or-essential-security-for-linux-servers -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and

Re: [web2py] Re: proper way to transform a query GAE #1

2013-03-06 Thread Jaime Sempere
Thanks a lot for pointing me the way, now is working I am a beginner in web2py GAE and I didn't know anything about index.yaml. I was developing locally with web2py and uploading directly to GAE (in the beginning I used locally GAE, but later I skipped this step). So index.yaml was not being

Re: [web2py] GAE orderby date not working

2013-03-06 Thread Jaime Sempere
Thanks a lot for pointing me the way, now is working I am a beginner in web2py GAE and I didn't know anything about index.yaml. I was developing locally with web2py and uploading directly to GAE (in the beginning I used locally GAE, but later I skipped this step). So index.yaml was not being

[web2py] Access the database for current user

2013-03-06 Thread contact . urbangatherer
I am new to web2py and am having a problem understanding / finding an answer to the following. I have extended the Auth database in Web2py to include the following fields: street city country how would i read the street, city, country of the currently logged on user and apply it look up a

[web2py] Re: Is this a bug? DAL update records using an expression

2013-03-06 Thread Cliff Kachinske
Here is the field def: Field('quantity_on_hand', 'decimal(12,3)', default=0.0, writable=False, readable= False, requires=IS_EMPTY_OR(IS_DECIMAL_IN_RANGE(0, .999)), ), On Wednesday, March 6, 2013 9:45:20 AM

[web2py] Strange problem importing a module

2013-03-06 Thread Daniel Gonzalez
Hi, I have this very strange issue: I am importing a module in the web2py models, but the module can not be found. This is only happening in one of my production hosts: the rest are ok (very similar machines, similar setup). If I import the module from a python shell, it works, but importing

[web2py] Re: Strange problem importing a module

2013-03-06 Thread Massimo Di Pierro
Which web2py version? Some changes were made to 2.4.2 to the custom importer. On Wednesday, 6 March 2013 12:19:32 UTC-6, Daniel Gonzalez wrote: Hi, I have this very strange issue: I am importing a module in the web2py models, but the module can not be found. This is only happening in one

[web2py] Re: Is this a bug? DAL update records using an expression

2013-03-06 Thread Cliff Kachinske
I see what the code is doing. Would this work? if db._adapter.driver.__name__ in ('sqlite'): # maybe others? if self.type in ('integer','bigint'): result_type = 'integer' elif self.type in ['date','time','datetime','double','float']: result_type = 'double'

[web2py] Re: Strange problem importing a module

2013-03-06 Thread Daniel Gonzalez
Currently running Version 2.4.1-alpha.2+timestamp.2013.01.13.13.14.47 And I remember that I had a similar issue, which was indeed related to the custom importer: https://groups.google.com/d/topic/web2py/IzhnixOivic/discussion It seems I am run into a similar problem again. If I find any

Re: [web2py] Re: web2py 2.4.2 is OUT

2013-03-06 Thread Marco Túlio Cícero de M . Porto
When using the New application wizard, cannot add new input row for new tables at Step 2: Tables neither by clicking on the plus signal nor by pressing ENTER. Same happens on Step 3: Fields for table auth_user (1 of 1) and on Step 4: Pages. Besides that, seems to be working properly... Thanks

[web2py] Re: GAE Hosting Issue

2013-03-06 Thread Christian Foster Howes
Philip, I've discovered that if I create an empty database via a direct connection to CloudSQL and point the DAL at that that statement makes me think web2py *never* sends a create database statement to the database (no matter what DB you are using). it expects that the DB server is

Re: [web2py] Re: web2py 2.4.2 is OUT

2013-03-06 Thread Fernando Lucas
I had the same problem. In the Wizard 2.4.2 the buttons [+] end [-] don't work. Thanks, thanks for the new version. Fernando Lucas 2013/3/6 Marco Túlio Cícero de M. Porto mtcpo...@gmail.com When using the New application wizard, cannot add new input row for new tables at Step 2: Tables

[web2py] 2.4.2 breaks query

2013-03-06 Thread chicks
Been running on 2.0.9 for some time, trying to update to 2.4.2, but some query returns have changed, breaking SQLTABLE() attempt. An Oracle query that returns this on 2.0.9: Row {'prj_zone': 'ETGA1', 'prj_app_type': 'ANI', 'prj_instance': 'ani', 'prj_name': 'ETGA', 'prj_host': 'ZUATAPP6',

[web2py] Help with admin/errors/

2013-03-06 Thread BlueShadow
Hi, I got a couple errors which I did not produce myself So I found them in the /admin/errors/appname/ which is a very cool thing to have, but I cant find anywhere what the users did to get those errors or when they got the error. (well I did not check this lock for over 2 weeks). Is there a

Re: [web2py] Re: web2py 2.4.2 is OUT

2013-03-06 Thread Paolo Caruccio
just submitted a proposal patch on issue tracker https://code.google.com/p/web2py/issues/detail?id=1358 Il giorno mercoledì 6 marzo 2013 20:26:52 UTC+1, Fernando Lucas ha scritto: I had the same problem. In the Wizard 2.4.2 the buttons [+] end [-] don't work. Thanks, thanks for the new

[web2py] appadmin and long int

2013-03-06 Thread Martin Weissenboeck
I have tried in appadmin db.protocol.id138300 or db.protocol.id138300L and I get invalid literal for long() with base 10: 'FAILED' No long integer for id? Regards Martin -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe

Re: [web2py] Ajax return a form but does not write in the db (and default value info)

2013-03-06 Thread Riccardo C
Thank you very much, that is exactly what I needed... I didn't know components! I have component related question know. I have a first component that generate the first form (form1) based on tableA and a second component that list all the post and a second form (form2) generate on the same

[web2py] session in cache from book not working

2013-03-06 Thread Derek
I have Web2Py 2.4.2 (source edition) on Windows. Reading the book, I see that I can store sessions in cache. So, here's how it says to do it... http://web2py.com/books/default/chapter/29/13#Sessions-in-memcache from gluon.contrib.memdb import MEMDB

[web2py] Re: session in cache from book not working

2013-03-06 Thread Derek
after taking that out from my db.py file, I get the following error: Traceback (most recent call last): File C:\Temp\web2py\gluon\main.py, line 577, in wsgibase session._try_store_in_cookie_or_file(request, response) File C:\Temp\web2py\gluon\globals.py, line 753, in

[web2py] Re: 2.4.2 breaks query

2013-03-06 Thread chicks
So, it works fine if I leave out the fields filter, but, of course, returns ALL the fields, which is unwanted... Do I now need to rename the fields definitions somehow? fields = db.projects.prj_type|db.projects.prj_name| \ db.projects.prj_environment|db.projects.prj_zone| \

[web2py] Re: session in cache from book not working

2013-03-06 Thread Niphlod
the point is that you should configure cache.memcache also. It's just the section before in the book. On Wednesday, March 6, 2013 11:04:06 PM UTC+1, Derek wrote: after taking that out from my db.py file, I get the following error: Traceback (most recent call last): File

[web2py] Re: appadmin and long int

2013-03-06 Thread Niphlod
how much long have to be this int ? 138300L has a sense only in python, not the dal string represented in the form as a text ^_^ On Wednesday, March 6, 2013 10:42:32 PM UTC+1, mweissen wrote: I have tried in appadmin db.protocol.id138300 or db.protocol.id138300L and I get invalid

[web2py] Re: Help with admin/errors/

2013-03-06 Thread Niphlod
the full traceback is included, plus a timestamp, plus all arguments and variables, the dump of the request, response and session what do you need more ? On Wednesday, March 6, 2013 9:37:13 PM UTC+1, BlueShadow wrote: Hi, I got a couple errors which I did not produce myself So I found

[web2py] Re: Book 5th edition out

2013-03-06 Thread Niphlod
kindly hosted by github. http://niphlod.github.com/diffbook/ PS: it's based on a commit-to-commit base, rather that the complete diff between 4.9 and 5.0. Should be enough anyway. On Wednesday, March 6, 2013 5:42:57 PM UTC+1, Niphlod wrote: It's based on git diffs anyway, but nonetheless I'll

[web2py] Re: session in cache from book not working

2013-03-06 Thread Derek
It's not that specific in the documentation, in fact, it's under it's own header. On Wednesday, March 6, 2013 3:31:35 PM UTC-7, Niphlod wrote: the point is that you should configure cache.memcache also. It's just the section before in the book. On Wednesday, March 6, 2013 11:04:06 PM

[web2py] Re: 2.4.2 breaks query

2013-03-06 Thread Derek
No idea why you are getting that _extra. It's supposedly not matching the regex_table_field Anyway, when I do a select, and I want specific columns, I do it like so... rows = db( query ).select(db.projects.prj_type,db.projects.prj_name,db.projects.prj_environment,db.projects.prj_zone,

[web2py] Re: session in cache from book not working

2013-03-06 Thread Niphlod
:D *cache object has no attribute memcache* seemed pretty obvious as an error Where did you expect to configure, e.g., the host and the port of the memcache instance ? .a book needs to be read top-bottom (at least chapters), not a jumping here and there looking for snippets. it's a

[web2py] Re: 2.4.2 breaks query

2013-03-06 Thread chicks
Changed to this to fix: fields = db.projects.prj_type,db.projects.prj_name, \ db.projects.prj_environment,db.projects.prj_zone, \ db.projects.prj_host,db.projects.prj_port, \ db.projects.prj_instance,db.projects.prj_app_type, \ db.projects.prj_application, \

[web2py] Re: 2.4.2 breaks query

2013-03-06 Thread Niphlod
open an issue with a model and the query to reproduce .. so it gets tracked (and fixed) On Thursday, March 7, 2013 12:30:16 AM UTC+1, chicks wrote: Changed to this to fix: fields = db.projects.prj_type,db.projects.prj_name, \ db.projects.prj_environment,db.projects.prj_zone, \

[web2py] Re: Web2Py hangs

2013-03-06 Thread Alex Glaros
I'm a newbie with same problem. I think Phillip is right about sqlLite. I solved it by creating a similarly named table and adding the data again (not including the old problem data types). I think I also deleted the old table (is this recommended?) in applications/databases folder. Then I

[web2py] Re: Book 5th edition out

2013-03-06 Thread Alan Etkin
kindly hosted by github. http://niphlod.github.com/diffbook/ Many thanks! -- --- 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: good linux security tips

2013-03-06 Thread 黄祥
for me, in terms of security, it will be great to use IPS and IDS btw, it's a nice share, thank you so much -- --- 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] Tip of the day... ajax buttons in grid

2013-03-06 Thread Massimo Di Pierro
Do you know you can do this? db.define_table('thing',Field('name'),Field('active','boolean',default=False)) @auth.requires_login() def index(): grid = SQLFORM.grid(db.thing, inks=[lambda row: A('on' if row.active else 'off', _class='btn',

[web2py] how to start Celery worker in web2py

2013-03-06 Thread Eric S
I would like to use Celery in my web2py application, but I'm having trouble with how to start a Celery worker (I know there is a web2py scheduler but I would like to use Celery). To start a custom scheduler in web2py I would use: python web2py.py -S appName -M -R worker.py Celery workers,

[web2py] where to set up localization in web2py

2013-03-06 Thread TestFirstName TestLastName
where to set up localization in web2py -- --- 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

[web2py] Re: Unable to restart Web2py on Mac

2013-03-06 Thread theofficialtoss
my web2py died in my raspberry pi yesterday when i was following through the killer web development tutorial... somewhere regarding the selenium. the server webpage did not show anything. i panicked and removed the whole web2py folder. then i downloaded the source code and run python 2.6

[web2py] Re: how to start Celery worker in web2py

2013-03-06 Thread Massimo Di Pierro
Why do you want to use celery? On Wednesday, 6 March 2013 19:47:12 UTC-6, Eric S wrote: I would like to use Celery in my web2py application, but I'm having trouble with how to start a Celery worker (I know there is a web2py scheduler but I would like to use Celery). To start a custom

Re: [web2py] Re: Unable to restart Web2py on Mac

2013-03-06 Thread Jonathan Lundell
On 6 Mar 2013, at 4:44 PM, theofficialt...@gmail.com wrote: my web2py died in my raspberry pi yesterday when i was following through the killer web development tutorial... somewhere regarding the selenium. the server webpage did not show anything. i panicked and removed the whole web2py

[web2py] How to include headers in gluon.http.HTTP exceptions?

2013-03-06 Thread Alec Taylor
My attempt: msg = (403, json.dumps({state: , error_message: None, error: unauthorized_client}), None, {'Content-Type': 'application/json'}) raise HTTP(*msg) What I get back: HTTP/1.1 403 FORBIDDEN Content-Length: 68 Content-Type: text/html; charset=UTF-8 Date: Thu, 07 Mar 2013 02:45:08 GMT

[web2py] how to put query in sqlform.grid or smartgrid

2013-03-06 Thread 黄祥
hi, how to put query in sqlform.grid or smartgrid? *code* def category(): query=db.category grid=SQLFORM.smartgrid(query) return locals() i want to make a query for example db.category.id 10, and i don't know how to do it, is there any hints or reference for this? when i tried to

[web2py] Re: Problem with uploading large file web2py version 2.3.2

2013-03-06 Thread Mạnh Trần Đức
When I upload a ~400Mb file: Firstly, After Chrome show upload 100% , the python progress jump from 50 -. 400 MB Then after few senconds, it jumps to max of RAM (Step by step, 1GB, 1.5GB, ... 2.5 GB) then my PC hang (Fully of RAM) On Monday, March 4, 2013 7:15:55 PM UTC+7, Phyo Arkar wrote:

Re: [web2py] how to start Celery worker in web2py

2013-03-06 Thread Bruno Rocha
I also would like to see Celery, Solr, Elastic Search and other fantastic tools working with web2py! I think this is an important issue and I am sure it is completely easy and possible to make it. I personally do not like to use the built-in scheduler, so I am using python-rq (Redis Queue) for

[web2py] Re: Access the database for current user

2013-03-06 Thread 黄祥
please try this in your controller db(custom_auth_table).select(custom_auth_table.street) db(custom_auth_table).select(custom_auth_table.city) db(custom_auth_table).select(custom_auth_table.country) i've already tested in shell by : print db(custom_auth_table).select(custom_auth_table.street)

[web2py] Re: How to include headers in gluon.http.HTTP exceptions?

2013-03-06 Thread Alec Taylor
Okay, got it to work; but it's rather messy: raise HTTP(*msg[0:2], **msg[3]) On Thu, Mar 7, 2013 at 1:47 PM, Alec Taylor alec.tayl...@gmail.com wrote: My attempt: msg = (403, json.dumps({state: , error_message: None, error: unauthorized_client}), None, {'Content-Type': 'application/json'})

[web2py] Re: Change title of db field in a DAL select

2013-03-06 Thread at
actually I was looking alternative of sql statement like *select **name, dob date_of_birth, occupation from persons* in web2py DAL. anyways, after retrieving, when I print rows.colnames[3] it returns str: persons.dob but setting rows.colnames[3] to 'date_of_birth' gives error

[web2py] request.function=='static' and request.args=='disclaimer' in menu

2013-03-06 Thread Annet
I have the following menu: response.util_menu=[ ['Disclaimer',request.function=='static' and request.args=='disclaimer',URL('util','static',args='disclaimer')], ['Privacy',request.function=='static' and request.args=='privacy',URL('util','static',args='privacy')],