i do make use of the IS_NOT_IN_DB() validator. Note that you can still
have duplicates if 2 requests are received by GAE at nearly the same time.
assuming your requests are more than say 1 second apart, if IS_NOT_IN_DB()
is failing i would consider it a bug.
NOTE that GAE dev_appserver.py
here is the link :
script
window.location.href =
'{{=URL('CS','close_inqueries',user_signature=True)}}' + '' + data;
/script
and here is the controler:
def close_inqueries():
print request.vars
print '-'*20
print session
and here is the result:
Storage {'_signature':
Hello there,
I have defined a 'text' field in the table. The content consists of
multiple paragraphs, when displayed in the view the content squeezes into a
single line. It seems all 'enter' in original text was replaced by a
space. How can I display the text as paragraphs as it is input?
thanks Anthony, I got a couple lines further^^.
now this line raises an error.:thisImage=db(dbtable.id==form.vars.id).select
()[0]
for some reason I'm not able to select this image anymore.
IndexError: list index out of range
--
---
You received this message because you are subscribed to the
Hello, friends.
web2py is 2.4.5-stable+timestamp.2013.03.18.22.46.22
There is a small bug.
**
*
class RadioWidget(OptionsWidget):
#...
def widget(cls, field, value, **attributes):
#...
checked = {'_checked': 'checked'} if k == value else {}
*
But *value *is a list. So *checked *is
well, something dark and obscure is happening ..
either
logger.error('Error cleaning up')
logger.error('Error retrieving status')
logger.error('error popping tasks')
logger.debug('Assigning tasks...')
must happen
On Tuesday, March 26, 2013 11:02:22 PM UTC+1, Paolo valleri wrote:
I
Works perfectly, thanks!
On Tuesday, March 26, 2013 1:39:00 PM UTC+2, Niphlod wrote:
SQLFORM.grid takes the labels from the underlying model, so as long as
you specify the label before calling the grid, you're fine.
db.table1.field1.label = 'whatever'
grid = SQLFORM.grid(db.table1)
here is the link :
script
window.location.href =
'{{=URL('CS','close_inqueries',user_signature=True)}}' + '' + data;
/script
and here is the controler:
def close_inqueries():
print request.vars
print '-'*20
print session
and here is the result:
Storage {'_signature':
odd behavior, is possible that the function is not called at all?
I added a log line in pop_task(), in the else branch of the first test, to
understand why fails the test: The statement is logger.info(pop task %s
%s % (self.is_a_ticker , self.do_assign_tasks))
The log says:
2013-03-27 11:38:01,276
by default requires_signature checks for all vars and args ... you're
generating the signature without taking into consideration the data part.
On Wednesday, March 27, 2013 11:55:21 AM UTC+1, yashar wrote:
here is the link :
script
window.location.href =
Hi everyone,
Long since I last posted. I just came across autoroutes script and after
adding my domain and subdomain in the config, it does not seem to be
routing to the app. However, only the first route works.
I need test.domain.co - /myapp/
Is this expected or autoroutes are only designed
yeps.
this is expected, but every ~15 seconds that turns to True (meaning more
or less I'm the Ticker, I'm free, I was free in the last 15 seconds, let's
see if there are any submitted (or repeating) tasks to assign).
I don't have a python interpreter ATM but let's break up the logic, so
Thanks for the answer.
Isn't there a way to put images using links from other storage websites in
the form? Because I'm not going to be the only administrating the site and
they won't know how to work with the thing in that first link.
Terça-feira, 26 de Março de 2013 21:51:21 UTC, Alan Etkin
So, I added: logger.debug('is_a_ticker := %s, worker_status[0] := %s',
self.is_a_ticker, self.worker_status[0]) before the last if of relevant
snippet you posted,logs:
2013-03-27 13:25:01,785 - web2py.scheduler.mapserver#29806 - INFO - TICKER:
I'm a ticker
2013-03-27 13:25:01,797 -
The user signature is a hash of the URL, and by default this includes the
query string. However, your code uses Javascript to append the query string
after web2py creates the URL and its signature, so once the request is
made, the user signature no longer matches the hash of the full URL
On Wednesday, March 27, 2013 4:03:08 AM UTC-4, BlueShadow wrote:
thanks Anthony, I got a couple lines further^^.
now this line raises an error.:thisImage=db(dbtable.id==form.vars.id).
select()[0]
for some reason I'm not able to select this image anymore.
IndexError: list index out of range
When a text field is submitted, line breaks are stored as standard line
break characters (i.e., \n). When you then insert the stored text into
HTML, the line breaks will be included in the HTML, but browsers ignore
line breaks when rendering (i.e., they are treated as single spaces). If
you
Not sure about that, but I guess that form.vars.id is not the key for the
id field you want, since SQLFORM.factory include 2 tables, web2py has to
make the field that has the same name in the 2 tables unique... I don't
know what web2py exactly do about that though, but form.vars.id is not
the do_assign_task variable gets eventually shifted (read True to False,
False to True) every loop.
The issue is how can the execution be pushed far (in your case even 60
seconds) with no errors whatsoever ?
Usually when a TICKER has been chosen (or re-confirmed), do_assign_task is
set
Here's the grid home: http://www.trirand.com/blog/
On Tuesday, March 26, 2013 1:38:00 PM UTC-4, Derek wrote:
Where would one get this jqGrid Tree, and can you post a sample JSON
dataset that this is supposed to work with?
On Monday, March 25, 2013 3:51:10 PM UTC-7, Nate wrote:
Nothing in
I'm facing a problem where if I have something like this:
grid = SQLFORM.grid(db.table1,
left=[db.table2.on(db.table2.id==db.table1.reference)],
)
my common filters are not processed for table1, only for table2! including
is_active filter for version recording.
Is there a bug?
--
Sorry if this is a repost - Google Groups is giving me fits
I'm no expert, and my experience is limited to very old versions of both
web2py and jqGrid.
BUT in my setup, the grid block does a call to get data to populate the
grid.
I don't see a call in your grid block, like this snippet:
Using smartgrid I find myself writing some very ugly code, tedious to write
and hard to read or maintain.
Here is an example
if len(request.args) 3 and request.args[-1]=='classes' and\
request.args[-2]=='new' and
request.args[-4]=='classes.subject_id':
The problem is that table._format is used to build field.represent only for
references only when format is a string. In your case it is a function
which performs a nested query. That is very expensive. Web2py wants you to
be explicit before using it that to build a dropdown. It works (in the
depends on what you ask for the kind of functionality you need. Generally
smartgrid is smart, but can't figure out all the business logic required by
your (and everyones) app.
are you in the need of a wrapper to see what table/form is shown ?
Just write a general one and apply it instead of
user_signature requires that you are logged in. Are you logged in when you
generate the signed URL?
On Wednesday, 27 March 2013 02:30:04 UTC-5, yashar wrote:
here is the link :
script
window.location.href =
'{{=URL('CS','close_inqueries',user_signature=True)}}' + '' + data;
Can you please open an issue on googlecode and post the patch. I will check
it and apply asap.
On Wednesday, 27 March 2013 03:39:53 UTC-5, Dmitry Mosin wrote:
Hello, friends.
web2py is 2.4.5-stable+timestamp.2013.03.18.22.46.22
There is a small bug.
**
*
class
yes. I believe common filter are ignored for left joins.
https://code.google.com/p/web2py/issues/detail?id=992q=common
On Wednesday, 27 March 2013 09:13:20 UTC-5, Felipe Meirelles wrote:
I'm facing a problem where if I have something like this:
grid = SQLFORM.grid(db.table1,
this is a duplicate of
https://groups.google.com/forum/?fromgroups=#!topic/web2py/c4uZ36Gw7WY ...
taken care of already by Anthony ^_^
On Wednesday, March 27, 2013 4:36:25 PM UTC+1, Massimo Di Pierro wrote:
user_signature requires that you are logged in. Are you logged in when you
generate
What is happening is the complete oposite. Its aplying to the leftjoin
table, but not to the main table.
The problem is on dal.py line 1553:
tables_to_merge.keys() contains the main table, so the main table is not
put on excluded var in line 1567 and therefore is not used on line 1574 to
set
Please open a ticket about this and include the patch. I will review it and
apply it asap.
Massimo
On Wednesday, 27 March 2013 10:57:54 UTC-5, Felipe Meirelles wrote:
What is happening is the complete oposite. Its aplying to the leftjoin
table, but not to the main table.
The problem is on
Actualy it worked but not for reason i expected. Ill run some more tests
here and let you know.
On Wednesday, March 27, 2013 1:03:26 PM UTC-3, Massimo Di Pierro wrote:
Please open a ticket about this and include the patch. I will review it
and apply it asap.
Massimo
On Wednesday, 27
Added a ticket with the patch that worked for me. Thanks!
On Wednesday, March 27, 2013 1:05:22 PM UTC-3, Felipe Meirelles wrote:
Actualy it worked but not for reason i expected. Ill run some more tests
here and let you know.
On Wednesday, March 27, 2013 1:03:26 PM UTC-3, Massimo Di Pierro
I was wondering if there is anything such as a Go-Live Checklist for W2P
apps. Like things you want to check before you go live, or optimizations
you can enable once your 'development' phase is done.
For example:
1. Disable migrations
2. Enable 'lazy tables'
3. Enable DB Cache on queries
4.
On 27 Mar 2013, at 9:46 AM, Derek sp1d...@gmail.com wrote:
I was wondering if there is anything such as a Go-Live Checklist for W2P
apps. Like things you want to check before you go live, or optimizations you
can enable once your 'development' phase is done.
For example:
1. Disable
How could I also append the id of the row in image_filename?
Thanks!
Tito
On Mon, Mar 25, 2013 at 4:58 PM, Tito Garrido titogarr...@gmail.com wrote:
Worked! It should go to the book :)
http://web2py.com/books/default/chapter/29/07#Storing-the-original-filename
Thanks!
Tito
On Mon,
I tried it, it seems to be more sporadic but the problem is not gone.
log:
2013-03-27 18:07:11,809 - web2py.scheduler.mapserver#30515 - DEBUG -
freeing workers that have not sent heartbeat
2013-03-27 18:07:11,811 - web2py.scheduler.mapserver#30515 - INFO - TICKER:
I'm a ticker
2013-03-27
Try:
Field('image_filename', readable=False, writable=False, compute = lambda
row: request.post_vars.image.filename + row.id),
El mar 27, 2013 12:39 PM, Tito Garrido titogarr...@gmail.com escribió:
How could I also append the id of the row in image_filename?
Thanks!
Tito
On Mon, Mar 25,
I just checked... id is not present:
Row {'artista': 387, 'nome': '', 'image':
'personagem.image.b2754a53c6cdcc7e.69626d2d4c6f676f2e6a7067.jpg', 'novela':
'9', 'slug': '', 'descricao': ''}
On Wed, Mar 27, 2013 at 2:24 PM, Roberto Perdomo roberto...@gmail.comwrote:
Try:
The ticket #1411 http://code.google.com/p/web2py/issues/detail?id=1411
--
---
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.
Let's say you have an SQL grid generated from a db with field *my_url*,
which stores the value of an absolute URL, and has a representation defined
in this way:
db.my_db.my_url.represent = lambda the_url, row: A(generate_link_image(),
_href=the_url, _target='_blank')
What would be a good way
I agree that indexing and connection pooling are the big hitters.
My belief is that getting the connection is the big bottleneck in apps
powered by a db.
Smart indexing goes without saying, I think.
On Wednesday, March 27, 2013 12:57:17 PM UTC-4, Jonathan Lundell wrote:
On 27 Mar 2013, at
It seems that every once in a while, the IS_URL validator doesn't want to
accept a URL that's valid. For example, I believe the ^ character prevents
IS_URL from accepting something like
http://finance.yahoo.com/q/hp?s=^IXIC+Historical+Prices. Is there a
parameter to permit IS_URL to accept
On 27 Mar 2013, at 11:25 AM, Lamps902 dheap@gmail.com wrote:
It seems that every once in a while, the IS_URL validator doesn't want to
accept a URL that's valid. For example, I believe the ^ character prevents
IS_URL from accepting something like
Thank you!
On Wednesday, March 27, 2013 1:44:08 PM UTC-5, Jonathan Lundell wrote:
On 27 Mar 2013, at 11:25 AM, Lamps902 dhea...@gmail.com javascript:
wrote:
It seems that every once in a while, the IS_URL validator doesn't want to
accept a URL that's valid. For example, I believe the ^
Ummm, the id is readable?
db.table.id.readable = True
El mar 27, 2013 12:55 PM, Tito Garrido titogarr...@gmail.com escribió:
I just checked... id is not present:
Row {'artista': 387, 'nome': '', 'image':
'personagem.image.b2754a53c6cdcc7e.69626d2d4c6f676f2e6a7067.jpg', 'novela':
'9',
boys . how can the id be present if what you're trying to insert is not
yet a row in a table
On Wednesday, March 27, 2013 8:18:38 PM UTC+1, Roberto Perdomo wrote:
Ummm, the id is readable?
db.table.id.readable = True
El mar 27, 2013 12:55 PM, Tito Garrido titog...@gmail.com
so, you have an url (i.e. a string) that needs to return an image.
you should have a controller that, when that URI is matched, returns the
image after increasing its number_visited value seems pretty standard
to me
On Wednesday, March 27, 2013 7:15:12 PM UTC+1, Lamps902 wrote:
Let's
Oops - completely missed the 'no javascript' part.
It would appear it's not loading your jquery/jqgrid scripts. Are you
loading them in layout.html?
See this:
http://www.trirand.com/jqgridwiki/doku.php?id=wiki:how_to_install
On Monday, March 25, 2013 6:51:10 PM UTC-4, Nate wrote:
Nothing in
You have this for connection string :
try:
if request.env.http_host.split(':')[1]!='':
db=DAL('postgres://username:password@127.0.0.1:5432/database_name',
migrate_enabled=True, lazy_tables=True)
except Exception, e:
Isn't there a way to put images using links from other storage websites in
the form? Because I'm not going to be the only administrating the site and
they won't know how to work with the thing in that first link
I think that you could use the new builtin wiki for allowing content
:-S
I was thinking on represent attribute from fields, not compute.
El mar 27, 2013 3:07 PM, Niphlod niph...@gmail.com escribió:
boys . how can the id be present if what you're trying to insert is
not yet a row in a table
On Wednesday, March 27, 2013 8:18:38 PM UTC+1, Roberto Perdomo
So I want to be able to use Janrain, but I also want to have people have to
register. For my app initially i need to control when registration is open
and when it is not, and currently using the examples i've seen, enabling
Janrain makes anyone who can authenticate with one of the third party
it was just a trial.
Explaining it further, let's see if someone spots the **supposed**
implementation error
In order to separate transactions and avoid task contention among several
workers, we need the **master** steps to both assign tasks and process
tasks.
The **thread** steps inserts
In the case that I'm dealing with, the image is incidental to the problem.
But let's say there is an image, and a relative URL (i.e. file download);
you can do something like this:
db.my_db.file.represent = lambda x,y: \
A(generate_image(y.file),
uhm... I didn't quite understand, but it seems that you want different
things to happen when printing the url and when accessing the url.
Why is hard separating printing a link logic from the accessing the
link one ?
It's a common construct, i.e. on one page
click here to like the image
and
And what about something like this:
Field('image_filename', readable=False, writable=False, compute = lambda
row: request.post_vars.image.filename + next_id())
def next_id():
last_row = db().select(db.table.id).last()
last_id = int(last_row[`table.id`])
return last_id + 1
This was
Sorry, the function must be return a string in order to concatenate with
the filename
El mar 27, 2013 4:59 PM, Roberto Perdomo roberto...@gmail.com escribió:
And what about something like this:
Field('image_filename', readable=False, writable=False, compute = lambda
row:
Are you saying you want to be able to approve the registrations of users
(so just logging in via Janrain isn't enough to allow access), or do you
simply want to require users to add to their profile when they first log in
with Janrain?
On Wednesday, March 27, 2013 4:08:42 PM UTC-4, DeanK
when dealing with first() or last(), remember that those come AFTER the
select() ... when you do select().first() you're really fetching all from
the db and discarding all but one row.
The time difference may be negligible with a few records, but if you have
lots of them, stick with
Thanks, Niphlod. It may require some digression/elaboration, so do you mind
if I get in touch with you about this tomorrow? Hopefully, after I get some
rest, I'll be able to articulate the issue a bit better...
On Wednesday, March 27, 2013 4:08:46 PM UTC-5, Niphlod wrote:
uhm... I didn't
What do you mean by absolute vs. relative URLs in this case, and why does
that matter (i.e., show examples)? The URL function can generate absolute
URLs http://web2py.com/books/default/chapter/29/04#Absolute-urls by
specifying the scheme and host arguments, but it's not clear why you would
It should be checking against RFC 3986, not RFC 2396.
On Wednesday, March 27, 2013 11:44:08 AM UTC-7, Jonathan Lundell wrote:
On 27 Mar 2013, at 11:25 AM, Lamps902 dhea...@gmail.com javascript:
wrote:
It seems that every once in a while, the IS_URL validator doesn't want to
accept a URL
On 27 Mar 2013, at 2:57 PM, Derek sp1d...@gmail.com wrote:
It should be checking against RFC 3986, not RFC 2396.
Yes, it should be updated.
On Wednesday, March 27, 2013 11:44:08 AM UTC-7, Jonathan Lundell wrote:
On 27 Mar 2013, at 11:25 AM, Lamps902 dhea...@gmail.com wrote:
It seems that
thanks Anthony and Richard. I guess I didn't understand the SQLFORM.factory
and what it does. I get now my thumbnail and all dbentries as I like except
the main Image Itself. there is a value in the database and the image is
saved but I guess the Name already tells that there is something
Specifically, maybe something like this:
db.define_table('image',
Field('file', 'upload', represent=lambda v, r: A(generate_image(v),
_href=URL('default', 'download', args=v, vars=dict(action=
'update_download_number', id=r.id,
Field('downloads', 'integer', default=0,
Also looks like the TLDs don't include the internationalized country code
top level domains, only the test ones.
On Wednesday, March 27, 2013 2:57:00 PM UTC-7, Derek wrote:
It should be checking against RFC 3986, not RFC 2396.
On Wednesday, March 27, 2013 11:44:08 AM UTC-7, Jonathan Lundell
It would work, but if I delete a record and then add a new one it would get
the wrong id :-/
On Wed, Mar 27, 2013 at 6:40 PM, Niphlod niph...@gmail.com wrote:
when dealing with first() or last(), remember that those come AFTER the
select() ... when you do select().first() you're really
SQLFORM.factory creates a dummy DAL instance and a dummy table with the
default name no_table. To change that, do:
SQLFORM.factory(..., table_name='Image')
Anthony
On Wednesday, March 27, 2013 6:08:23 PM UTC-4, BlueShadow wrote:
thanks Anthony and Richard. I guess I didn't understand the
Right, if you use the 'reference sometable' syntax, that will allow you to
have tables reference something which doesn't exist yet. If you use the
db.othertable format, then the othertable absolutely has to exist.
On Monday, March 25, 2013 7:48:02 AM UTC-7, Cliff Kachinske wrote:
As I
Anthony you saved my day.
If you want to I include you in my humans.txt under special thanks.
I couldn't have done it without you.
On Wednesday, March 27, 2013 11:14:50 PM UTC+1, Anthony wrote:
SQLFORM.factory creates a dummy DAL instance and a dummy table with the
default name no_table. To
I have a page that is using LOAD() to pull in a form that requires the user
to be logged-in (@auth.requires_login()) In previous versions of web2py if
the user hadn't yet logged in they'd get the login screen within the
LOAD()'s DIV and at least could get an idea of what they needed to do
Use oauth2.0 integrated module:
http://web2py.com/books/default/chapter/29/09?search=oauth#Other-login-methods-and-login-forms.
mic
2013/3/26 ctrlSoft zerooo...@gmail.com:
hi, i want to implement 2 kind of login on my app.
1) basic auth
2) facebook connect
i extended auth_user
No problem. Glad it's working. :-)
On Wednesday, March 27, 2013 6:32:37 PM UTC-4, BlueShadow wrote:
Anthony you saved my day.
If you want to I include you in my humans.txt under special thanks.
I couldn't have done it without you.
On Wednesday, March 27, 2013 11:14:50 PM UTC+1, Anthony
Good point -- I'm not sure I agree that 401 should be forced for Ajax
requests -- we should probably have an option to allow Ajax requests to be
treated the same as other requests (maybe open an issue about it). (In
fact, the old elif request.ajax condition was left in the code, even
though it
I'm storing my web2py error tickets in a database. However, the admin
interface to the database doesn't show the tickets table. Is this correct?
If so, why not show the tickets table?
Thanks,
Eric
--
---
You received this message because you are subscribed to the Google Groups
a, i c, thank you so much for your detail explaination, massimo.
--
---
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
hi,
is it possible to get datetime diff betwen tables?
e.g.
db.define_table('check_in',
Field('is_booking', 'boolean'),
Field('booking', 'reference booking'),
Field('room', 'reference room'),
Field('guest', 'reference guest'),
Field('description', 'text'),
Thanks Anthony, it works perfectly.
在 2013年3月27日星期三UTC+8下午9时10分28秒,Anthony写道:
When a text field is submitted, line breaks are stored as standard line
break characters (i.e., \n). When you then insert the stored text into
HTML, the line breaks will be included in the HTML, but browsers
I need a blog app for my website.
Is there a stable blog app for web2py,the instant-press seems last update
at 2010,it's not updated for a long time
--
---
You received this message because you are subscribed to the Google Groups
web2py-users group.
To unsubscribe from this group and stop
just curious Steve,
are you writing a court app for government?
Alex Glaros
On Tuesday, March 26, 2013 10:43:53 PM UTC-7, 黄祥 wrote:
hi,
i've already define format in table but it seems return the id instead of
the format i've define, when i define represent on the field of the other
81 matches
Mail list logo