[Django] #22015: Hide relationships with related_name='+'

18 views
Skip to first unread message

Django

unread,
Feb 11, 2014, 12:38:54 PM2/11/14
to django-...@googlegroups.com
#22015: Hide relationships with related_name='+'
-----------------------------------+--------------------
Reporter: motiejus | Owner: nobody
Type: Bug | Status: new
Component: contrib.admindocs | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 1 | UI/UX: 1
-----------------------------------+--------------------
If related_name of a ForeignKey/M2M relationship is '+', user explicitly
asked Django to '''not''' create backwards relation. This should be taken
into account when rendering admindocs.

Pull request: https://github.com/django/django/pull/2263

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

Django

unread,
Feb 11, 2014, 1:46:32 PM2/11/14
to django-...@googlegroups.com
#22015: Hide relationships with related_name='+'
-----------------------------------+------------------------------------

Reporter: motiejus | Owner: nobody
Type: Bug | Status: new
Component: contrib.admindocs | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 1
-----------------------------------+------------------------------------
Changes (by timo):

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


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

Django

unread,
Feb 12, 2014, 7:09:17 AM2/12/14
to django-...@googlegroups.com
#22015: Hide relationships with related_name='+' in contrib.admindocs
-----------------------------------+------------------------------------

Reporter: motiejus | Owner: nobody
Type: Bug | Status: new
Component: contrib.admindocs | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-----------------------------------+------------------------------------

Comment (by timo):

As noted on the PR, admindocs is severely lacking in tests and
bootstrapping them enough to be able to write a test for this change is
more work than the reporter wants to do. If anyone else is interested in
this patch, the first step will be to do that.

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

Django

unread,
Feb 13, 2014, 3:06:38 AM2/13/14
to django-...@googlegroups.com
#22015: Hide relationships with related_name='+' in contrib.admindocs
-----------------------------------+------------------------------------

Reporter: motiejus | Owner: nobody
Type: Bug | Status: new
Component: contrib.admindocs | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-----------------------------------+------------------------------------

Comment (by claudep):

Note that there are also tests in `tests/admin_docs`, notably
`admin_docs.tests.AdminDocViewTests.test_model_detail`. We'd need a new
`models.py`, though.

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

Django

unread,
Feb 22, 2014, 5:41:05 PM2/22/14
to django-...@googlegroups.com
#22015: Hide relationships with related_name='+' in contrib.admindocs
-----------------------------------+---------------------------------------
Reporter: motiejus | Owner: gregchapple
Type: Bug | Status: assigned
Component: contrib.admindocs | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-----------------------------------+---------------------------------------
Changes (by gregchapple):

* owner: nobody => gregchapple
* status: new => assigned


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

Django

unread,
Feb 23, 2014, 11:40:39 AM2/23/14
to django-...@googlegroups.com
#22015: Hide relationships with related_name='+' in contrib.admindocs
-----------------------------------+---------------------------------------
Reporter: motiejus | Owner: gregchapple
Type: Bug | Status: assigned
Component: contrib.admindocs | Version: master
Severity: Normal | Resolution:
Keywords: nlsprint14 | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-----------------------------------+---------------------------------------
Changes (by gregchapple):

* keywords: => nlsprint14


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

Django

unread,
Feb 23, 2014, 2:09:01 PM2/23/14
to django-...@googlegroups.com
#22015: Hide relationships with related_name='+' in contrib.admindocs
-----------------------------------+---------------------------------------
Reporter: motiejus | Owner: gregchapple
Type: Bug | Status: assigned
Component: contrib.admindocs | Version: master

Severity: Normal | Resolution:
Keywords: nlsprint14 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-----------------------------------+---------------------------------------

Comment (by gregchapple):

Added tests which cover `django.contrib.admindocs.views.ModelDetailView`
which was seriously lacking in test coverage. This is part of ticket
#22015, though the original issue for which the ticket was opened, seems
to be already working as expected, with and without this patch. Though
this patch does contain a test which covers the issue raised in the
ticket, and should catch it in the future should it re-arise.

Pull request: https://github.com/django/django/pull/2364

I will do some further investigation into the original issue, and update
again with my findings.

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

Django

unread,
Feb 23, 2014, 3:37:18 PM2/23/14
to django-...@googlegroups.com
#22015: Hide relationships with related_name='+' in contrib.admindocs
-----------------------------------+---------------------------------------
Reporter: motiejus | Owner: gregchapple
Type: Bug | Status: assigned
Component: contrib.admindocs | Version: master

Severity: Normal | Resolution:
Keywords: nlsprint14 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-----------------------------------+---------------------------------------

Comment (by Baptiste Mispelon <bmispelon@…>):

In [changeset:"b1d10205ce0c4bb355e20bed6258b5264ed06cc5"]:
{{{
#!CommitTicketReference repository=""
revision="b1d10205ce0c4bb355e20bed6258b5264ed06cc5"
Added tests for django.contrib.admindocs

Refs #22015
}}}

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

Django

unread,
Feb 23, 2014, 3:39:33 PM2/23/14
to django-...@googlegroups.com
#22015: Hide relationships with related_name='+' in contrib.admindocs
-----------------------------------+---------------------------------------
Reporter: motiejus | Owner: gregchapple
Type: Bug | Status: closed
Component: contrib.admindocs | Version: master
Severity: Normal | Resolution: worksforme

Keywords: nlsprint14 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-----------------------------------+---------------------------------------
Changes (by bmispelon):

* status: assigned => closed
* resolution: => worksforme


Comment:

As mentionned by gregchapple, this appears to have already been fixed so
I'll close this ticket as `worksforme`.

Please reopen if you can provided steps that reproduce your issue.

Thanks.

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

Reply all
Reply to author
Forward
0 new messages