Commits

Paul Bormans  committed 9707bc2 Draft

added initial values for edit profile view

  • Participants
  • Parent commits 5756dbd

Comments (0)

Files changed (1)

File profiles/views.py

                               context_instance=context)
 create_profile = login_required(create_profile)
 
-def edit_profile(request, profile_obj = None, form_class=None, success_url=None,
+def edit_profile(request, profile_obj = None, initial = None, form_class=None, success_url=None,
                  template_name='profiles/edit_profile.html',
                  extra_context=None):
     """
             form.save()
             return HttpResponseRedirect(success_url)
     else:
-        form = form_class(instance=profile_obj)
+        form = form_class(instance=profile_obj, initial=initial)
     
     if extra_context is None:
         extra_context = {}