Commit Graph

103 Commits

Author SHA1 Message Date
Jacob Kaplan-Moss 752cc49a62 Fixed #10169: don't accidentally try to redirect to "None" after posting a comment.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10429 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-07 20:22:36 +00:00
Jacob Kaplan-Moss f2bdc14a95 Fixed #10633, #10691: marked strings in the comments app for translation. Thanks, zgoda.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10427 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-07 19:57:01 +00:00
Jacob Kaplan-Moss 6319470f88 Fixed #10585: comment redirects built from the `next` parameter now work correctly when `next` already contains a query string.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10424 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-07 19:49:07 +00:00
Jacob Kaplan-Moss eef2c5f6de Fixed #9956: relax the URL pattern for primary keys in the comment redirect so that models with custom PKs aren't cut out of the loop.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10422 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-07 19:40:59 +00:00
Jacob Kaplan-Moss 92a38be9c6 Fixed #9792: corrected invalid HTML in the comment form and comment preview.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10420 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-07 19:34:21 +00:00
Jacob Kaplan-Moss f8adf99cdb Fixed #9268: pass the "next" param through in the comment preview/post view. Also updated the docs to make this a bit clearer.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10418 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-07 19:28:13 +00:00
Jacob Kaplan-Moss f0560dfdb2 Fixed #9282: added a generic comment moderation toolkit. See the documentation for details.
This began life as (part of) James Bennett's comment-utils app, and was adapted to be part of Django by Thejaswi Puthraya and Jannis Leidel. Thanks, all!

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10122 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-23 21:07:02 +00:00
Jacob Kaplan-Moss 231a7e0419 Fixed #9958: split the `CommentForm` into a set of smaller forms. This for better encapsulation, but also so that it's easier for subclasses to get at the pieces they might need. Thanks to Thejaswi Puthraya.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10110 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-21 13:45:31 +00:00
Jacob Kaplan-Moss e923b545a4 Fixed #9303 (again) by removing some code missing in [9891].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10109 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-21 13:45:15 +00:00
Jacob Kaplan-Moss c485e236bd Fixed #8193: all dynamic imports in Django are now done correctly. I know this because Brett Cannon borrowed the time machine and brought Python 2.7's '`importlib` back for inclusion in Django. Thanks for the patch-from-the-future, Brett!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10088 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-18 16:55:59 +00:00
Jacob Kaplan-Moss 1aac357d34 Fixed #9303: comment templatetags no longer assume the built-in comment model.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9891 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-23 22:46:32 +00:00
Jacob Kaplan-Moss 63d85a684a Fixed #8630: finished the custom comment app API that was left out of 1.0. This means it's now possible to override any of the models, forms, or views used by the comment app; see the new custom comment app docs for details and an example. Thanks to Thejaswi Puthraya for the original patch, and to carljm for docs and tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9890 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-23 22:16:26 +00:00
Jacob Kaplan-Moss 7d4a954836 Refactored CommentForm.get_comment_object into a handful of separete methods to make it easier for subclasses to provide custom models and data. Refs #8630.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9889 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-23 22:16:00 +00:00
Jacob Kaplan-Moss 4035ea3538 A few small fixes to django.contrib.comments (Comment.get_as_text for non-authenticated users; references to Comment.permalink; unused imports). Fixes #9143, #9429, and 9439. Thanks, Thejaswi Puthraya.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9730 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-12 17:27:41 +00:00
Malcolm Tredinnick cff78c60ac Fixed #8963 -- Use the require_POST decorator instead of doing things manually in one of the comment views. Thanks, zgoda.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9121 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 05:10:35 +00:00
Malcolm Tredinnick 645029accb Fixed #9100 -- Added a missing CSS class to a submit button.
Thanks, mordyovits and thejaswi_puthraya.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9120 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 05:09:59 +00:00
Malcolm Tredinnick 8524089769 Add internationalisation support to the comment templates. Fixed #8868, #8905
Thanks to zgoda for a patch that did most of the internationalisation part.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9119 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 05:09:21 +00:00
Malcolm Tredinnick 227a93b64f Fixed #8803 -- Allow authenticated users without first_name/last_name values set to post comments.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9118 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 05:07:32 +00:00
Malcolm Tredinnick 16d0a615c4 Fixed #8869 -- Fixed comments templates to be well-formed XHTML.
Based on a patch from zgoda.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9117 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 05:06:26 +00:00
Malcolm Tredinnick 18f13aeeab Fixed #8879 -- Used ungettext instead of ngettext in the comments framework.
Patch from zgoda.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9116 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 05:05:32 +00:00
Malcolm Tredinnick cf34d1f687 Fixed #9141 -- Removed two templates from django.contrib.comments that were not being used.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9115 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-05 05:04:56 +00:00
James Bennett 788e6c081b Use correct m2m join table name in LatestCommentsFeed
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9089 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-28 02:55:56 +00:00
James Bennett cc72e64e19 Fixed #9203: Restore correct ordering for LatestCommentsFeed
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9088 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-28 02:50:09 +00:00
Adrian Holovaty 8ec8e1a5e8 Fixed #8870 -- Changed django.contrib.comments templates to use lowercase 'post' for <form method> attributes, to be consistent with our other templates. Thanks, zgoda
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9050 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-16 06:15:26 +00:00
Wilson Miner b79cb53d76 Fixed #8917 -- Comments are now displayed in reverse order by submit_date in the admin. Thanks to arien for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9038 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-16 00:25:21 +00:00
Adrian Holovaty 5cc93500e8 Fixed #8959 -- Removed redundant calls to the 'escape' template filter in the django.contrib.comments templates. Thanks, zgoda
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9000 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-10 05:14:59 +00:00
Malcolm Tredinnick 96a417f91d Fixed two XHTML errors pointed out by Jarek Zgoda. Refs #8855.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8958 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-03 22:46:39 +00:00
Malcolm Tredinnick e1f1bda3c7 Fixed #8614 -- Typo fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8933 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-03 18:44:19 +00:00
Malcolm Tredinnick 63c9b7bf06 Avoid a deprecation warning when running on Python 2.6. Patch from Karen Tracey.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8841 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 03:04:28 +00:00
Malcolm Tredinnick cf7a078774 Added a related name to the ForeignKey in the abstract base class of the
comment models. You'll never need to use this name, but it will lead to invalid
models if not present.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01 17:56:22 +00:00
Jacob Kaplan-Moss a3196dac48 Make sure to use force_unicode when looking up comment objects by `object_pk`. Fixes #8762, and one other bug that nobody's reported yet.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8800 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01 17:23:09 +00:00
Jacob Kaplan-Moss ae72e25b35 Fixed #8716: correctly handle name and email in comments from authenticated users.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8751 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-30 21:30:02 +00:00
Jacob Kaplan-Moss 7b65302567 Fixed #8608: corrected doc link in comment 400 error page.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8677 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28 19:46:33 +00:00
Malcolm Tredinnick 65c0846c45 Updated a few save() methods on models to accept force_insert and force_update
parameters. Required as a consequence of [8670] (so they can be used with
create()).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8673 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28 19:28:17 +00:00
Jacob Kaplan-Moss 08024e9503 Fixed #8601: a small typo in comment views.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8642 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 22:55:10 +00:00
Jacob Kaplan-Moss 1106c558b1 Fixed #8544: correctly cast `Comment.object_pk` to string when doing lookups. This really only papers over a bigger problem related to casting the RHS of GFKs, but that larger change can wait for a more systematic fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8641 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 22:51:24 +00:00
Gary Wilson Jr c2ba59fc1d Removed oldforms, validators, and related code:
* Removed `Manipulator`, `AutomaticManipulator`, and related classes.
 * Removed oldforms specific bits from model fields:
   * Removed `validator_list` and `core` arguments from constructors.
   * Removed the methods:
     * `get_manipulator_field_names`
     * `get_manipulator_field_objs`
     * `get_manipulator_fields`
     * `get_manipulator_new_data`
     * `prepare_field_objs_and_params`
     * `get_follow`
   * Renamed `flatten_data` method to `value_to_string` for better alignment with its use by the serialization framework, which was the only remaining code using `flatten_data`.
 * Removed oldforms methods from `django.db.models.Options` class: `get_followed_related_objects`, `get_data_holders`, `get_follow`, and `has_field_type`.
 * Removed oldforms-admin specific options from `django.db.models.fields.related` classes: `num_in_admin`, `min_num_in_admin`, `max_num_in_admin`, `num_extra_on_change`, and `edit_inline`.
 * Serialization framework
   * `Serializer.get_string_value` now calls the model fields' renamed `value_to_string` methods.
   * Removed a special-casing of `models.DateTimeField` in `core.serializers.base.Serializer.get_string_value` that's handled by `django.db.models.fields.DateTimeField.value_to_string`.
 * Removed `django.core.validators`:
   * Moved `ValidationError` exception to `django.core.exceptions`.
   * For the couple places that were using validators, brought over the necessary code to maintain the same functionality.
 * Introduced a SlugField form field for validation and to compliment the SlugField model field (refs #8040).
 * Removed an oldforms-style model creation hack (refs #2160).

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8616 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 07:19:44 +00:00
Malcolm Tredinnick c305471610 Fixed get_absolute_url() for comments. Previously, it relied on "view on site"
for admin being reversible or required people to set up their own version. Now
we ship a default pattern in the comments URLs in a way that is unlikely to
clash with anything else.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8614 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 07:04:58 +00:00
Jacob Kaplan-Moss 378f5ddb5a Updated comment signals to provide enough information to actually act on. This was uncovered when working on the documentation, which'll be committed shortly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8589 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 18:53:52 +00:00
Malcolm Tredinnick ccb37ce74c The comments app was unconditionally accessing various settings that didn't
exist in Django's global settings. Changed those accesses to conditional
lookups with default fallbacks.

The comment_test tests now pass without needing to add any extra settings.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8573 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 06:58:43 +00:00
Jacob Kaplan-Moss cba91997a2 Refactored Django's comment system.
Much of this work was done by Thejaswi Puthraya as part of Google's Summer of Code project; much thanks to him for the work, and to them for the program.

This is a backwards-incompatible change; see the upgrading guide in docs/ref/contrib/comments/upgrade.txt for instructions if you were using the old comments system.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8557 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 22:14:22 +00:00
Gary Wilson Jr c85c8f8891 Fixed #7919 -- md5 and sha modules are deprecated since Python 2.5, use hashlib module when available. Patch from Karen Tracey.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-02 05:56:57 +00:00
Brian Rosner a19ed8aea3 Merged the newforms-admin branch into trunk.
This is a backward incompatible change. The admin contrib app has been
refactored. The newforms module has several improvements including FormSets
and Media definitions.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 23:54:34 +00:00
Gary Wilson Jr 2e43934aed Fixed #6324 -- Fixed `get()` call in `UserFlagManager.flag()`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7039 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-28 05:29:09 +00:00
Gary Wilson Jr 332e68d550 Style fixes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7038 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-28 05:27:39 +00:00
Malcolm Tredinnick c3a867228b Fixed #5909 -- Made the various django.contrib.comment models more robust in
the face of non-ASCII characters by giving them a __unicode__ method and
letting the default __repr__ use that. Patches from prairiedogg and scompt.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6742 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 18:15:31 +00:00
Gary Wilson Jr 409ba6038d Fixed docstring style.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6529 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-19 01:42:21 +00:00
Jacob Kaplan-Moss 2570954a9a Fixed #3453: introduced a new template variable resolution system by Brian Harring (thanks!). The upshot is that variable resolution is about 25% faster, and you should see a measurable performance increase any time you've got long or deeply nested loops.
Variable resolution has changed behind the scenes -- see the note in templates_python.txt -- but template.resolve_variable() still exists. This should be fully backwards-compatible.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6399 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-21 04:00:32 +00:00
Adrian Holovaty 03652c7f2b Fixed #3091 -- django.contrib.comments views now accept extra_context and context_processors arguments. Thanks, Eric Floehr and __hawkeye__
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6236 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 22:36:15 +00:00
Malcolm Tredinnick 9d7dc0c4bf Fixed #4189 -- Fixed crashes in a couple of corner cases in the comments app. Not a perfect fix (see ticket), but it will do as a holdover until the new comments framework is in place.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5848 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-11 10:50:39 +00:00