Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.73 KB | None | 0 0
  1. # Original
  2. ...
  3.     def form_invalid(self, form):
  4.         """The authorization form is not valid."""
  5.         response = super(LoginView, self).form_invalid(form)
  6.         messages.error(self.request, ('A user with such username and '
  7.             'password are not registrated in system. Access denied.'))
  8.  
  9.         return response
  10. ...
  11.  
  12. # Format
  13.  
  14.     def form_invalid(self, form):
  15.         """The authorization form is not valid."""
  16.         response = super(LoginView, self).form_invalid(form)
  17.         messages.error(
  18.             self.request,
  19.             (
  20.                 'A user with such username and password are not registrated '
  21.                 'in system. Access denied.'
  22.             )
  23.         )
  24.  
  25.         return response
  26. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement