equal
deleted
inserted
replaced
43 context: see soc.views.helper.responses.errorResponse() |
43 context: see soc.views.helper.responses.errorResponse() |
44 **response_args: keyword arguments that are supplied directly to |
44 **response_args: keyword arguments that are supplied directly to |
45 django.http.HttpResponse; the most commonly used is 'status' to |
45 django.http.HttpResponse; the most commonly used is 'status' to |
46 set the HTTP status code for the response |
46 set the HTTP status code for the response |
47 """ |
47 """ |
|
48 |
48 self.message_fmt = message_fmt |
49 self.message_fmt = message_fmt |
49 self.context = context |
50 self.context = context |
50 self.response_args = response_args |
51 self.response_args = response_args |
51 |
52 |
52 |
53 |
65 Args: |
66 Args: |
66 message_fmt: same as Error.__init__() message_fmt, with the addition of |
67 message_fmt: same as Error.__init__() message_fmt, with the addition of |
67 a default value of None, in which case self.DEF_LOGIN_MSG_FMT is used |
68 a default value of None, in which case self.DEF_LOGIN_MSG_FMT is used |
68 **response_args: see Error.__init__() |
69 **response_args: see Error.__init__() |
69 """ |
70 """ |
|
71 |
70 if not message_fmt: |
72 if not message_fmt: |
71 message_fmt = self.DEF_LOGIN_MSG_FMT |
73 message_fmt = self.DEF_LOGIN_MSG_FMT |
72 |
74 |
73 Error.__init__(self, message_fmt, **response_args) |
75 super(LoginRequest, self).__init__(message_fmt, **response_args) |
74 |
76 |
75 |
77 |
76 class AccessViolation(Error): |
78 class AccessViolation(Error): |
77 """"Out of band error raised when an access requirement was not met. |
79 """"Out of band error raised when an access requirement was not met. |
78 """ |
80 """ |
|
81 |
79 pass |
82 pass |