Ok, I see. THANKS A LOT everyone :)
Josh
On Apr 25, 9:18 pm, Anthony wrote:
> On Monday, April 25, 2011 8:47:17 PM UTC-4, JoshC wrote:
>
> > What I need to know is how to get information from the view to the
> > controllers and database. I wasn't able to figure out how to use this
> > for instan
Anthony, thank you. I see there that it gives the syntax for accessing
args (request.args(i)), but it doesn't for vars (the dict). This is
the problem I had earlier. What is the syntax for accessing vars? Like
this?
request.vars(key)
On Apr 25, 9:18 pm, Anthony wrote:
> On Monday, April 25, 201
On Monday, April 25, 2011 8:47:17 PM UTC-4, JoshC wrote:
>
> What I need to know is how to get information from the view to the
> controllers and database. I wasn't able to figure out how to use this
> for instance:
>
> URL('a', 'c', 'f', args=['x', 'y'], vars=dict(z='t'))
>
> How do you acces
In f(), request.args(0) will be 'x', request.args(1) will be 'y' and
request.vars.z will be 't'.
http://web2py.com/book/default/chapter/04#request
What I need to know is how to get information from the view to the
controllers and database. I wasn't able to figure out how to use this
for instance:
URL('a', 'c', 'f', args=['x', 'y'], vars=dict(z='t'))
How do you access what is saved in the dict from the view on the
controller side?
On Apr 2
On click it always submits via POST but the vars are passed via
URL(,vars=...) as GET vars. For more complex scenarions it may be
better be more explicit.
On Apr 25, 5:37 pm, pbreit wrote:
> Interesting. Possible to support a post with vars?
Interesting. Possible to support a post with vars?
I just added to trunk...
quantity
{{=A('add
product',callback=URL('add_product',args='id'),target='there))}}
On Apr 25, 2:53 pm, pbreit wrote:
> And I just noticed that you are going to run into some intricacy with how to
> implement the quantity selector.
>
> You'll either need to create a for
And I just noticed that you are going to run into some intricacy with how to
implement the quantity selector.
You'll either need to create a for each toy (in which case each toy
will also have its own "add to cart" button) or you will have to identify
each quantity form field which might make
nice share, massimo, i want to learn it, but your video is too fast, i've
already tried to pause it many times, but it seems i lost some part, could
you share the code please?
thank you so much in advance
On Tue, Apr 26, 2011 at 12:15 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
>
A bit of stylistic advice:
toys = db(db...
return dict(toys=toys)
{{for toy in toys:}}
{{=toy.name}}
etc.
Maybe try it like this:
A(' Add to cart', _href=URL('add_to_cart', vars={'item': i.item, 'page':
request.function}))
Did you see this?
http://vimeo.com/20768689
The functionality you need is implemented as an example via ajax.
Massimo
On Apr 25, 11:46 am, JoshC wrote:
> Dear Friends,
>
> As you may recall, I wrote before mentioning that I am working on a
> project for a databases class (an e-store). We were
13 matches
Mail list logo