Removed contrib.contenttypes.generic per deprecation timeline; refs #19774.
This commit is contained in:
parent
d029fafea1
commit
3b89d2d540
|
@ -1,21 +0,0 @@
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
import warnings
|
|
||||||
|
|
||||||
from django.utils.deprecation import RemovedInDjango19Warning
|
|
||||||
|
|
||||||
warnings.warn(
|
|
||||||
('django.contrib.contenttypes.generic is deprecated and will be removed in '
|
|
||||||
'Django 1.9. Its contents have been moved to the fields, forms, and admin '
|
|
||||||
'submodules of django.contrib.contenttypes.'), RemovedInDjango19Warning, stacklevel=2
|
|
||||||
)
|
|
||||||
|
|
||||||
from django.contrib.contenttypes.admin import ( # NOQA
|
|
||||||
GenericInlineModelAdmin, GenericStackedInline, GenericTabularInline
|
|
||||||
)
|
|
||||||
from django.contrib.contenttypes.fields import ( # NOQA
|
|
||||||
GenericForeignKey, GenericRelation
|
|
||||||
)
|
|
||||||
from django.contrib.contenttypes.forms import ( # NOQA
|
|
||||||
BaseGenericInlineFormSet, generic_inlineformset_factory
|
|
||||||
)
|
|
|
@ -299,11 +299,6 @@ model:
|
||||||
is ``True``. This mirrors the ``for_concrete_model`` argument to
|
is ``True``. This mirrors the ``for_concrete_model`` argument to
|
||||||
:meth:`~django.contrib.contenttypes.models.ContentTypeManager.get_for_model`.
|
:meth:`~django.contrib.contenttypes.models.ContentTypeManager.get_for_model`.
|
||||||
|
|
||||||
.. versionchanged:: 1.7
|
|
||||||
|
|
||||||
This class used to be defined in ``django.contrib.contenttypes.generic``.
|
|
||||||
|
|
||||||
|
|
||||||
.. admonition:: Primary key type compatibility
|
.. admonition:: Primary key type compatibility
|
||||||
|
|
||||||
The "object_id" field doesn't have to be the same type as the
|
The "object_id" field doesn't have to be the same type as the
|
||||||
|
@ -369,10 +364,6 @@ Reverse generic relations
|
||||||
|
|
||||||
.. class:: GenericRelation
|
.. class:: GenericRelation
|
||||||
|
|
||||||
.. versionchanged:: 1.7
|
|
||||||
|
|
||||||
This class used to be defined in ``django.contrib.contenttypes.generic``.
|
|
||||||
|
|
||||||
.. attribute:: related_query_name
|
.. attribute:: related_query_name
|
||||||
|
|
||||||
.. versionadded:: 1.7
|
.. versionadded:: 1.7
|
||||||
|
@ -496,10 +487,6 @@ The :mod:`django.contrib.contenttypes.forms` module provides:
|
||||||
|
|
||||||
.. class:: BaseGenericInlineFormSet
|
.. class:: BaseGenericInlineFormSet
|
||||||
|
|
||||||
.. versionchanged:: 1.7
|
|
||||||
|
|
||||||
This class used to be defined in ``django.contrib.contenttypes.generic``.
|
|
||||||
|
|
||||||
.. function:: generic_inlineformset_factory(model, form=ModelForm, formset=BaseGenericInlineFormSet, ct_field="content_type", fk_field="object_id", fields=None, exclude=None, extra=3, can_order=False, can_delete=True, max_num=None, formfield_callback=None, validate_max=False, for_concrete_model=True, min_num=None, validate_min=False)
|
.. function:: generic_inlineformset_factory(model, form=ModelForm, formset=BaseGenericInlineFormSet, ct_field="content_type", fk_field="object_id", fields=None, exclude=None, extra=3, can_order=False, can_delete=True, max_num=None, formfield_callback=None, validate_max=False, for_concrete_model=True, min_num=None, validate_min=False)
|
||||||
|
|
||||||
Returns a ``GenericInlineFormSet`` using
|
Returns a ``GenericInlineFormSet`` using
|
||||||
|
@ -515,10 +502,6 @@ The :mod:`django.contrib.contenttypes.forms` module provides:
|
||||||
:class:`~django.contrib.contenttypes.fields.GenericForeignKey.for_concrete_model`
|
:class:`~django.contrib.contenttypes.fields.GenericForeignKey.for_concrete_model`
|
||||||
argument on ``GenericForeignKey``.
|
argument on ``GenericForeignKey``.
|
||||||
|
|
||||||
.. versionchanged:: 1.7
|
|
||||||
|
|
||||||
This function used to be defined in ``django.contrib.contenttypes.generic``.
|
|
||||||
|
|
||||||
.. versionchanged:: 1.7
|
.. versionchanged:: 1.7
|
||||||
|
|
||||||
``min_num`` and ``validate_min`` were added.
|
``min_num`` and ``validate_min`` were added.
|
||||||
|
@ -557,16 +540,8 @@ information.
|
||||||
The name of the integer field that represents the ID of the related
|
The name of the integer field that represents the ID of the related
|
||||||
object. Defaults to ``object_id``.
|
object. Defaults to ``object_id``.
|
||||||
|
|
||||||
.. versionchanged:: 1.7
|
|
||||||
|
|
||||||
This class used to be defined in ``django.contrib.contenttypes.generic``.
|
|
||||||
|
|
||||||
.. class:: GenericTabularInline
|
.. class:: GenericTabularInline
|
||||||
.. class:: GenericStackedInline
|
.. class:: GenericStackedInline
|
||||||
|
|
||||||
Subclasses of :class:`GenericInlineModelAdmin` with stacked and tabular
|
Subclasses of :class:`GenericInlineModelAdmin` with stacked and tabular
|
||||||
layouts, respectively.
|
layouts, respectively.
|
||||||
|
|
||||||
.. versionchanged:: 1.7
|
|
||||||
|
|
||||||
These classes used to be defined in ``django.contrib.contenttypes.generic``.
|
|
||||||
|
|
Loading…
Reference in New Issue