you can make the view where you have the upload form with 2 buttons
login and register pointing to default/user/login and
default/user/register
{{=A('LOGIN', _class='btn', _href=URL('default', 'user', args=['login']))}}
If you want to have the registration or login form in the same page,
it is just a little bit more complex, but in the essence you need to
have the action attribute of the form entities pointing to the usual
action (default/user).
In any case in the controller the action of the upload form should
decorated as such:
@auth.requires_login
def ...
HTH
2013/3/18 Massimo Di Pierro <[email protected]>:
> I do not understand. :-(
>
>
> On Friday, 15 March 2013 10:17:50 UTC-5, Marian wrote:
>>
>> I've stuck on this for a while. I need one page where I can create a
>> submission with image uploads etc. and a required reference to auth.user. If
>> the user is logged in it is quite simple but you should create a submission
>> and login OR register on one page?
>>
>> I have no idea how to solve this. :(
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.