[Django] #24472: Define internal types explicitly for related fields

29 views
Skip to first unread message

Django

unread,
Mar 11, 2015, 5:44:43 AM3/11/15
to django-...@googlegroups.com
#24472: Define internal types explicitly for related fields
----------------------------------------------+----------------------
Reporter: coldmind | Owner: coldmind
Type: New feature | Status: new
Component: Database layer (models, ORM) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+----------------------
For related fields internal type is not defined explicitly.
For example, if I want to inherit these fields to add some minor changes,
I will need to define internal type manually, because some of backend code
is related on internal type of the field.

Old pull request - https://github.com/django/django/pull/4002

We discussed here that is a good idea to have this feature in 1.9

--
Ticket URL: <https://code.djangoproject.com/ticket/24472>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Mar 11, 2015, 6:02:16 AM3/11/15
to django-...@googlegroups.com
#24472: Define internal types explicitly for related fields
-------------------------------------+-------------------------------------

Reporter: coldmind | Owner: coldmind
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by coldmind):

* needs_better_patch: => 0
* has_patch: 0 => 1
* needs_tests: => 0
* needs_docs: => 0


Comment:

https://github.com/django/django/pull/4296

--
Ticket URL: <https://code.djangoproject.com/ticket/24472#comment:1>

Django

unread,
Mar 11, 2015, 8:03:48 AM3/11/15
to django-...@googlegroups.com
#24472: Define internal types explicitly for related fields
-------------------------------------+-------------------------------------

Reporter: coldmind | Owner: coldmind
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by timgraham):

I didn't understand the need to add this. Probably some tests are needed
to show the use cases.

--
Ticket URL: <https://code.djangoproject.com/ticket/24472#comment:2>

Django

unread,
Mar 14, 2015, 2:04:21 PM3/14/15
to django-...@googlegroups.com
#24472: Define internal types explicitly for related fields
-------------------------------------+-------------------------------------

Reporter: coldmind | Owner: coldmind
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by coldmind):

@timgraham, well, it was more suitable for 1.7.x, where we had many places
with internal type checks.
At a quick glance in master I found this
https://github.com/django/django/blob/a52cd407b86a51e1badf6771e590361e24fd7155/django/db/backends/mysql/schema.py#L61
There may be also places, where are similar checks.
The main goal to give ability for users to not set internal types manually
if they need to override one of related fields and give some minor
changes.

--
Ticket URL: <https://code.djangoproject.com/ticket/24472#comment:3>

Django

unread,
Mar 19, 2015, 1:33:12 PM3/19/15
to django-...@googlegroups.com
#24472: Define internal types explicitly for related fields
-------------------------------------+-------------------------------------

Reporter: coldmind | Owner: coldmind
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* needs_tests: 0 => 1
* stage: Unreviewed => Accepted


Comment:

I guess this is consistent with the other built-in fields. Could you add
regression tests?

--
Ticket URL: <https://code.djangoproject.com/ticket/24472#comment:4>

Django

unread,
Feb 9, 2021, 7:05:10 AM2/9/21
to django-...@googlegroups.com
#24472: Define internal types explicitly for related fields
-------------------------------------+-------------------------------------
Reporter: Andriy Sokolovskiy | Owner: Andriy
| Sokolovskiy
Type: New feature | Status: assigned

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/24472#comment:5>

Django

unread,
Feb 9, 2021, 7:05:16 AM2/9/21
to django-...@googlegroups.com
#24472: Define internal types explicitly for related fields
-------------------------------------+-------------------------------------
Reporter: Andriy Sokolovskiy | Owner: (none)

Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* owner: Andriy Sokolovskiy => (none)
* status: assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/24472#comment:6>

Django

unread,
Jun 8, 2023, 10:36:21 AM6/8/23
to django-...@googlegroups.com
#24472: Define internal types explicitly for related fields
-------------------------------------+-------------------------------------
Reporter: Andriy Sokolovskiy | Owner: Akash
| Kumar Sen

Type: New feature | Status: assigned
Component: Database layer | Version: dev

(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Akash Kumar Sen):

* owner: (none) => Akash Kumar Sen


* status: new => assigned

* needs_tests: 1 => 0


Comment:

[https://github.com/django/django/pull/16960 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/24472#comment:7>

Django

unread,
Jun 9, 2023, 12:53:06 AM6/9/23
to django-...@googlegroups.com
#24472: Define internal types explicitly for related fields
-------------------------------------+-------------------------------------
Reporter: Andriy Sokolovskiy | Owner: Akash
| Kumar Sen
Type: New feature | Status: closed

Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: assigned => closed
* resolution: => wontfix
* stage: Accepted => Unreviewed


Comment:

I don't see a real use case for adding this. Moreover, others do not seem
too convinced either and it can cause issue for custom subclasses of
related fields. As far as I'm aware, it's not worth changing this long-
standing behavior and potential hiccups.

--
Ticket URL: <https://code.djangoproject.com/ticket/24472#comment:8>

Reply all
Reply to author
Forward
0 new messages