Hi Stackoverflow people,
I am using the Userena package for my user registration site. The package allows to change the template or the form class during with the call of the views.py function “def profile_edit” (if I understood it correctly).
The full header of the view function is:
def profile_edit(request, username, edit_profile_form=EditUserProfileForm,
template_name='userena/profile_form.html', success_url=None,
extra_context=None):
The demo project calls the view function in the template through the urls.py with the statement
{% url userena_profile_edit user.username %}
When I try to change the form parameter for example with
{% url userena_profile_edit user.username edit_profile_form=EditUserProfileForm %}
I get the follow error, which does not make sense to me:
Caught ValueError while rendering: Don't mix *args and **kwargs in call to reverse()!
I have also tried to the specify the kwargs dict, but it did not work either.
{% url userena_profile_edit user.username kwargs={'edit_profile_form':EditUserProfileForm} %}
How can I correctly call the function? I am confused why the last statement would not work.
Thank you for your help!
how about making the username a kwarg?