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
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,
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
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
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
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
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
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'}))
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
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
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.
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
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,
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'
-
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.
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
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=/
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
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
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
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
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,
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
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:
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
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
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
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,
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
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!
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
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 -
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:
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!!
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
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.
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
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
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:
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
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
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
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
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
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
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
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
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
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
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'
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
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
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
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
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',
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
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
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
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
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
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
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| \
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
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
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
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
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
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,
: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
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, \
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, \
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
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
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
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',
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,
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
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
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
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
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
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
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:
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
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)
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'})
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
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')],
88 matches
Mail list logo