You can add new types to the DAL that use GAE entities.
Here is what I used to create an unindexed string type:
from google.appengine.ext import db as gae
db._adapter.types['noindex'] = (lambda: gae.StringProperty(multiline=True,
indexed=False))
On 20/07/2011 00:34, Anthony wrote:
Objects defined in your models and controllers do not survive from
request to request (unless, of course, you store them somewhere, like
the session). In your code, the Set object is created when you visit
/default/index, but the select happens when you visit
/
Thanks for your reply. I apologize for not searching in the book
myself, at the moment I have to juggle with bandwidth to get things
done :-(
Kind regards,
Annet.
http://web2py.com/book/default/chapter/08?search=remember+me
self.settings.remember_me_form = False
Is there a way to set this in an applications models file?
Kind regards,
Annet.
try:
def editablefunction():
id = request.vars.row_id
column = request.vars.column
db(db.order_lines.id==id).update(column=value)
* db.commit()*
On Tue, Jul 19, 2011 at 7:17 AM, Will wrote:
> Hello, i'm currently tryin to make the Powertable plugin's in-line
> editing part work and
Hi,
I have an existing web2py app called "dispersion" to which I am trying
to add the plugin_wiki.
I added the plugin through the design interface, created an editor
group and added my user to it. I can now navigate to [site]/dispersion/
plugin_wiki and create a page, however when I try to submit
On Jul 19, 2011, at 1:05 AM, sabbir wrote:
>
> A Clickatell call back url can be like this:
>
> http://www.mysite.com/callback.php?api_id=xxx&apiMsgId=xxx&cliMsgId=xxx&status=xxx×tamp=xxx&to=xxx&from=xxx&charge=xxx
>
> where I provide the base url:
> http://www.mysite.com/callback.php
>
> and c
Apologies for reanimating this old thread but I too just tried Jython
with the current web2py version too :-)
I made a few hacks and I can get much further, the admin interface
starts BUT the ticketing system doesn't work under Jython. This means
exceptions are not handled so I ended up putting so
Hi all,
A Clickatell call back url can be like this:
http://www.mysite.com/callback.php?api_id=xxx&apiMsgId=xxx&cliMsgId=xxx&status=xxx×tamp=xxx&to=xxx&from=xxx&charge=xxx
where I provide the base url:
http://www.mysite.com/callback.php
and clickatell will add this part:
?
api_id=xxx&apiMsgId=x
Hello, i'm currently tryin to make the Powertable plugin's in-line
editing part work and after many tries i'm currently using Bruno
Rocha's suggestion in another topic:
Default.py=
def editablefunction():
id = request.vars.row_id
column = request.vars.column
db(db.order_lines.id==id).
Hi, I'm new on Web2Py and Python, and I have a question: There's any
way to make apps developed with other technologies (in my case, PHP
and ASP.NET) authenticate with the web2py CAS server? I need to
integrate some apps to my company and we have systems made in a lot of
different technologies. Wha
Hello,
i'm trying to make powertable's in-line editing work but it doesn't
seem to be working.(it's the powertable plug-in for Web2py)
I've been looking for answers and i'm currently using the code Bruno
Rocha suggested in another topic:
in Default.py:
def editablefunction():
id = request.vars
Well i was going to for the original. But it being so out of date, i
thought i would just take the mercurial branch and use a tool to
convert the code and its branches with history to git. that way it is
exactly what is in the mercurial repos. But doing that i cant fork it.
i would need to create m
Letting those users out there know that I will forking the web2py on
github (which is outdated) and will be updating it as I will need it
and its easier (for me at least) to keep all my repos in one location.
Ive already forked it and will be updating it shortly.
https://github.com/luckysmack/web2
On Tuesday, July 19, 2011 7:48:35 PM UTC-4, Carlos wrote:
>
> So 'truncate' is not being respected when using the previous 'headers'
> format (simple dict of strings).
>
Oh, I see, you're right -- that should be fixed.
Anthony
So 'truncate' is not being respected when using the previous 'headers'
format (simple dict of strings).
Thanks Anthony.
Objects defined in your models and controllers do not survive from request
to request (unless, of course, you store them somewhere, like the session).
In your code, the Set object is created when you visit /default/index, but
the select happens when you visit /plugin_openplayers/index, which hap
It looks like if you use the new dictionary option for headers, you can
still truncate, but you have to specify a 'truncate' key within each
header's dict (so, you can have different truncate values for each header).
Here's the docstring example:
:param headers = {'table.id':{'label':'Id',
Hi Martin,
Yes, it's broken for string and text.
Carlos
Truncate only works in:
field.type in ['string','text']
is your field this type?
2011/7/19 Carlos
> Hi,
>
> I believe 'truncate' has broken in SQLTABLE when 'headers' (as dict of str)
> is specified.
>
> Maybe this was caused by the "#new implement dict"?.
>
> Thanks,
>
>Carlos
>
>
--
Hi *:
I'm trying to implement an essential version of a plugin_openlayers
starting from the job made by Massimo with plugin_gmap but I don't
understand how the db set is passed from a controller to the plugin_*
controller, well even if it seams clear setting the data set in a
storage defined
Hello, it's me again.
Well, I discovered that the problem of loading the table with "load" is in
the event "live" plugin_powertable.py. I've replaced the event "live" for
"bind", and, works, but just load the details for the first 10 rows
displayed when loading the table.
Is there any way to fix
Hi,
I believe 'truncate' has broken in SQLTABLE when 'headers' (as dict of str)
is specified.
Maybe this was caused by the "#new implement dict"?.
Thanks,
Carlos
:D I've noticed it !
On Tue, Jul 19, 2011 at 9:40 PM, Anthony wrote:
> Right, not really updated nightly. I think that build was originally
> intended to encourage testing before new releases, but few people actually
> do any testing.
>
> Anthony
>
> On Tuesday, July 19, 2011 4:35:31 PM UTC-4, a
Right, not really updated nightly. I think that build was originally
intended to encourage testing before new releases, but few people actually
do any testing.
Anthony
On Tuesday, July 19, 2011 4:35:31 PM UTC-4, apple wrote:
> I just noticed all the files on the "nightly build" except directo
Nightly build is not the same as trunk -- I'm not sure when it was last
updated. You can pull trunk from the Google Code repository via Mercurial
(you need to have Mercurial installed):
http://code.google.com/p/web2py/source/checkout. Or you can just change the
two relevant lines in your own c
Here is what the Book recommends:
python web2py.py -S app -M -N -R applications/app/private/myscript.py
I just noticed all the files on the "nightly build" except directories
are dated 26th June. Is this not updated nightly?
On Jul 19, 9:28 pm, apple wrote:
> I downloaded the nightly build source and copied it on top of my
> web2py directory. Still get the request.vars as dict. Is that
> expected?
I downloaded the nightly build source and copied it on top of my
web2py directory. Still get the request.vars as dict. Is that
expected?
On Jul 19, 5:40 pm, Anthony wrote:
> Oops, forgot we already fixed that in trunk, so it will be work properly in
> the next release.
>
> Anthony
>
>
>
>
>
>
>
>
I prefer to work in the old way, used when web2py had no block in views. It
is very easy and pure Python code.
{{def myblock():}}
{{return}}
So, in any place of views...
{{=myblock()}}
Obviouslly in this way you cannot have {{super}} and other cool things, but
it is easy to adjust in pure Pyt
this should be:
table.dtfeatures['aoColumns'] = ''
dtfeatures implement any option from datatables.net
On Tue, Jul 19, 2011 at 1:32 PM, Christopher Baron
wrote:
> Does anyone know where, what to set the 'aoColumns' property to ?
>
> The documentation for this plugin is not helpful...
>
> On J
On Tuesday, July 19, 2011 2:14:18 PM UTC-4, sebastian wrote:
>
> Thanks Anthony
>
> It looks like the problem was related to using
> request.env.http_web2py_component_element instead of request.cid (I was
> using request.env.http_web2py_component_element instead of request.cid as a
> workaround
It's a bug -- already fixed in trunk. See
https://groups.google.com/d/topic/web2py/HshCtke0xzI/discussion. Should work
with ajax=True.
Anthony
On Tuesday, July 19, 2011 3:03:53 PM UTC-4, sebastian wrote:
> Hi All,
>
> I have a LOAD that was working fine with 1.96.last. I've just updated it to
Hi All,
I have a LOAD that was working fine with 1.96.last. I've just updated it to
1.97.1 and now it throws an error:
to reproduce it:
in the view
{{=LOAD('default','crud_in_comp.load',ajax_trap=True)}}
in the controller
def crud_in_comp():
return dict(crud=crud.create(db.auth_user,messag
Thanks Anthony
It looks like the problem was related to using
request.env.http_web2py_component_element instead of request.cid (I was
using request.env.http_web2py_component_element instead of request.cid as a
workaround of a bug in the previous version)...
now I know that request.env.http_web2py
On Jul 19, 2011, at 10:37 AM, António Ramos wrote:
> So what is the best way to pass a dictionary from one page to the other?
> can i do session.dictvar=mydictvar?
Yes, as long as everything you put in there can be pickled.
>
> thank you
> António
>
> 2011/7/19 Jonathan Lundell
> On Jul 19, 20
So what is the best way to pass a dictionary from one page to the other?
can i do session.dictvar=mydictvar?
thank you
António
2011/7/19 Jonathan Lundell
> On Jul 19, 2011, at 10:15 AM, António Ramos wrote:
> > hello i have this in a view
> >
> >
> {{=A(amostra,_href=URL(r=request,c='amostra',f
On Jul 19, 2011, at 10:15 AM, António Ramos wrote:
> hello i have this in a view
>
> {{=A(amostra,_href=URL(r=request,c='amostra',f='get',vars={'amostra':amostra,'amostra_detalhe':Amostra[amostra]}))}}
>
>
> Amostra is a dictionary
> amostra is every element in Amostra
> every amostra of Amost
hello i have this in a view
{{=A(amostra,_href=URL(r=request,*c='amostra',f='get',*
vars={'amostra':amostra,*'amostra_detalhe':Amostra[amostra]*}))}}
Amostra is a dictionary
amostra is every element in Amostra
every amostra of Amostra is a dictionary
in this view i iterate over Amostra[amostra]
On Tuesday, July 19, 2011 12:32:31 PM UTC-4, Christopher Baron wrote:
>
> Does anyone know where, what to set the 'aoColumns' property to ?
>
> The documentation for this plugin is not helpful...
PowerTable is a web2py plugin integrating the jQuery DataTables plugin into
web2py, so you should
Oops, forgot we already fixed that in trunk, so it will be work properly in
the next release.
Anthony
On Tuesday, July 19, 2011 9:50:37 AM UTC-4, Anthony wrote:
> Good catch. I'll submit a patch.
>
> On Tuesday, July 19, 2011 8:56:08 AM UTC-4, apple wrote:
>
>> I note that when ajax=False then
sometime between Web2py v1.89.1 and v1.93.2 encoder.py was changed so
it didn't explicitly support 'datetime'.
my code now trips an exception about simplejson not supporting
datetime
is datetime handled in a different fashion?
Does anyone know where, what to set the 'aoColumns' property to ?
The documentation for this plugin is not helpful...
On Jul 18, 1:25 pm, Roberto Perdomo wrote:
> I now discover that only show the details only for the first 10 records.
>
> I send you to your mail my app, because is very hevy for
On Jul 13, 3:42 am, Miguel Lopes wrote:
> I think this behavior I've just found is worth sharing.
>
> Templates don't honor the if statement that conditionally "try" to include
> or exclude template blocks.
> I've just detected this (in 1.96.4 I think) and upgrade to 1.97.1 and the
> issue/behavio
OK, my script is working fine, but the problem is this, I'm launching this
script:
import time
print "Initializing booking daemon @_@"
while True:
allBookings = db(db.current_bookings).select()
for booking in allBookings:
if booking.project != 'foo':
print str(booki
Thanks for the responses. When auth.settings.login_onaccept gets
executed, auth.user_id has value of None, so it is not possible to get
the user's name. Anthony is right that I am attempting to set the
session.flash to flash the login message just once at login. This is a
nice to have, not a must h
I missed that comments feature. Great you added one!
Miguel
On Tue, Jul 19, 2011 at 12:48 PM, Nico de Groot wrote:
> Good point, was just going to post this myself, you beat me to it. A hint
> should be added to the web2py book in chapter 5
> http://web2py.com/book/default/chapter/05?search=bloc
Good catch. I'll submit a patch.
On Tuesday, July 19, 2011 8:56:08 AM UTC-4, apple wrote:
> I note that when ajax=False then request.vars is a dict rather than a
> storage object.
>
> On Jul 19, 11:44 am, apple wrote:
> > The following works fine with the SQLFORM line and ajax=false or
> > a
I note that when ajax=False then request.vars is a dict rather than a
storage object.
On Jul 19, 11:44 am, apple wrote:
> The following works fine with the SQLFORM line and ajax=false or
> ajax=true. However replacing SQLFORM line with the CRUD line it works
> with ajax=true but fails with ajax=f
Good point, was just going to post this myself, you beat me to it. A hint
should be added to the web2py book in chapter 5
http://web2py.com/book/default/chapter/05?search=block#Blocks-in-Views
something
like:
The *{{block}} {{end}}* construction *cannot be used* inside a python
condition spe
jQuery.live() fixed the problem.
Thank you.
On Jul 19, 6:32 am, Michele Comitini
wrote:
> Cliff,
>
> I think you need to rebind events to the DOM of the new content: you
> need to add some code that will be executed each time the new content
> is
> received by the browser. If you do not want to
Thank you. I will try that.
On Jul 19, 6:32 am, Michele Comitini
wrote:
> Cliff,
>
> I think you need to rebind events to the DOM of the new content: you
> need to add some code that will be executed each time the new content
> is
> received by the browser. If you do not want to rebind every ti
The following works fine with the SQLFORM line and ajax=false or
ajax=true. However replacing SQLFORM line with the CRUD line it works
with ajax=true but fails with ajax=false, generating one of those
annoying "restricted errors". I am guessing related to previous issue
with request.vars and load?
The following works fine with ajax=true but fails with ajax=false
generating one of those annoying "restricted errors". I have a SQLFORM
version that works fine with ajax=false. So must be something in crud.
Perhaps connected to previous issue with request.vars and load?
CONTROLLER
def test():
Cliff,
I think you need to rebind events to the DOM of the new content: you
need to add some code that will be executed each time the new content
is
received by the browser. If you do not want to rebind every time you
can try with jQuery.live() http://api.jquery.com/live/.
Hope it helps.
mic
it is built on top of greenlets and libevent (soon on libev) libraries
http://packages.python.org/greenlet/
and has a very good performance
http://nichol.as/benchmark-of-python-web-servers
code examples
https://bitbucket.org/denis/gevent/src/tip/examples/#source-path
can work with uwsgi
http://g
On 18/07/2011 18:00, Anthony wrote:
Looks like mail.send() calls time.gmtime(). What happens if you do the
following:
def time_test():
import time
return time.strftime("%a, %d %b %Y %H:%M:%S +", time.gmtime())
and go to the default/time_test URL -- do you get the correct time?
Anthony
well
This works:
{{for ticket in tickets:}}
{{a=PluginMModal(title='Hello World',content=crud.update(db.t_ticket,
ticket.id),close='close',width=40,height=80)}}
{{=a}}
{{=a.link(H1('SEE MODAL WINDOW'))}}
{{pass}}
Kenneth
On 19.7.2011 11:21, Kenneth Lundström wrote:
I have never used crud with
I have never used crud with mmodal, but I have used SQLFORM with it.
I guess you have read:
http://groups.google.com/group/web2py/browse_thread/thread/809bf7eb5072651f/90ecd2c59b3dacc6?lnk=gst&q=mmodal#90ecd2c59b3dacc6
Instead of:
{{a=PluginMModal(title='Hello World',content='give this a
try!',c
gevent , very intteresting. can you explain how it works ?
On Mon, Jul 18, 2011 at 2:52 AM, Vasile Ermicioi wrote:
> Mongrel2: lean & fast, asynchronous web serving
>> Eventlet: non-blocking I/O & coroutines
>> ZeroMQ: fast messaging & supports most languages
>> DictShield: data modeling & valid
61 matches
Mail list logo