#2228 closed enhancement (wontfix)
[patch] Add e-mail and URL to free comments
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | contrib.comments | Version: | |
Severity: | normal | Keywords: | |
Cc: | tyson@… | Triage Stage: | Design decision needed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | UI/UX: |
Description
Replaces #2184 due to comment spam.
This patch adds the ability for comments to accept a person's e-mail address and/or URL, optionally. This is a feature found in most comment systems and would be very useful in Django.
The current patch doesn't validate e-mail addresses or URLs, because I'm not too sure where I should do that.
Attachments (5)
Change History (21)
by , 18 years ago
Attachment: | better_comments.diff added |
---|
comment:1 by , 18 years ago
EmailField
and URLField
both have their own validation routines baked in; EmailField
makes sure you've entered something that looks like an email address (though it won't email to validate for you; that'd be something that could be developed on a per-case basis), and URLField
checks the format of the URL and, by default, hits it to make sure it exists.
comment:2 by , 18 years ago
Cc: | added |
---|
I set up a small test app, and was able to enter "x" for all fields (name, e-mail, url, comment), and both e-mail and url were accepted as "x" and displayed as "x". In the database, they were stored as "x".
Is there someplace that I should set-up proper validation? I think it might be handy that, if a developer adds the e-mail and url fields, the fields get validated like the name field is checked for emptiness.
I'll attach my sample project.
by , 18 years ago
Attachment: | comment_test.zip added |
---|
Sample use of free comments with e-mail and URL.
comment:3 by , 18 years ago
Hi Tyson, +1 from me (FWIW :-) on this, you're absolutely right IMHO that free comments ought to support email address & URL.
Regarding the validation issue, you probably want to change django/contrib/comments/views/comments.py so that it instantiates a forms.URLField and a forms.EmailField, instead of two plain TextFields.
-greg a.
by , 18 years ago
Attachment: | better_comments2.diff added |
---|
Changed from TextField to proper fields and, by consequence, adds proper error checking
comment:4 by , 18 years ago
A hah! I knew I was missing something simple. I've uploaded a better patch and an updated comment test project. I've tried messing it up in a number of ways, but it looks pretty fool-proof now.
Thanks, Greg!
comment:5 by , 18 years ago
Cc: | added; removed |
---|---|
Keywords: | rthml tab space editor js added |
Summary: | [patch] Add e-mail and URL to free comments → hi-world cup |
comment:6 by , 18 years ago
Cc: | removed |
---|---|
Summary: | hi-world cup → [patch] Add e-mail and URL to free comments |
comment:7 by , 18 years ago
Cc: | added |
---|---|
Keywords: | rthml tab space editor js removed |
Stupid spam. *grumble grumble*
comment:8 by , 18 years ago
Component: | Contrib apps → django.contrib.comments |
---|
comment:9 by , 18 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:10 by , 18 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Jacob is rewriting the comments app for 1.0, so it isn't worth applying this and taking the compatibility hit for just one release.
comment:12 by , 18 years ago
Component: | django.contrib.comments → Database wrapper |
---|---|
Keywords: | fitness equipment health and fitness added |
Triage Stage: | Accepted → Design decision needed |
Version: | → new-admin |
comment:13 by , 18 years ago
Keywords: | fitness equipment health and fitness removed |
---|---|
Version: | new-admin |
spam cleanup
comment:14 by , 17 years ago
Component: | Database wrapper → django.contrib.comments |
---|
by , 16 years ago
Attachment: | better_comments3.diff added |
---|
Simply an update of the diff file for more recent releases.
Adds e-mail and URL capability