Skip to content

Commit

Permalink
request passing
Browse files Browse the repository at this point in the history
  • Loading branch information
farin committed Jul 29, 2011
1 parent b532c82 commit 365d9f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion enroll/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def clean(self):
return super(SignUpForm, self).clean()


class RequestPassingAuthenticationForm(DjangoAuthenticationForm):
class RequestPassingAuthenticationForm(RequestAcceptingForm, DjangoAuthenticationForm):
"""
Pass request to backend.
Also patched to allow login by inactive users. Maybe it will be fixed in Django 1.3
Expand Down
5 changes: 5 additions & 0 deletions enroll/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ class LoginView(FormView):
def dispatch(self, *args, **kwargs):
return super(LoginView, self).dispatch(*args, **kwargs)

def get_form_kwargs(self):
kwargs = dict(request=self.request)
kwargs.update(super(LoginView, self).get_form_kwargs())
return kwargs

def get_redirect_to(self):
return self.request.REQUEST.get(self.redirect_field_name, '')

Expand Down

0 comments on commit 365d9f9

Please sign in to comment.