[web2py:15493] Re: Restricted left outer join
this should work
db().select(db.item.name,db.sales.price,left=db.sales.on
((db.sales.name==db.item.name)&(db.user.name=='bob'))
Massimo
On Jan 27, 12:06 am, Baron wrote:
> hello, I'm having difficulty making restrictions to a left outer
> join.
>
> I have these tables:
> Item: name
> Sale: nam
Yea, the formatting gets pretty tore up on here when I post for some
reason and I haven't been doing it for very long so my code is pretty
ugly to start with. The code you are looking at will create multiple
forms; however, request.vars is the same no matter which one I
submit. It always submits
hello, I'm having difficulty making restrictions to a left outer
join.
I have these tables:
Item: name
Sale: name, user, price
I want to select all the items with the prices of any sales for the
current user.
For example, given this data:
Items:
apple
banana
orange
Sales:
apple,bob,1
apple,bil
Basically, is there any code that receives control when an application
first starts that allows some initialisation/configuration that
doesn't have to run after every request?
I believe code could be put in db.py but that is not ideal
conceptually - and would run on every request?
I can see that
In T2 a table uses the attribute exposes to set the fields that should
be in crud create/update forms.
In Auth we will use a field attribute writable for the same purpose.
and readable for the select/read forms.
On Jan 26, 8:05 pm, Yannick wrote:
> Oh perfect Thanks Massimo, I was able to custom
didn't you just do it? What is the problem. The code is hard to read.
Massimo
On Jan 26, 7:52 pm, jlegler wrote:
> The reason I am asking is because I want to generate a bunch of forms
> based on data in the database and have them all show up on the screen
> at one time and be updateable. I ca
Not necessarily.
You can do
def user(): return dict(form=auth())
or
def login(): return dict(form=auth.login())
def register(): return dict(form=auth.register())
In the second case the syntax is similar to T2.
Massimo
On Jan 26, 4:26 pm, Fran wrote:
> On Jan 23, 7:10 pm, mdipierro wr
Oh perfect Thanks Massimo, I was able to customize it the way i
wanted... But I dont understand this part of your code:
And what do you meant here? "in gluon.tools.Auth this is going away
and you will use..."
" db.table.field.writable=False
db.table.field.readable=True
"
Wha
The reason I am asking is because I want to generate a bunch of forms
based on data in the database and have them all show up on the screen
at one time and be updateable. I can get all of the forms to show up
on the screen and I can fill them out; however, they all make the
first one submit. Is
I can see where you are coming from - in this case the "plugin" is one
step removed from the python/db driver, e.g. pyodbc, level. I think
of sql.py as providing a level of abstraction and the plugins
implementing it appropriately. As an aside, the db plugin interface of
the demo should ideally b
can you explain following in more depth?
"The view contains a menu, when the visitor clicks one of the menu items
one of the other functions should be exposed. The problem is passing on
the id."
my guess is you would like to have following:
in controlller function:
int(request.args[-1])
On Jan 23, 7:10 pm, mdipierro wrote:
> I have a preliminary version of inclusion if T2 functionality into
> web2py core. I am not yet promising backward compatibility here. The
> module name many change. For now it is in trunk as gluon/tools.py
I just started looking at this...porting my app to
mine is from:
svn co http://web2py.googlecode.com/svn/trunk/ web2py
-wj
On Mon, Jan 26, 2009 at 2:25 PM, Fran wrote:
>
> On Jan 26, 8:37 pm, Wes James wrote:
>> I am looking in auth now in the utils.py (did you say it was now
>> tools.py - trunk does not reflect that)
>
> It's tools.py for me
Thank you Bill. I will take a look.
This is very interesting and probably we should have something like
this but to clarify, you use the term plugin in a very different
context than I do.
I may be wrong but what you call a plugin is what I would call a
driver. This may be the cause of our apparen
Use the new generic.html to explore what is in the session
On Jan 26, 2:38 pm, annet wrote:
> In my application I have a controller with a number of functions. The
> first function gets an id from request.vars and uses it as a parameter
> in several queries, the result sets are returned in dicti
On Jan 26, 8:37 pm, Wes James wrote:
> I am looking in auth now in the utils.py (did you say it was now
> tools.py - trunk does not reflect that)
It's tools.py for me.
I download from launchpad via Bzr:
http://bazaar.launchpad.net/~mdipierro/web2py/devel/annotate/head%3A/gluon/tools.py
F
--~--
I have created a new branch on launchpad under ~billferrett/web2py/
plugins. The purpose is to demo an approach to using plugins to
provide functionality to the web2py core.
I needed an example area to apply the idea to so I have taken sql.py
and moved all the db-engine specific code (and some g
in
def register
shouldn't
subject=self.messages.verify_email_message
be
subject=self.messages.verify_email_subject
-wj
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to t
In my application I have a controller with a number of functions. The
first function gets an id from request.vars and uses it as a parameter
in several queries, the result sets are returned in dictionaries. When
I expose the function, the view consists of elements in
which the contents of the dic
I am looking in auth now in the utils.py (did you say it was now
tools.py - trunk does not reflect that)
and I see all the dev veriables.
thx
-wj
On Mon, Jan 26, 2009 at 1:33 PM, mdipierro wrote:
>
> This is the stuff I am polishing right now. If you have comments
> please let me know.
> When
This is the stuff I am polishing right now. If you have comments
please let me know.
When done I will post 1.56.
Massimo
On Jan 26, 1:57 pm, Wes James wrote:
> Yes, just debugging I noticed that in def register(self): that
> self.messages.verify_email_message does not exist.
>
> -wj
>
> On Mon
Yes, just debugging I noticed that in def register(self): that
self.messages.verify_email_message does not exist.
-wj
On Mon, Jan 26, 2009 at 12:45 PM, mdipierro wrote:
>
> That is because the text of the email is incomplete and needs to
> filled up by the programmer.
>
> You want to visit
>
That is because the text of the email is incomplete and needs to
filled up by the programmer.
You want to visit
http///[app]/default/[action]/verify?key=90a28ebe-41c2-41a7-854c-
a489230191f3
Massimo
On Jan 26, 1:40 pm, Wes James wrote:
> I am now:
>
> I this commented completely out:
>
>
I am now:
I this commented completely out:
mail.settings.login=''
and I had:
mail.settings.server='mail.server'
but then worked with:
mail.settings.server='mail.server:25'
if mail.settings.login does not exist then mail.settings.login=''
and then
mail.settings.server+':25' if ':' not in m
why?
because
del db.table[id]
would not allow passing parameters to such as delete_uploads. Moreover
because there was duplication of feature in sqlhtml.py and sql.py
Massimo
On Jan 26, 1:18 pm, mdipierro wrote:
> Do not use the new experimental feature delete_uploads because it is
> going a
Do not use the new experimental feature delete_uploads because it is
going away in favor of
db.table.field.autodelete=True
which will automatically take care of deleting uploaded file in all
situations in a more appropriate way. This in trunk now so please test
it.
This breaks T2 and T3 until a
Did you get the verification email? Did you click on the link therein
to activate the account?
To enable the account manually:
db(auth.settings.user_table.id>0).update(registration_key='')
Massimo
On Jan 26, 1:01 pm, "compte...@gmail.com" wrote:
> I changed app name from 0 (zero) to z and it w
I changed app name from 0 (zero) to z and it works. But when I do the
first registration, I keep getting "Invalid email"
-wj
On Jan 26, 11:15 am, Wes James wrote:
> Massimo,
>
> I'm trying the new stuff you have in web2py...
>
> I had to change from:
>
> from gluon.tools import Mail, Auth, Cru
Massimo,
I'm trying the new stuff you have in web2py...
I had to change from:
from gluon.tools import Mail, Auth, Crud
to this:
from gluon.utils import Mail, Auth, Crud
to this line since tools did not work.
I see that there is no tools in gluon dir but utils.py still
in db.py comments:
a
yes. this is a bug in trunk. will fix it tonight.
Massimo
On Jan 26, 8:13 am, mdipierro wrote:
> which version? trunk?
>
> On Jan 26, 6:03 am, notabene wrote:
>
> > Problem trying to access record id on update-form
>
> > form=SQLFORM(db.arr,rows[0],fields=fields)
> > if form.accepts(request.va
correction there is one known bug in 1.55.2. It has been reported
by one user that CSV export//import fails in some cases.
We are working on this but we have not yet been able to reproduce the
bahvior.
Massimo
On Jan 25, 7:19 am, mdipierro wrote:
> Tickets can be posted
> onhttp://code.go
no
On Jan 26, 8:24 am, voltron wrote:
> But not that it would overwrite or modify an existing variable/Key
> would it?
>
> On Jan 26, 3:19 pm, mdipierro wrote:
>
> > it depends.
>
> > all forms change session, the presence of session.flash changes
> > session.
>
> > Massimo
>
> > On Jan 26, 6:
Hello Massimo:
Thank you for all your help!!!
I'll make an application to test web2py!!!
Have a great day!!!
Best Regards,
Victor.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To
Thanks for the quick response.
On Jan 26, 6:13 am, mdipierro wrote:
> This is under testing. Will go away.
>
> Massimo
>
> On Jan 26, 1:02 am, jlegler wrote:
>
> > I am trying to use the new t2 functionality built into web2py and
> > having some odd problems. I am not sure why this is happenin
As Massimo pointed out, the t2 manual shows where to get t2:
http://mdp.cti.depaul.edu/examples/static/web2py.app.plugin_t2.tar
NOTE: web2py installation works with tar files;
If you get a copy from bitbucket, then you will want to get one of the 2
compressed tar versions, and uncompress befor
But not that it would overwrite or modify an existing variable/Key
would it?
On Jan 26, 3:19 pm, mdipierro wrote:
> it depends.
>
> all forms change session, the presence of session.flash changes
> session.
>
> Massimo
>
> On Jan 26, 6:34 am, voltron wrote:
>
> > Maybe a naive question; does r
it depends.
all forms change session, the presence of session.flash changes
session.
Massimo
On Jan 26, 6:34 am, voltron wrote:
> Maybe a naive question; does requesting a page withh SSL, create or
> modify the existing session in some way? I am trying to track down a
> bug that has been evadi
This is under testing. Will go away.
Massimo
On Jan 26, 1:02 am, jlegler wrote:
> I am trying to use the new t2 functionality built into web2py and
> having some odd problems. I am not sure why this is happening but
> using crud.create results in a redirect to an invalid function. What
> case
which version? trunk?
On Jan 26, 6:03 am, notabene wrote:
> Problem trying to access record id on update-form
>
> form=SQLFORM(db.arr,rows[0],fields=fields)
> if form.accepts(request.vars,session):
> session.flash="Record updated (%s)" % (form.vars.id)
>
> Flash result for id: None
>
> I ca
Maybe a naive question; does requesting a page withh SSL, create or
modify the existing session in some way? I am trying to track down a
bug that has been evading me all morning.
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to t
Problem trying to access record id on update-form
form=SQLFORM(db.arr,rows[0],fields=fields)
if form.accepts(request.vars,session):
session.flash="Record updated (%s)" % (form.vars.id)
Flash result for id: None
I can access other variables e.g form.vars.name but NOT: form.vars.id
I am puz