I'm not sure what to show, I mean, what would be useful as I don't know
what's going on totally. Let's say I want to register as a seafarer
registration function (default/register):
def register():
response.view = 'default/join.html'
auth.settings.formstyle = 'divs'
if not request.args(0) in ['seafarer', 'company']:
redirect(URL('default', 'oh_bummer'))
else:
if request.args(0) == 'seafarer':
response.title = "Join as seafarer | Maritime Recruiter"
response.meta.description = "Register to create your
professional seafarer profile. Let maritime companies find you."
db.auth_user.official_name.writable =
db.auth_user.official_name.readable = False
db.auth_user.country.writable = db.auth_user.country.readable =
False
db.auth_user.city.writable = db.auth_user.city.readable = False
db.auth_user.official_name.required = False
register_form = auth.register(next=URL('seafarer', 'profile'))
elif request.args(0) == 'company':
response.title = "Join as company | Maritime Recruiter"
response.meta.description = "Register and start looking for
professional seafarers."
db.auth_user.first_name.writable =
db.auth_user.first_name.readable = False
db.auth_user.last_name.writable =
db.auth_user.last_name.readable = False
db.auth_user.department.writable =
db.auth_user.department.readable = False
db.auth_user.nationality.writable =
db.auth_user.nationality.readable = False
db.auth_user.experience.writable =
db.auth_user.experience.readable = False
db.auth_user.rank.writable = db.auth_user.rank.readable = False
db.auth_user.email.label = 'Official company e-mail'
auth.settings.registration_requires_approval = True
register_form = auth.register(next=URL('company', 'pending'))
register_form.update(_class='formstyle')
return dict(register_form=register_form)
Decorated seafarer/profile:
@auth.requires_login()
@auth.requires_membership('seafarer')
def profile():
...
...
On Tuesday, August 13, 2013 12:52:37 PM UTC+2, Anthony wrote:
>
> Can you show some code?
--
---
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.