[Django] #27409: Django Admindocs links generation

17 views
Skip to first unread message

Django

unread,
Oct 31, 2016, 10:41:00 AM10/31/16
to django-...@googlegroups.com
#27409: Django Admindocs links generation
---------------------------------------------+------------------------
Reporter: Kris Avi | Owner: nobody
Type: New feature | Status: new
Component: contrib.admindocs | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------------+------------------------
Referring to:
https://docs.djangoproject.com/en/1.10/ref/contrib/admin/admindocs/

It seems the link generation isn't working as it should.

Let's say you want to generate link to tag "safe", then you have to use
{{{:tag:`built_in-safe`}}} and it will generate link like "built_in-safe",
whereas it may be better, if link text would be only the tag name or
"safe". Same case with filters.

For views you can use generic class based views, in there by naming
conventions can be capital letters. Class based views are classes and not
methods and the naming of the view can be like BlogView or BlogEdit. But
if generating link using the directives according to documentation it will
not work since it will try to find view by name of "blogview" instead of
"BlogView". It will automatically put it to lowercase and may make it not
working.

Also after some experimenting, it seems like
{{{:view:`app_label.view_name`}}} would not work, and have to use full
path like: {{{:view:`app_name.app_label.views.view_name`}}}

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

Django

unread,
Nov 1, 2016, 4:11:01 PM11/1/16
to django-...@googlegroups.com
#27409: Issues with admindocs docstring links generation
-----------------------------------+------------------------------------

Reporter: Kris Avi | Owner: nobody
Type: New feature | Status: new
Component: contrib.admindocs | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

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

* stage: Unreviewed => Accepted


Comment:

For future reference, please limit a ticket to one issue. I thought it
might be possible to workaround the first issue with {{{:tag:`safe
<built_in-safe>`}}} but this doesn't work. Not sure why, but I'll accept
the ticket for further investigation. If someone wants to address either
issue here, we can open a separate ticket for the other one. I didn't
investigate the second one.

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

Django

unread,
Nov 4, 2016, 10:43:53 AM11/4/16
to django-...@googlegroups.com
#27409: Issues with admindocs docstring links generation
-----------------------------------+------------------------------------
Reporter: Kris Avi | Owner: nobody
Type: New feature | Status: new
Component: contrib.admindocs | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------

Comment (by Kris Avi):

For my own environment I made workaround that will disappear with new
django update. It doesn't have any tests written, and I am sure that is
not python way to solve that issue.
https://github.com/krisavi/django/commit/f7ff7d149ec5b8d278414ef7229a97945d371368


But I see it could be a good idea to add optional "link name" parameter
for all of them, upon omiting it, the full location will be used. That
would even work quite well.

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

Django

unread,
Jan 23, 2023, 11:51:32 PM1/23/23
to django-...@googlegroups.com
#27409: Issues with admindocs docstring links generation
-----------------------------------+------------------------------------
Reporter: Kris Avi | Owner: nobody
Type: New feature | Status: new
Component: contrib.admindocs | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Description changed by Mariusz Felisiak:

Old description:

> Referring to:
> https://docs.djangoproject.com/en/1.10/ref/contrib/admin/admindocs/
>
> It seems the link generation isn't working as it should.
>
> Let's say you want to generate link to tag "safe", then you have to use
> {{{:tag:`built_in-safe`}}} and it will generate link like "built_in-
> safe", whereas it may be better, if link text would be only the tag name
> or "safe". Same case with filters.
>
> For views you can use generic class based views, in there by naming
> conventions can be capital letters. Class based views are classes and not
> methods and the naming of the view can be like BlogView or BlogEdit. But
> if generating link using the directives according to documentation it
> will not work since it will try to find view by name of "blogview"
> instead of "BlogView". It will automatically put it to lowercase and may
> make it not working.
>
> Also after some experimenting, it seems like
> {{{:view:`app_label.view_name`}}} would not work, and have to use full
> path like: {{{:view:`app_name.app_label.views.view_name`}}}

