Hi Ron, That's great, but please also consider leaving a note of what
solution you found. Many users refer to these threads and if they read the
whole thing and it just end with 'I found another solution', this can be
frustrating.
Many thanks and best wishes.
On Saturday, 21 May 2016 01:
Thank you Villas and Also Al for your input. I found a work around.
On Wednesday, May 18, 2016 at 5:38:22 PM UTC-4, villas wrote:
>
> Hi Ron,
> I said it was a similar function for good reason - I am simply trying to
> make corrections and help you get your code working :)
> One point is that
Hi Ron,
I said it was a similar function for good reason - I am simply trying to
make corrections and help you get your code working :)
One point is that you don't need to use profile_onaccept, you can simply
redirect after using the normal auth.profile().
Best wishes.
--
Resources:
- http:/
I thank you for your help villas and much appreciated. I guess the only two
difference between your approach and mine is:
(1)
profile[0].id = consumer_rec = db(query).select().first()
I believe they works the same.
(2)
But I may be wrong in doing.
You have:
form2 = SQLFORM(db.consumer
Hi Ron
Whilst I am still not totally clear in what you are trying to do, it seems
that your code to create your form2 is not written correctly. Maybe you
can change it a little and simply redirect to this similar function ...
def consumer_update():
if auth.user.user_type != 'Seller':
Instead on relying on callbacks you could implement the user() controller
in default.py
login, logout, register, profile, and so on are passed as request.args
in default.py, something like:
def user():
if auth.user:
if request.args == "profile":
if user.type == "seller":
red
Sorry, wasn't too clear. I posted the codeWhat I am trying to do is, I
have a table call consumer. It has a profile statement.
auth.settings.register_onaccept = lambda form: after_registration(form)
I use this to create that profile.
I would like that to be updated when someone update th
Why not use auth.settings.profile_onaccept or profile_next to simply
redirect to another url. You can easily access your auth info, create a
new form, or even post auth info into another table.
It isn't clear what you are trying to do.
If you need better access to auth.profile function then
Profile onaccept works but my logic is wrong I am guessing because it
escapes and always end up going to index page
Basically I am trying to update the form (which I call form2) with the info
that was used to create db.consumer
in db I have
auth.settings.profile_onaccept = lambda form: profile_
There is:
profile_next and profile_onaccept
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the
10 matches
Mail list logo