#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 <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070185e21de9cc-db9f598f-a75e-4c4d-813f-71cfae676267-000000%40eu-central-1.amazonses.com.

Reply via email to