Project

Profile

Help

Story #3987

Make the relative 'href' in browsable API clickable

Added by dkliban@redhat.com over 1 year ago. Updated 6 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 43

Description

DRF browsable API relies on a Django filter[0,1] to find links that start with http and https and put them inside an anchor tag.

A new django filter needs to be created, registered, and used with the template[2] that is used for the browsable API.

The filter needs to look for relative href that start with '/pulp/api/v3' and wrap them in an anchor tag.

[0] https://github.com/django/django/blob/master/django/template/defaultfilters.py#L326
[1] https://github.com/django/django/blob/master/django/utils/html.py#L238
[2] https://github.com/pulp/pulp/blob/master/pulpcore/pulpcore/app/templates/rest_framework/api.html

Associated revisions

Revision c292f193 View on GitHub
Added by dkliban@redhat.com over 1 year ago

Problem: href values in browsable API are not clickable

Solution: add a filter that makes links out of href values

This patch adds a copy of the rest_framework api template to this repository. This was necesary in order to use the new custom "urlize_quoted_links" filter. The filter turns any string that starts with '/pulp/api/v3' into a anchor tag with that value.

closes #3987 https://pulp.plan.io/issues/3987

Revision c292f193 View on GitHub
Added by dkliban@redhat.com over 1 year ago

Problem: href values in browsable API are not clickable

Solution: add a filter that makes links out of href values

This patch adds a copy of the rest_framework api template to this repository. This was necesary in order to use the new custom "urlize_quoted_links" filter. The filter turns any string that starts with '/pulp/api/v3' into a anchor tag with that value.

closes #3987 https://pulp.plan.io/issues/3987

History

#1 Updated by dkliban@redhat.com over 1 year ago

  • Description updated (diff)

#2 Updated by dalley over 1 year ago

  • Groomed changed from No to Yes

#3 Updated by dkliban@redhat.com over 1 year ago

  • Sprint set to Sprint 42

#4 Updated by dkliban@redhat.com over 1 year ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dkliban@redhat.com

#5 Updated by dkliban@redhat.com over 1 year ago

  • Status changed from ASSIGNED to POST

#6 Updated by rchan over 1 year ago

  • Sprint changed from Sprint 42 to Sprint 43

#7 Updated by dkliban@redhat.com over 1 year ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#8 Updated by daviddavis about 1 year ago

  • Sprint/Milestone set to 3.0.0

#9 Updated by bmbouter about 1 year ago

  • Tags deleted (Pulp 3, Pulp 3 MVP)

#10 Updated by bmbouter 6 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF