hi!
The problem is that traceback shows that column in my db is not
unique. In code, there was 'unique=True',
but I changed it. The problem still occurs. What should I do?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Grou
Hi Denes,
Thanks for the extensive answer to my question. Both the digression
and sample code were very helpful.
Kind regards,
Annet.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to
Thanks everyone for wise advice. In my particular case, there is
normally only
one user, just occasionally two, on different machines, but the
applications must
run on either of two machines using the same database.
I will bear in mind your advice about serving applications over the
network and u
Is this happening in your local development environment is it using
sqlite?
If so, the only solution I found was to delete the local database and
start over.
On Oct 5, 9:23 am, mika wrote:
> hi!
>
> The problem is that traceback shows that column in my db is not
> unique. In code, there was 'un
this one has been floored
the following works correctly locally (sqlite) but trips over when
running on dev_appserver
query = (self.db.assessmentQuest.candidate_id == userId) &
(self.db.assessmentQuest.id == nQuestId)
rows = self.db(query).select(self.db.assessmentQuest.ALL)
It's the self.db.as
Cool!
Before I try to do something I really wanted to know if there was
something done by passing a parameter.
Thanks a lot guys!
On Oct 5, 1:08 am, mdipierro wrote:
> It would be nice to a widget that does this.
>
> On Oct 4, 10:14 pm, Álvaro Justen [Turicas]
> wrote:
>
> > On Sat, Oct 3, 20
Hi,
I want to customize the auth functionality to add a user id(or name).
This is what I've done so far.
DB:
from gluon.tools import Auth
auth=Auth(globals(),db)
auth.settings.table_user=db.define_table(
auth.settings.table_user_name,
Field('user_name',length=128,default='',requir
GAE is very weird. It does allow queries that mix queries by ID and by
other fields.
You must first search by ID, then check that other condition is valid:
query = (self.db.assessmentQuest.id == nQuestId)
rows = self.db(query).select()
if not rows or rows[0].candidate_id != userId:
do_somethi
I heard back from tech support. Python is 'supported' on midphase but
they still have version 2.4 installed with no ETA on any upgrades. I
think that means I can't use them as a host am I correct?
When you say not to use a public folder, what would I need to do to
avoid that. If I put the web2
The article on Unit Test Controllers using unittest
(http://www.web2py.com/AlterEgo/default/show/213 )
gives some examples on how to unit-test web2py controllers.
However, how do I test controller functions that are decorated with
auth.requires_login()? When I tried running a test similar to tha
Hi all,
I'm implementing a comments and wiki feature on my web2py app. Is
there any best practices or strategies you've used or would recommend
on preventing spam or porn posts onto the site. I'm looking for some
automated prevention as I'm afraid the amount of posts will be way too
much for hu
implementing a captcha or recaptcha based system should help.
On Mon, Oct 5, 2009 at 9:27 AM, Web2py-SuperFan wrote:
>
> Hi all,
>
> I'm implementing a comments and wiki feature on my web2py app. Is
> there any best practices or strategies you've used or would recommend
> on preventing spam or
On Mon, Oct 5, 2009 at 11:27, Web2py-SuperFan wrote:
>
> Hi all,
>
> I'm implementing a comments and wiki feature on my web2py app. Is
> there any best practices or strategies you've used or would recommend
> on preventing spam or porn posts onto the site. I'm looking for some
> automated preve
On Mon, Oct 5, 2009 at 10:15, Chris S wrote:
>
> I heard back from tech support. Python is 'supported' on midphase but
> they still have version 2.4 installed with no ETA on any upgrades. I
> think that means I can't use them as a host am I correct?
Well, so your hosting company doesn't matter
Hello all. Just discovered web2py and I think it's great. I wish we
were using it here at work, and so do some of my co-workers.
I have created a little form as an exercise for myself and I came up
with some questions.
It's likely that some of the things I'm wondering about are handled by
the fr
Thank you devnull,
some answers below:
On Oct 5, 10:14 am, devnull wrote:
> Hello all. Just discovered web2py and I think it's great. I wish we
> were using it here at work, and so do some of my co-workers.
>
> I have created a little form as an exercise for myself and I came up
> with some que
In the context of creating a plugin system this may be useful:
http://api.drupal.org/api/group/hooks/7
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web2py
thanks M
I've changed the 3 places where I'd used combined fields with an id
search and all is humming on dev_appserver.
cheers
On Oct 5, 2:07 pm, mdipierro wrote:
> GAE is very weird. It does allow queries that mix queries by ID and by
> other fields.
> You must first search by ID, then check
Database Synchronization and UUID's
I am wondering if I need to do searches by uuid's in a different way.
I have been experimenting with them and frequently run into the error -
> KeyError: 'uuid' when attempting to do queries or when trying to
pass them as variables from controllers to views and
There must be a bug. Will double check tonight.
On Oct 5, 12:38 pm, CJSteel wrote:
> Database Synchronization and UUID's
>
> I am wondering if I need to do searches by uuid's in a different way.
> I have been experimenting with them and frequently run into the error ->
> KeyError: 'uuid' when a
What I would like is to not 'see the man behind the curtain',
that is the server.
I know that he is going to be there, somewhere, but I don't
want the user to be aware of the server's existence - and that
includes using a Windows service. Ideally, I would like the
application to be a 'portable a
Below is the difficulty I was having getting request.vars to the
target of the redirect. [add] redirects to [add_2], and when it does,
request.vars doesn't have .x and .y ... instead I find myself stuffing
x and y into the session explicitly and then pulling them out in
[add_2] also explicitly.
I
I thought that "Hooks" is the "mend/patch" for non objetc oriented
languages/frameworks like Drupal, because Drupal started in php4 when
php wasnt object oriented yet... (no inheritance, no interfaces, ...)
By the way, What is the language paradigm of web2py? it is object
oriented, isnt it?
r
I am not suggesting we implement hooks.
I am pointing web2py users to a place where people have actually build
a plugins (modules) system that has been successful in practice.
The implementation is ugly and we should not copy that but it may give
us some ideas about what plugins should do or sho
GAE has added a feature so you can query by id or keyname (using
__key__), it is not implemented in DAL yet.
http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html#Queries_on_Keys
Robin
On Oct 5, 8:07 am, mdipierro wrote:
> GAE is very weird. It does allow queries that
Is there any information I should be aware of when trying to run
web2py on Python 2.4? I do agree I wouldn't choose this host, but
this is a FREE opportunity for me to check out web2py on a friends
paid for account. I'm using this to compare/contrast a host with GAE
before I start paying hosting
You may need this:
http://www.web2py.com/AlterEgo/default/show/219
You may also have problems with appliances that use 2.5 syntax but
nothing that you cannot find a way around to. The source of web2py is
2.4 compliant.
Massimo
On Oct 5, 4:39 pm, Chris S wrote:
> Is there any information I sho
Has anyone already written code to synchronize Google Apps groups with
web2py groups? That is, I'd like to be able to make use of the groups
I've defined in Google Apps in decorator functions like
@auth.requires_membership
The code in gluon.contrib.login_methods.gae_google_account retrieves a
On Mon, Oct 5, 2009 at 15:22, don wrote:
>
> What I would like is to not 'see the man behind the curtain',
> that is the server.
>
> I know that he is going to be there, somewhere, but I don't
> want the user to be aware of the server's existence - and that
> includes using a Windows service. Id
Yes, that is a possibility. I could do something similar to this
using a small Python application instead of a shell script as I
want something that will run on Windows.
Thanks,
Don.
On Oct 5, 8:02 pm, Álvaro Justen [Turicas]
wrote:
> My mother uses a system based on web2py and I've created
On Oct 5, 2009, at 5:02 PM, Álvaro Justen [Turicas] wrote:
> It depends on how you will distribute your application.
> My mother uses a system based on web2py and I've created a shell
> script to:
> - kill any web2py.py process
> - start a new web2py.py process
> - open firefox in http://localh
Fluid, Prism and Chrome 'application short-cuts' all look very
similar.
Don.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsub
I am here trying to create a custom widget, inside a class that
extends SQLFORM, but how could I create a custom widget that allow me
to send others parameters besides "field" and "value"?
I would like call the new widget by sending the parameters "control"
and "function". So, inside the function
you can do something like
class MyWidget:
def __init__(self,**parameters):
self.parameters=parameters
def __call__(self,field,value):
# use self.parameters
return INPUT(_type='text',_name=field.name,_value=value)
db.table.field.widget=MyWidget(parameter1="1",pa
I've created a simple code.
In my db_task.py I have the following lines, among others:
from applications.myapp.modules.mywidgets import *
db.main.product.requires=IS_IN_DB(db,db.product.id,db.product.name,
orderby=~db.product.name)
db.main.product.widget = options_with_add_link.widget
And in
I do not think you need to extend SQLFORM to implement this. You just
need a new widget for the reference field. I think.
Not that there is anything worng with extending SQLFORM but I think it
may be more complex that needs to be.
On Oct 5, 8:22 pm, Renato-ES-Brazil wrote:
> I've created a simpl
Massimo, I don't believe! The solution is simpler than I thought. :-)
Thanks a lot! :-)
>From what I read in the manual I thought I had to extend SQLFORM
manually.
The solution solved my needs, but just to clarify me, how I could
implement the same solution but using a class that extends SQLFORM
GRR this is a major error in the manual
In book page 172
db.import_to_csv_file(form.vars.data.file,unique=False)
is supposed to be:
db.import_from_csv_file(form.vars.data.file)
only db[table].import_from_csv_file take the unique argument. not the
import of the entire DB.
You get the KeyE
I added the corresponding arguments to db.import_from_csv_file in
trunk so that the example works as listed (but without auth)
Sorry for this error.
Massimo
On Oct 5, 9:10 pm, mdipierro wrote:
> GRR this is a major error in the manual
>
> In book page 172
>
> db.import_to_csv_file(form.va
Actually, my main question is simply - how does one use/instantiate
Model code from external files? (Like, if I want to do outsource some
business logic to a module, so that several controllers can reuse it?)
--~--~-~--~~~---~--~~
You received this message because y
If a function needs to be used by multiple controllers in the same
app, the easy solution is to put it into a model file.
If a function needs to be used by multiple controllers in different
applications than it needs to be defined in a module, imported, passed
the required global variables and ca
Ok, I think I understand, so far.
My main question still stands, though - how can I import or
instantiate a model file, externally (say, for unit testing)? And do
you have any suggestions on how to unit test auth-protected controller
functions?
On Mon, Oct 5, 2009 at 10:59 PM, mdipierro wrote:
we normally suggest using doctests and int this case you can use
web2py.py -T
if you want to use unittest you should look into
gluon/shell.py exec_environment(...)
The problem is that you are not just testing functions that take an
input and return an output. They needs to have an environment t
I agree Drupal modules work well - simple to install/use/uninstall and
cover a wide range of functionality.
Also Firefox extensions do a good job.
On Oct 6, 7:32 am, mdipierro wrote:
> I am not suggesting we implement hooks.
>
> I am pointing web2py users to a place where people have actually b
I was almost blaming SQLite and almost changed it.
Why the need of the default attribute?
Is this a bug? I did not understand.
On 10 set, 17:36, mdipierro wrote:
> def upload():
> import cStringIO
> data=request.body.read()
> f=cStringIO.StringIO(data)
> current_filename='bla.bla
I do not understand the question
Massimo
On Oct 5, 11:05 pm, yamandu wrote:
> I was almost blaming SQLite and almost changed it.
> Why the need of the default attribute?
> Is this a bug? I did not understand.
>
> On 10 set, 17:36, mdipierro wrote:
>
> > def upload():
> > import cStringIO
>
when you redirect you get a new request object so you could pass the
data to the new request.vars with:
URL(r=request, f='add_2', vars={'x':request.vars.x,
'y':request.vars.y})
or simply:
URL(r=request, f='add_2', vars=request.vars)
Probably better to pass temporary data in vars than store in ses
I've used the recaptcha built in to auth_user registration and it
worked well. Is it easy to integrate with other forms?
On Oct 6, 1:34 am, david bain wrote:
> implementing a captcha or recaptcha based system should help.
>
> On Mon, Oct 5, 2009 at 9:27 AM, Web2py-SuperFan wrote:
>
> > Hi all,
I can send mails when running on localhost, but could not get this
working after deploying to gae. I'm using this from the default db.py:
mail.settings.server='smtp.gmail.com:587'# your SMTP server
mail.settings.sender = 'em...@gmail.com' # your email
mail.settings.logi n= 'email:**'
49 matches
Mail list logo