New description:

Referring to:
https://docs.djangoproject.com/en/1.10/ref/contrib/admin/admindocs/

It seems the link generation isn't working as it should.

Let's say you want to generate link to tag "safe", then you have to use
{{{:tag:`built_in-safe`}}} and it will generate link like "built_in-safe",
whereas it may be better, if link text would be only the tag name or
"safe". Same case with filters.

~~For views you can use generic class based views, in there by naming


conventions can be capital letters. Class based views are classes and not
methods and the naming of the view can be like BlogView or BlogEdit. But
if generating link using the directives according to documentation it will
not work since it will try to find view by name of "blogview" instead of
"BlogView". It will automatically put it to lowercase and may make it not

working. ~~ (Moved to the separate ticket, see #34286).

Also after some experimenting, it seems like
{{{:view:`app_label.view_name`}}} would not work, and have to use full
path like: {{{:view:`app_name.app_label.views.view_name`}}}

--

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

Django

unread,
Oct 28, 2024, 5:31:09 AM10/28/24
to django-...@googlegroups.com
#27409: Issues with admindocs docstring links generation
-----------------------------------+------------------------------------
Reporter: Kris Avi | Owner: nobody
Type: New feature | Status: new
Component: contrib.admindocs | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Comment (by Sarah Boyce):

#35867 is related
--
Ticket URL: <https://code.djangoproject.com/ticket/27409#comment:4>

Django

unread,
Nov 1, 2024, 1:33:42 AM11/1/24
to django-...@googlegroups.com
#27409: Issues with admindocs docstring links generation
-------------------------------------+-------------------------------------
Reporter: Kris Avi | Owner: SAI
| GANESH S
Type: New feature | Status: assigned
Component: contrib.admindocs | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by SAI GANESH S):

* cc: SAI GANESH S (added)
* owner: nobody => SAI GANESH S
* status: new => assigned

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

Django

unread,
Nov 3, 2024, 1:22:08 PM11/3/24
to django-...@googlegroups.com
#27409: Issues with admindocs docstring links generation
-------------------------------------+-------------------------------------
Reporter: Kris Avi | Owner: SAI
| GANESH S
Type: New feature | Status: assigned
Component: contrib.admindocs | Version: 1.10
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 SAI GANESH S):

* has_patch: 0 => 1

Comment:

https://github.com/django/django/pull/18759
--
Ticket URL: <https://code.djangoproject.com/ticket/27409#comment:6>

Django

unread,
Nov 4, 2024, 7:22:13 AM11/4/24
to django-...@googlegroups.com
#27409: Issues with admindocs docstring links generation
-------------------------------------+-------------------------------------
Reporter: Kris Avi | Owner: SAI
| GANESH S
Type: New feature | Status: assigned
Component: contrib.admindocs | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* needs_better_patch: 0 => 1

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

Django

unread,
Nov 6, 2024, 5:54:30 AM11/6/24
to django-...@googlegroups.com
#27409: Issues with admindocs docstring links generation
-------------------------------------+-------------------------------------
Reporter: Kris Avi | Owner: SAI
| GANESH S
Type: New feature | Status: assigned
Component: contrib.admindocs | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin

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

Django

unread,
Nov 6, 2024, 8:39:30 AM11/6/24
to django-...@googlegroups.com
#27409: Issues with admindocs docstring links generation
-------------------------------------+-------------------------------------
Reporter: Kris Avi | Owner: SAI
| GANESH S
Type: New feature | Status: closed
Component: contrib.admindocs | Version: 1.10
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce <42296566+sarahboyce@…>):

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

Comment:

In [changeset:"c2c544cf01107da158cb8c0c539555eafa0628db" c2c544c]:
{{{#!CommitTicketReference repository=""
revision="c2c544cf01107da158cb8c0c539555eafa0628db"
Fixed #27409 -- Made admindocs support custom link text in docstrings.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27409#comment:9>
Reply all
Reply to author
Forward
0 new messages