mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
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
This commit is contained in:
@@ -23,13 +23,13 @@ class Target(models.Model):
|
||||
clash1_set = models.CharField(max_length=10)
|
||||
|
||||
class Clash1(models.Model):
|
||||
src_safe = models.CharField(max_length=10, core=True)
|
||||
src_safe = models.CharField(max_length=10)
|
||||
|
||||
foreign = models.ForeignKey(Target)
|
||||
m2m = models.ManyToManyField(Target)
|
||||
|
||||
class Clash2(models.Model):
|
||||
src_safe = models.CharField(max_length=10, core=True)
|
||||
src_safe = models.CharField(max_length=10)
|
||||
|
||||
foreign_1 = models.ForeignKey(Target, related_name='id')
|
||||
foreign_2 = models.ForeignKey(Target, related_name='src_safe')
|
||||
@@ -46,7 +46,7 @@ class Target2(models.Model):
|
||||
clashm2m_set = models.ManyToManyField(Target)
|
||||
|
||||
class Clash3(models.Model):
|
||||
src_safe = models.CharField(max_length=10, core=True)
|
||||
src_safe = models.CharField(max_length=10)
|
||||
|
||||
foreign_1 = models.ForeignKey(Target2, related_name='foreign_tgt')
|
||||
foreign_2 = models.ForeignKey(Target2, related_name='m2m_tgt')
|
||||
@@ -61,7 +61,7 @@ class ClashM2M(models.Model):
|
||||
m2m = models.ManyToManyField(Target2)
|
||||
|
||||
class SelfClashForeign(models.Model):
|
||||
src_safe = models.CharField(max_length=10, core=True)
|
||||
src_safe = models.CharField(max_length=10)
|
||||
selfclashforeign = models.CharField(max_length=10)
|
||||
|
||||
selfclashforeign_set = models.ForeignKey("SelfClashForeign")
|
||||
|
||||
Reference in New Issue
Block a user