Closed
Bug 552281
Opened 14 years ago
Closed 13 years ago
Description for "authentication fields" aren't set correctly
Categories
(Webtools :: ISPDB Server, defect)
Webtools
ISPDB Server
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: JasnaPaka, Assigned: sancus)
References
Details
Attachments
(1 file)
3.82 KB,
patch
|
bwinton
:
review+
|
Details | Diff | Splinter Review |
1) Visit http://ispdb.mozillamessaging.com/details/266 2) You can see that fields "Incoming authentication" and "Outgoing authentication" don't have correct description. Text "password-cleartext" is value of option from form.
Assignee | ||
Comment 1•14 years ago
|
||
Comment 2•14 years ago
|
||
Comment on attachment 503570 [details] [diff] [review] patch v1 >Index: config/models.py >- ("password-encrypted", "Encrypted Password"), >+ ("password-encrypted", "Encrypted Password"), There are some trailing spaces to remove here. >+ ("NTLM", "NTLM"), >+ ("GSSAPI", "GSSAPI") >@@ -109,10 +110,11 @@ >+ ("NTLM", "NTLM"), >+ ("GSSAPI", "GSSAPI") You really want the trailing commas on these, so that when you add another item, you don't need to mess with this line, or worse, forget to mess with this line and run into a syntax error. ;) >Index: config/templatetags/custom_filters.py >+@register.filter >+def data_verbose(boundField): >+ """ >+ Returns field's data or it's verbose version >+ for a field with choices defined. >+ >+ Usage:: >+ >+ {% load data_verbose %} >+ {{form.some_field|data_verbose}} >+ """ >+ data = boundField['value'] >+ field = boundField >+ return field.has_key('choices') and dict(field['choices']).get(data, '') or data Bleah. Python doesn't have the ?: operator, and you're better off not trying to fake it. Use: rv = data if field.has_key("choices"): rv = dict(field["choices"]).get(data, "") return rv please. (Also, we're using "s for strings everywhere else, so we might as well keep that consistent here.) Finally, the rest of the code is PEP-8 clean <http://pypi.python.org/pypi/pep8>, so it would be nice if this was as well. r=me with those changes. :) Thanks, Blake.
Attachment #503570 -
Flags: review?(bwinton) → review+
Assignee | ||
Comment 3•13 years ago
|
||
fixed in r81372
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Component: ispdb → ISPDB Server
Product: Mozilla Messaging → Webtools
You need to log in
before you can comment on or make changes to this bug.
Description
•