I found the answer searching through the group posts:
form.element(_name='email')['_readonly']=True
although this doesn't seem to be documented in the manual,
and even looking through the gluon directory (and grepping for _readonly )
didn't reveal anything.
Would this have been
I don't totally understand but would this do it?
db(db.memo_store.created_by==auth.user.id)(db.viewed_memos.memo==db.memo_store.id).select()
Sounds like some kind of race condition between the cron scripts because it
doesn't happen every time. Is there any chance the 3 cron scripts are
dependent on each other in some way such as a file passed between or sharing
a database. If there is any relationship between the cron scripts would
For the record, here's how I was able to implement an by invitation only
registration form.
Assuming that the user received an email with a link of form
http://.../default/user/register?token=sfaasdfasfa,
and assuming I have defined a db table 'registrant' associating a token with
a name
Hello!!!
I have a form where an organizer can input a list of comma-separated email
address, so that each person receives an invitation to register on the
website (you can only register for the site if you have an invitation).
Is there an easy way to get the if form.accepts() to use
Hi, you can create a custom validator for doing that
include this in any model:
### THE CUSTOM VALIDATOR ###
class IS_EMAIL_LIST(object):
def __init__(self, error_message='Email %s is invalid', sep=,):
self.format = format
self.error_message = error_message
self.sep =
forget the latest, I wrote directly here in email and there were errors.
This is the tested code:
### put in models ###
class IS_EMAIL_LIST(object):
def __init__(self, error_message=Email %s is invalid, sep=,):
self.error_message = error_message
self.sep = sep
def
https://gist.github.com/1066850
I am interested in a work with that shell together with web2py, too.
As much as i know, web2py works with the IPython shell.
On Jul 5, 12:38 pm, Bruno Rocha rochacbr...@gmail.com wrote:
Does anybody knows how can we run web2py in shell mode under DreamPie?
http://dreampie.sourceforge.net/
I have tried it. I like it better than Facebook, especially because of its
commitment to privacy. The circles feature is great. I think most people
don't friend their bosses, coworkers, and business acquaintances of Facebook
because they don't want their personal lives to be exposed to those
This has been fixed in trunk. Anthony pointed it out to me one week
ago.
On Jul 6, 12:20 am, GoldenTiger goldenboy...@gmail.com wrote:
I referred to generic views by default,
likehttp://web2py.com/examples/simple_examples/hello6
and discussed recently here
Invalid view in
You would suggest you do this instead
db.table.email.writable=False
in the controller, before defining the form.
Setting the field readonly in the view may still allow a malicious
attacker to tamper with the field value.
On Jul 6, 1:12 am, Luis Goncalves lgoncal...@gmail.com wrote:
I found
Yes that is the problem wit cron issue. If one of the processes locks
a resource, cron does not know about it and keeps spawning processes
as scheduled. The new processes find the resource locked and freeze of
crash but use ram. This is not a bug because cron is not supposed to
know what the tasks
Can you explain the goal?
On Jul 6, 3:23 am, Miguel Lopes mig.e.lo...@gmail.com wrote:
I'm experimenting with dynamically generating functions, aka 'actions' in
controllers. However, I've been unsuccessful. I can use exec and closures
successfully in regular Python code, but I can't make it
On Wednesday, July 6, 2011 1:20:30 AM UTC-4, GoldenTiger wrote:
I referred to generic views by default, like
http://web2py.com/examples/simple_examples/hello6
and discussed recently here
Invalid view in 1.97.1:
On Jul 6, 2011, at 1:23 AM, Miguel Lopes wrote:
I'm experimenting with dynamically generating functions, aka 'actions' in
controllers. However, I've been unsuccessful. I can use exec and closures
successfully in regular Python code, but I can't make it work with web2py.
Any thoughts on how
It was my understanding that Python's GC frees any resources not explicitly
freed, and cron runs jobs in a try/except/finally block and rolls back any
uncommitted transactions.
I have reproduced the issue with the three running sequentially, and in
every case, the logs indicate that my functions
I putting together an interface where users can add pages to a site and have
these pages indistinguishable from hard-coded pages/functions. However, I
would have the best of both worlds and have very clean urls. Thus, I'm
trying to avoid things like:
When has this behaviour changed? I can't seem to find it on log
On Jun 17, 7:33 pm, Jose jjac...@gmail.com wrote:
On 17 jun, 11:35, Anthony abasta...@gmail.com wrote:
On Friday, June 17, 2011 10:16:16 AM UTC-4, Jose wrote:
Hi,
In later versions of the trunk the default view
Thanks. In conjunction with routes could supply a solution (shortening the
urls).
I think I should rethink the payoff (see my reply to Massimo regarding my
goals).
Thanks,
Miguel
On Wed, Jul 6, 2011 at 3:12 PM, Jonathan Lundell jlund...@pobox.com wrote:
On Jul 6, 2011, at 1:23 AM, Miguel Lopes
1.96.1 -- see http://www.web2py.com/examples/default/changelog
On Wednesday, July 6, 2011 10:33:12 AM UTC-4, Oskari wrote:
When has this behaviour changed? I can't seem to find it on log
On Jun 17, 7:33 pm, Jose jja...@gmail.com wrote:
On 17 jun, 11:35, Anthony abas...@gmail.com wrote:
Jonathan is right. Here is a simple way around.
Create a single controller called dynamical. use request.args(0) to
parse the name of one of the dynamical actions and remap
def dynamical():
actionname, request.args[:] = request.args(0), request.args[1:]
# call actionname and pass
Please keep us posted.
Massimo
On Jul 6, 9:31 am, John Duddy jdu...@gmail.com wrote:
It was my understanding that Python's GC frees any resources not explicitly
freed, and cron runs jobs in a try/except/finally block and rolls back any
uncommitted transactions.
I have reproduced the issue
Hi, is it possible to apply filtering in a multiselect control created
with list:refereces.
I mean I have the list of options, which is quite big.
---
opt1
opt2
---
I'd like to be able to see a shortened version according to the
content of a filter field (textbox
Humm,
Nice. Yes, closures are enough, and cleaner too.
Is routes OK for production mode?
Txs,
Miguel
On Wed, Jul 6, 2011 at 3:54 PM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
Jonathan is right. Here is a simple way around.
Create a single controller called dynamical. use
It is unlikely that this is web2py related, but I'm about to go crazy with
this one. But I guess it's such a general thing someone must know what is
going on.
I'm using different uploaded media, such as files, images and flash files
(.swf files). I can display images without problem, but not
Here we go. Looks good. Cool that it's at Yelp, too.
*What*: Double Feature: Web2Py + Speeding up Dev Cycles with Tools for
Django others http://www.meetup.com/sfpython/events/24721631/
*When*: Wednesday, July 13, 2011 6:30 PM
*Where*: Yelp
706 Mission Street
San Francisco, CA 94103
Would IS_IN_SET() work?
Hello,
Is there a way I can test if form have been submit and if no validators have
triggered?
Thanks
Richard
form.accepts(...) returns True if all validators pass and False otherwise --
is that what you're looking for?
Anthony
On Wednesday, July 6, 2011 11:43:29 AM UTC-4, Richard wrote:
Hello,
Is there a way I can test if form have been submit and if no validators
have triggered?
Thanks
You can also use form.errors
if form.accepts(...):
...
elif form.errors:
...
HTH,
Miguel
On Wed, Jul 6, 2011 at 5:08 PM, Anthony abasta...@gmail.com wrote:
form.accepts(...) returns True if all validators pass and False otherwise
-- is that what you're looking for?
Anthony
On
hi,
question:
how could I guess the field in something like an interactive shell?
i assume, I have to specify db.tableName.filedName?
is there something like db.myTable.myField.type?
thanks,
Mart :)
On Jul 4, 12:11 pm, mart msenecal...@gmail.com wrote:
ah ha! thank you very much! :)
db.tables is a list of the names of the tables in db, and
db.tablename.fields is a list of the names of the fields in db.tablename. Is
that what you're looking for?
Anthony
On Wednesday, July 6, 2011 12:27:09 PM UTC-4, mart wrote:
hi,
question:
how could I guess the field in something
I'm not very sure about the effects that could have including some person to
the Acquaintances circle rather than to the Friends circle
On Wed, Jul 6, 2011 at 12:52 PM, Ross Peoples ross.peop...@gmail.comwrote:
I have tried it. I like it better than Facebook, especially because of its
Excellent! Works perfectly!! Also a great lesson in how to extend the set
of web2py form validators!
Thank you, Bruno!!! Obrigado!!!
Luis.
almost :) i'm looking to guess the field types. for example, at the
cmd line i can use a quick and dirty helper like this:
-table myTable fields=id,name,value
this displays a nice ascii table but, the fields are comma delimited
so if the returned field is a list (also comma delimited), the table
http://picasa.google.com/support/bin/answer.py?answer=1224181
If you've signed up for Google+
Photos up to 2048 x 2048 pixels and videos up to 15 minutes won't count
towards your free storage.
If you haven't signed up for Google+
Photos up to 800 x 800 pixels and videos up to 15 minutes won't
this test worked (yeah, i asked the question too hastily again ;) )
for item in self.db[table].fields:
if isinstance(self.db[table][item].type,str) \
and self.db[table][item].type=='string':
print 'field is string: {0}'.format(self.db[table][item])
returned:
field is
I am wondering if this discussion ended up going anywhere. As a newbie
webapp developer (but not a newbie programmer), the only thing I might add
to what blackthorne has already said is that I'm finding it easier to
understand what's going on and what's where by interacting with my
filesystem
The fact is, you can already do very much everything form the shell:
create an app
cd application
mkdir myapp
cp -r welcome/* myapp
delete an app
rm -r applications
copy a plugin
cd ~/web2py
ccpcplugin.py plugin_name app_source app_target
install a remote app or remote plugin
cd
I realise that it's not what I need when I just press send... Since not all
the validators have passed when I want to my code to enter in action...
I face a really bizzard issue...
Here my model :
db.define_table('ref_tregistry',
Field('tregistry_id','id'),
Good point!
Unfortunately, I am not expert enough to understand how to do this in my
case, because I am using the form=auth.register().
Wouldn't I have to do what you suggest inside Auth.register ?
(for an explanation of why I am doing this, see:
This should do it:
def user():
if request.args(0)=='register':
registrant = db(db.registrant.token ==
request.vars.token).select().first() or redirect(URL('error'))
db.auth_user.email.writable=False # gives error
db.auth_user.email.default=registrant.email
http://www.erichynds.com/examples/jquery-ui-multiselect-widget/demos/
If you use this plugin I think it will work... See seconde plugin demo
dropbox in the page...
Richard
On Wed, Jul 6, 2011 at 10:59 AM, Nicolas Palumbo napalu...@gmail.comwrote:
Hi, is it possible to apply filtering in a
Doesn't db.myTable.myField.type work? Or am I missing something?
Anthony
On Wednesday, July 6, 2011 12:59:54 PM UTC-4, mart wrote:
almost :) i'm looking to guess the field types. for example, at the
cmd line i can use a quick and dirty helper like this:
-table myTable
On Wednesday, July 6, 2011 2:04:26 PM UTC-4, Luis Goncalves wrote:
db.table_user.email.writable=False # gives error
I think this should be db.auth_user, not db.table_user. Note, the name of
the auth user table (which defaults to 'auth_user') is stored in
Both with Massimo's
auth.settings.table_user.email.default = registrant.email
auth.settings.table_user.email.writable=False
form=auth.register()
and with your
db[auth.settings.table_user_name].email.writable=False
I ended up using this widget, which is more intuitive for a big list:
http://www.quasipartikel.at/multiselect/
On Wed, Jul 6, 2011 at 6:08 PM, Richard Vézina
ml.richard.vez...@gmail.com wrote:
http://www.erichynds.com/examples/jquery-ui-multiselect-widget/demos/
If you use this plugin I think
Massimo, thanks for the post -- it clarifies some of what you said on
09 Nov 2010. I actually revived this thread to see if anyone had
collected these under one interface, e.g.:
web2py_manage --newapp=APPNAME
Makes a new directory applications/APPNAME and copies scaffolding
there.
Free, unlimited storage of photos as large as 2048x2048 and videos under 15
in length is pretty awesome. This will be more than enough for most people.
@sebastian:
The point of the circles is so that you can share information with only
certain groups if you want. So you could be friends with
well, i think so but, even if a field is set to 'string', and a script
receives something comma delimited, DAL will will want to treat it as
a list.
so doing x.type takes me half the way, then i need to check if a list
wasn't inserted into the record instead (most of the time i get a
string, but
Yes it is a other option for multiselect.
;-)
Richard
On Wed, Jul 6, 2011 at 2:45 PM, Nicolas Palumbo napalu...@gmail.com wrote:
I ended up using this widget, which is more intuitive for a big list:
http://www.quasipartikel.at/multiselect/
On Wed, Jul 6, 2011 at 6:08 PM, Richard Vézina
I'm currently using ldap to auth with ldap_auth module of web2py.
Currently if you are successful to login, are automatically redirected
to index page.
Which happens the first time the user log in to the system as well.
I'd like to detect if it is the first time for a user to log into the
system
Do you have:
auth.settings.registration_requires_verification = True
somewhere? If so, remove that line or set it to False. That attempts to send
a verification email to the user's email address (which is failing and
causing the error), which I assume you don't need given that your
Thanks for responses. Point about definition of objects in the python
files accepted! Can I just check something here, as I may have the
wrong end of the stick...
My understanding was that the Apps are all completely independent
(i.e. seperate authentication etc). However, I'm seeing an
I'm trying to figure out this example from the book of
requires_permission...
@auth.requires_permission('add', 'number')
def add(a, b):
return a + b
def function_seven():
return add(3, 4)
I put this code into controllers/default.py. What additional auth db
entries do I need to make
You can do it with code:
1.
auth.add_permission(group_id, 'name', 'object', record_id)
gives permission name (user defined) on the object object (also user
defined) to members of the group group_id. If object is a tablename then
the permission can refer to the entire table by setting
bump
...still looking for some help and hoping not to get lost in all the
other posts out there. Anyone else using this tool? Looks very
powerful but I'm having trouble with a couple of basic issues.
If anyone knows of a better place to post my question, I'm all ears...
-Jim
On
yes circles is a good idea... just wondering if it possible to hide
which group each person is part of... so that for example the GF wont
complain of not being part of the very close friends circle... as in south
park facebook episode :D
That doesn't sound right. Can you reproduce the behavior?
Are you using CAS (
https://groups.google.com/d/topic/web2py/Qcw6B1Y89JM/discussion), or regular
Auth?
Anthony
On Wednesday, July 6, 2011 3:20:37 PM UTC-4, beedge wrote:
Thanks for responses. Point about definition of objects in
I think that by default your friends, familly, etc. don't see in which
circle you put them... But I am not sure of that...
It's what they said : http://www.youtube.com/watch?v=ocPeAdpe_A8NR=1 *: 43
sec*
Richard
On Wed, Jul 6, 2011 at 5:46 PM, Sebastian E. Ovide
sebastian.ov...@gmail.com
Does anyone have a spare invitation for list-stalker like me? (only
submitted a single patch to date)
On Jul 6, 9:16 am, mikech mp.ch...@gmail.com wrote:
I am interested, but not anxious to add to my social load at the moment.
What are your impressions?
Mike
Forget about it...
I found the problem... There was to many things anyway.
;-)
Richard
On Wed, Jul 6, 2011 at 1:52 PM, Richard Vézina
ml.richard.vez...@gmail.comwrote:
I realise that it's not what I need when I just press send... Since not all
the validators have passed when I want to my
Maybe one possibility is if your code has classes with a __del__ method in
them, Massimo would have better perspective on if this is a possibility. If
a class with this method is involved in a circular reference the garbage
collector cannot clean it up because of uncertainty of execution of the
This should not be a problem because cron jobs are executed in their
own processes (not threads) and they should just die.
Anyway, I cannot completely exclude it either.
On Jul 6, 6:32 pm, ron_m ron.mco...@gmail.com wrote:
Maybe one possibility is if your code has classes with a __del__ method
If you started with a copy of the Welcome app did you change the database
name? If both apps have the same database URL originally defined in the
Welcome app in file models/db.py they will share tables.
Actually, I still want email verification to happen (because someone else
may stumble upon the link and register with a password unknown to the real
user).
Nevertheless, I disabled registration verification, and now I get an error
deep within gloun/tools.py
Error occurs after entering
My example did not have the line:
form=auth.register()
On Jul 6, 1:39 pm, Luis Goncalves lgoncal...@gmail.com wrote:
Both with Massimo's
auth.settings.table_user.email.default = registrant.email
auth.settings.table_user.email.writable=False
Found the error after putting it down then reading through my .db file
from start to finish. It was something silly, I defined the database
at two different points in the file, one being after the new auth
table. Remove it and everything works as it should. Apologises
thanks...
I still get the same error:
File /home/ubuntu/web2py/gluon/tools.py, line 1683, in register
user = self.db(table_user[username] == form.vars[username]).select().first()
KeyError: 'email'
I don't know if it makes a difference or not, but I'm using emails for login
(not a username) -- as
Are you sure your db.registrant has an email?
On Jul 6, 10:04 pm, Luis Goncalves lgoncal...@gmail.com wrote:
I still get the same error:
File /home/ubuntu/web2py/gluon/tools.py, line 1683, in register
user = self.db(table_user[username] ==
form.vars[username]).select().first()
Here is more about my talk in San Francisco on July 13
http://www.meetup.com/sfpython/events/24721631/
Look forward to see some of you.
Massimo
Thankyou Massimo,
I have been able to connect OK to a Teradata database based on the
change to dal.py. An important parameter to specify in the DAL for
Terdata is DATABASE=xyz to set the default database. This worked OK
as is.
There are a few differences between DB2 and Teradata though (as I
Thanks for your reply.
My confusion is about object when it is not a table. For one thing, the
appadmin interface seems to force the object to be a table--it is chosen
from the drop down box of available tables. Do I have to create a dummy
table for each of these permission objects?
Beyond
Yes, when I click on the invite and go to the website I get the registration
form filled out with email (and name (excluded from my shortened example))
visible and non-editable.
Luis.
—«sent by mobile»—
On Jul 6, 2011 8:17 PM, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
Are you sure
Hello,
I will start a business project that needs create a web layer in front of
Adampiere / Open Bravo for hospital / clinic operation.
We will avoid JAVA, but need some of the objects provided in those ERPs,
because that jython is the best choice.
I choose web2py for the weblayer, but at the
In fact, just to make sure there wasn't something hidden in my app affecting
the behavior,
I downloaded a fresh install of web2py,
and get the same error:
File /home/pierluigi/web2py/gluon/tools.py, line 1796, in register
user = self.db(table_user[username] ==
None that I know of. The processes that accumulate have the same
arguments as the main web2py process (as shown by ps -ef) so it's like
a fork with no exec.
On Wednesday, July 6, 2011, ron_m ron.mco...@gmail.com wrote:
Maybe one possibility is if your code has classes with a __del__ method in
No. There is a good chance that the person who uploaded the memo
(db.memo_store.created_by) is not the same as the person viewing the memo
(db.viewed_memos.created_by).
My solution, for people who are interested in something similar:
def unread_memos():
Will return a list of all unread
79 matches
Mail list logo