Commits

Anonymous committed f00b015

Set user in the form object

Comments (0)

Files changed (1)

profiles/utils.py

         class Meta:
             model = profile_mod
             exclude = ('user',) # User will be filled in by the view.
+        
+        def __init__(self, *args, **kwargs):
+            self.user = kwargs.pop('user', None)
+            super(_ProfileForm, self).__init__(*args, **kwargs)
+
     return _ProfileForm