Django

Code

Ticket #2228 (closed: wontfix)

Opened 3 years ago

Last modified 1 year ago

[patch] Add e-mail and URL to free comments

Reported by: Tyson Tate <tyson@fallingbullets.com> Assigned to: adrian
Milestone: 1.0 beta Component: django.contrib.comments
Version: Keywords:
Cc: tyson@fallingbullets.com Triage Stage: Design decision needed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

better_comments.diff (3.9 kB) - added by Tyson Tate <tyson@fallingbullets.com> on 06/24/06 02:06:03.
Adds e-mail and URL capability
comment_test.zip (10.8 kB) - added by Tyson Tate <tyson@fallingbullets.com> on 06/24/06 11:29:08.
Sample use of free comments with e-mail and URL.
better_comments2.diff (3.9 kB) - added by Tyson Tate <tyson@fallingbullets.com> on 06/25/06 21:56:15.
Changed from TextField? to proper fields and, by consequence, adds proper error checking
comment_test2.zip (14.4 kB) - added by Tyson Tate <tyson@fallingbullets.com> on 06/25/06 21:57:14.
Adds error output for field validation
better_comments3.diff (4.2 kB) - added by bjornkri on 07/25/08 05:41:38.
Simply an update of the diff file for more recent releases.

Change History

06/24/06 02:06:03 changed by Tyson Tate <tyson@fallingbullets.com>

  • attachment better_comments.diff added.

Adds e-mail and URL capability

06/24/06 10:05:05 changed by ubernostrum

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.

06/24/06 11:28:17 changed by Tyson Tate <tyson@fallingbullets.com>

  • cc set to tyson@fallingbullets.com.

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.

06/24/06 11:29:08 changed by Tyson Tate <tyson@fallingbullets.com>

  • attachment comment_test.zip added.

Sample use of free comments with e-mail and URL.

06/25/06 20:58:58 changed by greg[at]abbas.org

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.

06/25/06 21:56:15 changed by Tyson Tate <tyson@fallingbullets.com>

  • attachment better_comments2.diff added.

Changed from TextField? to proper fields and, by consequence, adds proper error checking

06/25/06 21:57:14 changed by Tyson Tate <tyson@fallingbullets.com>

  • attachment comment_test2.zip added.

Adds error output for field validation

06/25/06 21:58:35 changed by Tyson Tate <tyson@fallingbullets.com>

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!

07/04/06 22:44:07 changed by hi-world cup

  • cc changed from tyson@fallingbullets.com to hi-world, cup.
  • keywords set to rthml tab space editor js.
  • summary changed from [patch] Add e-mail and URL to free comments to hi-world cup.

07/04/06 22:58:03 changed by adrian

  • cc deleted.
  • summary changed from hi-world cup to [patch] Add e-mail and URL to free comments.

07/05/06 01:31:43 changed by Tyson Tate <tyson@fallingbullets.com>

  • cc set to tyson@fallingbullets.com.
  • keywords deleted.

Stupid spam. *grumble grumble*

11/26/06 19:19:52 changed by adrian

  • component changed from Contrib apps to django.contrib.comments.

02/17/07 03:58:09 changed by Simon G. <dev@simon.net.nz>

  • stage changed from Unreviewed to Accepted.

03/10/07 05:53:03 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to wontfix.

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.

03/27/07 02:26:52 changed by anonymous

xvcxvxc

04/02/07 00:48:49 changed by anonymous

  • keywords set to fitness equipment,health and fitness.
  • version set to new-admin.
  • component changed from django.contrib.comments to Database wrapper.
  • stage changed from Accepted to Design decision needed.

04/02/07 01:26:16 changed by Simon G. <dev@simon.net.nz>

  • keywords deleted.
  • version deleted.

spam cleanup

05/26/07 08:44:45 changed by Simon G. <dev@simon.net.nz>

  • component changed from Database wrapper to django.contrib.comments.

09/09/07 23:56:33 changed by lomb510@india.com

  • summary changed from [patch] Add e-mail and URL to free comments to Exporter situated in Asia's hub for Light Engineering Goods that includes Tractor Parts and Automobile Spare Parts. Our range includes Spares for lumbardini..

Exporter situated in Asia's hub for Light Engineering Goods that includes Tractor Parts and Automobile Spare Parts. Our range includes Spares for lumbardini.

09/09/07 23:59:13 changed by russellm

  • summary changed from Exporter situated in Asia's hub for Light Engineering Goods that includes Tractor Parts and Automobile Spare Parts. Our range includes Spares for lumbardini. to [patch] Add e-mail and URL to free comments.

Reverted ticket spam

07/25/08 05:41:38 changed by bjornkri

  • attachment better_comments3.diff added.

Simply an update of the diff file for more recent releases.


Add/Change #2228 ([patch] Add e-mail and URL to free comments)




Change Properties
Action