When using user_signature=True in a form that action goes to another method and that method has @auth.requires_signature I am getting access denied, if I remove the @auth.requires_signature I still see the signature but don't have the access denied message.
locationform=FORM(
DIV(
SELECT(countries_options,_id='by-country',_name='country', _onchange="updateProvinces(this)", value=selected_country),
_id='country_options', _class='filter-selects'
),
DIV(
SELECT(provinces_options,_id='by-province', _name='province_state',_onchange="updateCities(this)", value=selected_province),
_id='province_options', _class='filter-selects'
),
DIV(SELECT(
cities_options,_id='by-province', _name='city', value=selected_city),
_id='city_options', _class='filter-selects'
),
DIV(_class='clear'),
INPUT(_type='submit', _value='Save', _class='filter-btn'),
_name='locationform',
_action=URL('adviewer','savesettings/location', user_signature=True)
)
Capture Method:
# adviewer.savesettings()
@auth.requires_login()
@auth.requires_signature() # If I remove this there is no access denied.
def savesettings():
print request.vars
print request.args(0)
from youadAPI.adviewer_api import AdViewerEngine
if request.args(0) == 'location':
adviewer_engine.update_or_create_adviewer_settings(
AdViewerEngine.location,
dict(
country=request.vars['country'],
province=request.vars['province_state'],
city=request.vars['city']
)
)
elif request.args(0) == 'language':
adviewer_engine.update_or_create_adviewer_settings(
AdViewerEngine.language,
dict(
language = request.vars['language']
)
)
elif request.args(0) == 'keywords':
adviewer_engine.update_or_create_adviewer_settings(
AdViewerEngine.keywords,
dict(
keywords = request.vars['keywords']
)
)
--
--
Regards,
Bruce Wade
http://ca.linkedin.com/in/brucelwadehttp://www.wadecybertech.com
http://www.warplydesigned.comhttp://www.fitnessfriendsfinder.com