Commit Graph

15 Commits

Author SHA1 Message Date
Aymeric Augustin d4a0b27838 [py3] Refactored __unicode__ to __str__.
* Renamed the __unicode__ methods
* Applied the python_2_unicode_compatible decorator
* Removed the StrAndUnicode mix-in that is superseded by
  python_2_unicode_compatible
* Kept the __unicode__ methods in classes that specifically
  test it under Python 2
2012-08-12 14:44:40 +02:00
Claude Paroz 4a103086d5 Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
2012-06-07 18:08:47 +02: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
Gary Wilson Jr 00bebaf0d1 Refs #7742 -- newforms-admin does not use oldforms `validator_list` argument, made a custom `FlatPageForm` to check the entered URL.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8292 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 04:28:33 +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
Malcolm Tredinnick 4b93eed185 Fixed #4081 -- Allow empty content in flatpages.
Patch from ctrochalakis and Matt Croydon.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7807 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-30 13:05:47 +00:00
Adrian Holovaty cc64abfc1d Fixed #7329 -- Added list_display Admin options to FlatPage and Redirect models. Also changed list_filter for FlatPage. Thanks for the patch, benspaulding
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7651 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-16 03:47:38 +00:00
Gary Wilson Jr 3a662052ec Django code styling fixes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7382 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-29 16:42:39 +00:00
Gary Wilson Jr 0c222b9533 Fixed #6879 -- Made string in `contrib.flatpages` translatable, thanks ctrochalakis.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7381 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-29 15:54:43 +00:00
Gary Wilson Jr 212ee65be7 Fixed #2101 -- Renamed `maxlength` argument to `max_length` for oldforms `FormField`s and db model `Field`s. This is fully backwards compatible at the moment since the legacy `maxlength` argument is still supported. Using `maxlength` will, however, issue a `PendingDeprecationWarning` when used.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-05 05:14:46 +00:00
Malcolm Tredinnick 953badbea5 Merged Unicode branch into trunk (r4952:5608). This should be fully
backwards compatible for all practical purposes.

Fixed #2391, #2489, #2996, #3322, #3344, #3370, #3406, #3432, #3454, #3492, #3582, #3690, #3878, #3891, #3937, #4039, #4141, #4227, #4286, #4291, #4300, #4452, #4702


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-04 12:11:04 +00:00
Russell Keith-Magee aebd5f94a2 Fixed #3845 -- Added index to URL attribute of flatpages model.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4849 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-29 11:46:26 +00:00
Adrian Holovaty 9a588aa4b4 Fixed #2317 -- Fixed help_text for FlatPage.template_name field to match magic-removal template names. Thanks, md@hudora.de
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3304 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-09 22:35:08 +00:00
Adrian Holovaty 412db6c929 Fixed #1837 -- Gave FlatPage a str
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2894 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-11 14:38:27 +00:00
Adrian Holovaty f69cf70ed8 MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02 01:31:56 +00:00