Here is a modified version
https://bitbucket.org/rochacbruno/surveycloud
Bug fixes
Auth included
No more cpuckle
Powertables
Smart reports
http://zerp.ly/rochacbruno
Em 30/06/2011 23:59, "pbreit" escreveu:
> Everything above the "if form.accepts()" is run each time the submit
button
> is pressed
Db.define_table('foo',Field('a'),Field('b'), Field('ab',unique=True,
compute=lambda r: r.a + r.b))
http://zerp.ly/rochacbruno
Em 30/06/2011 23:04, "Nick Arnett" escreveu:
> On Thu, Jun 30, 2011 at 6:43 PM, Nick Arnett
wrote:
>
>>
>>
>> On Thu, Jun 30, 2011 at 4:15 PM, Anthony wrote:
>>
>>> IS_N
>Validators, by the way, are >enforced at the form level and
> have no direct effect on the db.
There are 3 levels of validation.
Db validadors:
Unique, notnull, expression etc
Dal validators:
Required, compute, default etc
Form & dal validators:
IS_IN_DB etc..
Note the former will be checked
It's sound familiar to me :O
2011/7/1 Massimo Di Pierro
> https://github.com/MisterRager/DOMination
--
http://martin.tecnodoc.com.ar
Hi,
I have situation where ,once I recive Email ids from users i have
autogenerate password and mail to them.
I can insert this info to my local user_auth table.
I can add it in local user_auth table like below
password="password"
db.auth_user.insert(first_name="autotest",last_name="autotest",e
Can anyone recommend a good syntax checker for Web2py?
It would also be good to know how to prevent spurious error messages
caused because the checker can't find all the import statements, etc.
Anyone interested?
Mail me privately
Ciao
--
Massimiliano
I had this working a few weeks ago.
I have an upload form which I load into the page using the LOAD helper.
Right now I get an exception when I try to upload.
Here is the code.
def upload_contacts():
form = FORM(INPUT(_type='file',
_name='data',requires=[IS_NOT_EMPTY()]), INPUT(_type='sub
yes.
1) add a field 'completed_registration' to the auth_user table and default to
False
2) then in a model
if auth.user and not auth.user.completed_registration and not
URL()==URL('default','user'): redirect('default','user/profile'))
On Jul 1, 2011, at 8:32 AM, DanB wrote:
> fference betw
Hi,
I am interested in whether web2py can be used to clone a relatively
simple ecommerce website made in Drupal. I have posted the job on
elance, job number 24934137 and would welcome bids from this user
group. I have specified Django or web2py, but would like to give
web2py a go if I get a good b
So, if I have this straight (sorry, very new to web2py, and python) to
implement this in the Welcome App, I would add the following:
To the db.py model (mostly uncommenting):
from gluon.contrib.login_methods.rpx_account import RPXAccount
auth.settings.actions_disabled = \
['register','change_
oops thinkig some other way soory...thats simple
it can be encoded using urllib2 and send to cas app..there i can get in
request.vars.i thinks thats the right approach..
On Fri, Jul 1, 2011 at 4:34 PM, sagar wrote:
> Hi,
>
> I have situation where ,once I recive Email ids from users i have
>
Assuming you have ajax=True in LOAD(), I think file uploads will not work
without some special setup. According to the book:
**Please note:* Because Ajax post does not support multipart forms, i.e.
file uploads, upload fields will not work with the LOAD component. You could
be fooled into thi
Got it thanks.
Strange; I am almost certain that I had it working at some point;
perhaps I am mistaken.
Thanks for the heads up.
On 7/1/11 10:03 AM, Anthony wrote:
Assuming you have ajax=True in LOAD(), I think file uploads will not
work without some special setup. According to the book:
Since I want to make sure that my application is as secure as possible, I
wanted to force all traffic to use HTTPS. At the bottom of my db.py, I have
this:
FORCED SSL #
session.secure()
if not request.is_https:
redirect('https://%s/%s' % (request.env.http_host, reque
a jQuery version of web2py's HTML helpersvery nice. I use jQuery
heavily, but I rarely ever "create" DOM elements using JavaScript. Either I
wrap hidden elements for later with "display: none;" or I just replace with
HTML from an AJAX callback. But if creating DOM elements in JavaScript
on-
On Jul 1, 2011, at 7:09 AM, Ross Peoples wrote:
> Since I want to make sure that my application is as secure as possible, I
> wanted to force all traffic to use HTTPS. At the bottom of my db.py, I have
> this:
>
> FORCED SSL #
> session.secure()
> if not request.is_https
You might also contact some of the folks listed on
http://www.experts4solutions.com/ -- they're all web2py developers.
Anthony
On Friday, July 1, 2011 7:08:46 AM UTC-4, gubbanoa wrote:
> Hi,
>
> I am interested in whether web2py can be used to clone a relatively
> simple ecommerce website ma
Hello, just updated web2py to 1.97.1 and one of my sites crashed with
the same problem:
{{=LOAD('voting', 'voting_viewlet', ajax=False)[0][0]}}
too bad
On 1 июл, 01:10, pbreit wrote:
> Any ideas on this one? Has anyone else had problems with LOAD(ajax=False) in
> trunk? I tried switching it to de
def voting_viewlet():
return dict()
works fine
But if I try to check request.vars, it crashes:
def voting_viewlet():
if request.vars.vote:
pass
return dict()
rises an error
On 1 июл, 20:46, LightOfMooN wrote:
> Hello, just updated web2py to 1.97.1 and one of my sites crash
so, request has no vars storage
On 1 июл, 20:53, LightOfMooN wrote:
> def voting_viewlet():
> return dict()
>
> works fine
>
> But if I try to check request.vars, it crashes:
>
> def voting_viewlet():
> if request.vars.vote:
> pass
> return dict()
>
> rises an error
>
> On 1 и
I just tried the following by running web2py -S app -M -R my_script.py
(since this is how I run the script from cron):
from gluon.settings import global_settings
print global_settings
The cronjob value seems to always be False and I can't figure out how this
actually gets set to True. Any ideas
That problem has been fixed in trunk, but looks like another problem may
have been introduced. Try downloading trunk revision d4c2d8d15bb1 -- that
fixes the request.vars problem, but comes before the copy.copy(request)
problem was introduced. Actually, maybe you could try the latest revision in
On Jul 1, 2011, at 8:18 AM, Ross Peoples wrote:
> I just tried the following by running web2py -S app -M -R my_script.py (since
> this is how I run the script from cron):
>
> from gluon.settings import global_settings
> print global_settings
>
> The cronjob value seems to always be False and I c
I'm calling from external cron, which is why this option is not getting set.
So all I have to do is add --cronjob to my cron line and it's all set.
Alternatively, while trying to figure this problem out, I noticed that
global_settings.cmd_options.shell will return a string if run from the
shell
Actually, scratch that. When running in Apache,
global_settings.cmd_options is set to None, so I guess you could do
some extra checking there to make sure it initialized, then check the
shell variable, but it's way easier to just add --cronjob and just
check global_settings.cronjob.
And Google Gro
On Jul 1, 2011, at 8:46 AM, Ross Peoples wrote:
> I'm calling from external cron, which is why this option is not getting set.
> So all I have to do is add --cronjob to my cron line and it's all set.
> Alternatively, while trying to figure this problem out, I noticed that
> global_settings.cmd_o
>From something like that:
form = SQLFORM.factory(
Field('mydate', 'date', label='Data carico', requires=IS_DATE()),
table_name='mytable',
_id = 'myform'
)
I got:
[...]
...
[...]
The submit row doesn't take the tablename
Is it normal?
--
Massimiliano
Thx, but I just disabled some components until the new stable version
of webpy :)
On 1 июл, 21:29, Anthony wrote:
> That problem has been fixed in trunk, but looks like another problem may
> have been introduced. Try downloading trunk revision d4c2d8d15bb1 -- that
> fixes the request.vars problem
Anyone know of a good jquery inline table editor?
Thanks.
I saw jqGrid; but I was looking for something less complex.
I am really looking for something simple;
Highlight a row; Edit a row; Save the data;
I dont need sorting or anything like that.
There is a discussion on Hacker News today about what Python
frameworks are best suited for Google App Engine.
http://news.ycombinator.com/item?id=2715887
Somebody with more technical knowledge than me should answer a few
web2py questions over there. Specifically this one:
http://news.ycombinator
Information collected from actual users of the service.
Comments can belong to several people,
and can be positive (+), negative (-) or other (~).
This post will be updated periodically.
Hosting company: Webfaction
Type of service: latest
web2py version:
Python version: 2.4/3.2
OS & version:
hey thanks worked like a dream *cheers
On Wed, Jun 29, 2011 at 10:35 PM, Bruno Rocha wrote:
> I did this for web2py.com using request.function, I created a function
> tooggle_class which receives request.function and do this job.
>
> here is an example that I use in http://CursoDePython.com.br
I am running latest in trunk.
I have this code being called from a LOAD function;
I see it appends the '.load' to the generated URL
When I think it should be
/campaigns/edit/5435
It returns
/campaigns.load/edit/5435
{{ for n in items:}}
{{= n.campaign_name }}
src="{{= URL('static','im
Information collected from actual users of the service.
Comments can belong to several people,
and can be positive (+), negative (-) or other (~).
This post will be updated periodically.
Hosting company: Webfaction
Type of service: latest
web2py version:
Python version: 2.4/3.2
OS & version:
También está dot_cloud cuando yo lo probé en la beta, y web2py corría bien,
ahora salió de la beta no se como andará en costos
https://www.dotcloud.com/pricing/ Si alguien lo prueba avise.
2011/7/1 DenesL
> Information collected from actual users of the service.
> Comments can belong to several
I think powertable Bruno's plugin integration of Datatables was allowing
inline edition... Look here : http://powertable.blouweb.com/ and there :
http://www.datatables.net/
Good luck.
Richard
On Fri, Jul 1, 2011 at 12:48 PM, David J. wrote:
> Anyone know of a good jquery inline table editor?
>
If you don't specify an extension in URL(), I think it will just use the
extension of the current request, which is .load in this case. Try
explicitly setting extension=False:
{{=URL('default','campaigns',args=['edit',n.id],extension=False)}}
Anthony
On Friday, July 1, 2011 1:24:11 PM UT
you can pass extension=0 to the URL
URL('default','campaigns',**args=['edit',n.id],extension=0)
2011/7/1 David J.
> I am running latest in trunk.
>
> I have this code being called from a LOAD function;
>
> I see it appends the '.load' to the generated URL
>
> When I think it should be
>
> /cam
On Jul 1, 2011, at 10:45 AM, Martín Mulone wrote:
> you can pass extension=0 to the URL
>
> URL('default','campaigns',args=['edit',n.id],extension=0)
extension=False would be prettier.
>
>
> 2011/7/1 David J.
> I am running latest in trunk.
>
> I have this code being called from a LOAD funct
Hi,
using the T() class in IS_IN_SET yields a strange result:
In this environment *T* does not depend on the language choosen by T.force
but *depends only on the language used in the setup of the browser.*
Tested with Google Chrome, Safari
Here are some lines of code to verify:
This is my databa
I just use text mate on a Mac and with syntax highlighting I rarely have syntax
errors. And I never have import errors (since there's very little importing
necessary).
On Jul 1, 2011, at 11:03 AM, pbreit wrote:
>
> I just use text mate on a Mac and with syntax highlighting I rarely have
> syntax errors. And I never have import errors (since there's very little
> importing necessary).
I've been using pyflakes, mainly because it's trivial to configure and run.
And make sure you don't do extension=None -- that's what it's set to by
default, and in that case, it will just use request.extension, which you
don't want. You have to explicitly set extension=False (or 0).
Anthony
On Friday, July 1, 2011 1:53:27 PM UTC-4, Jonathan Lundell wrote:
> On Jul 1
I usually do extension=''
With web2py, can you increment an integer field, which is used as a
counter, with just 1 call to the db? Regardless, I'm looking for the
most efficient stand-alone syntax for incrementing a field. 1 line is
better than 2.
db(db.table.id=-id).update(db.table.field=db.table.field+1)
does not work on GAE
On Jul 1, 3:33 pm, weheh wrote:
> With web2py, can you increment an integer field, which is used as a
> counter, with just 1 call to the db? Regardless, I'm looking for the
> most efficient stand-alone syntax for in
Very Goog Tutorial. Congratulations.
Ovidio Marinho Falcao Neto
ovidio...@gmail.com
88269088
Paraiba-Brasil
2011/7/1 Ross Peoples
> This post is meant to be informative, as I have been trying to get this
> working on my server for
There is a document that says what can or can not in GAE?
Ovidio Marinho Falcao Neto
ovidio...@gmail.com
88269088
Paraiba-Brasil
2011/7/1 Massimo Di Pierro
> db(db.table.id=-id).update(db.table.field=db.table.field+1)
>
> does not
Thanks, Massimo.
On Jul 1, 4:37 pm, Massimo Di Pierro
wrote:
> db(db.table.id=-id).update(db.table.field=db.table.field+1)
>
> does not work on GAE
>
> On Jul 1, 3:33 pm, weheh wrote:
>
>
>
>
>
>
>
> > With web2py, can you increment an integer field, which is used as a
> > counter, with just 1 c
Maybe I spoke too soon...
mytab=123
db(db.mytab.id==mytab_id).update(db.mytab.cnt=db.mytab.cnt+1)
SyntaxError: keyword can't be an expression
On Jul 1, 5:58 pm, weheh wrote:
> Maybe I spoke too soon...
>
> mytab=123
> db(db.mytab.id==mytab_id).update(db.mytab.cnt=db.mytab.cnt+1)
> SyntaxError: keyword can't be an expression
There are logic problems with ajax=False. Just use ajax=True. I am not
sure ajax=False should be an option al all.
On Jul 1, 11:45 am, LightOfMooN wrote:
> Thx, but I just disabled some components until the new stable version
> of webpy :)
>
> On 1 июл, 21:29, Anthony wrote:
>
>
>
>
>
>
>
> > Th
db(db.mytab.id==mytab_id).update(cnt=db.mytab.cnt+1)
On Jul 1, 4:59 pm, weheh wrote:
> On Jul 1, 5:58 pm, weheh wrote:
>
>
>
>
>
>
>
> > Maybe I spoke too soon...
>
> > mytab=123
> > db(db.mytab.id==mytab_id).update(db.mytab.cnt=db.mytab.cnt+1)
> > SyntaxError: keyword can't be an expression
Google is launching their own login service:
https://sites.google.com/site/gitooldocs/home
Has anyone been granted an account for testing yet?
Thanks, that works now. My head is fuzzy today after all I've been
through. I had tried this:
db.mytab[mytab_id]=dict(cnt=db.mytab.cnt+1)
but that didn't work. Is there a "shortcut" syntax to do this? Just
curious, as the "longcut" is clearly just as short.
This is the shortcut
db(db.mytab.id==mytab_id).update(cnt=db.mytab.cnt+1)
because it does it in one SQL statement
Other ways, when they work, are equivalent to
row = db.mytab(mytab_id)
row.update_record(cnt=row.nct+1)
ie.e. two statements.
On Jul 1, 7:59 pm, weheh wrote:
> Thanks, that work
On Fri, Jul 1, 2011 at 6:58 PM, weheh wrote:
> mytab=123
> db(db.mytab.id==mytab_id).update(db.mytab.cnt=db.mytab.cnt+1)
> SyntaxError: keyword can't be an expression
>
try with a lambda (I did not tested, but as lambda returns a valuem could
work.
mytab=123
db(db.mytab.id==mytab_id).update(db
forget the lambda..
the problem is the key
mytab=123
db(db.mytab.id==mytab_id).update(*cnt*=db.mytab.cnt+1 )
SyntaxError: keyword can't be an expression
Thanks all.
In response.menu each item of the list is a 4 element tuple. The second
element of tuple can be True or False to represent that item is active. This
causes teh MENU class in gluon/html.py to attach class="web2py-menu-active"
to the li tag associated with that menu item.
That class is not repres
Oops I found it, simple once you know how. In layout.html do the following
Change
jQuery('ul.sf-menu').superfish();});
To
jQuery('ul.sf-menu').superfish({pathClass:
'web2py-menu-active'});});
This will allow suckerfish to use the class added to the active menu item by
the web2p
ajax=False is very important for me, so, I like 1.96 more than 1.97 :)
I use it at most interactive components, that can be displayed on the
all pages of site.
Just one example:
def voting_viewlet():
if not session.has_key('finished_votings'):
session.finished_votings = {}
if requ
63 matches
Mail list logo