Skip to content

Break long headers on the browsable API #777

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 4 commits into from
Apr 4, 2013
Merged

Conversation

glic3rinu
Copy link

The Link header, when used, usually gets very long and its ugly to have it rendered in a single line on the browsable API.

I've added a simple templatetag that breaks long headers in multiple lines, when possible (comma separated).

you can see its usefulness in here:
http://devel.controller.confine-project.eu/api/

Breaks headers longer than 160 characters (~page length)
when possible (are comma separated)
"""
if len(header) > 160:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add and ',' in header?

@tomchristie
Copy link
Member

Seems good to me, could you also add a line to the release notes.

@glic3rinu
Copy link
Author

Good catch Tom!
pull req updated with your suggestions.

thanks!

tomchristie added a commit that referenced this pull request Apr 4, 2013
Break long headers on the browsable API
@tomchristie tomchristie merged commit 5b56639 into encode:master Apr 4, 2013
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants