Skip to content
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

admin, demo: Use trailing slashes for user-facing pages #900

Merged
merged 5 commits into from
Jun 5, 2022

Conversation

ix5
Copy link
Member

@ix5 ix5 commented Jun 5, 2022

Checklist

  • All new and existing tests are passing
  • (If adding features:) I have added tests to cover my changes
  • (If docs changes needed:) I have updated the documentation accordingly.
  • I have added an entry to CHANGES.rst because this is a user-facing change or an important bugfix
  • I have written proper commit message(s)

What changes does this Pull Request introduce?

views: comments: Use /demo/, not /demo as endpoint

And also clean up URL to not contain index.html

Also: apidoc: Archive 0.12.6 /demo endpoint, bump apiVersion

views: Use trailing slashes for user-facing admin URLs

/admin -> /admin/
/#  -> /#/

Since any non-API page can reasonably be expected to end in a trailing slash by visitors (it is a path, not a file), set the trailing slash version as canonical.

This has another positive side-effect:
Visiting isso.dev/admin (without trailing slash) will redirect to /admin/ automatically, thus obviating issues like #489 1. Any Javascript or CSS files are not affected as they are served throught the SharedDataMiddleware in `init.py`` anyway.

Why is this necessary?

Was quite confusing to visit /admin/ and be hit with a 404.

Footnotes

  1. https://github.com/posativ/isso/issues/498

ix5 added 4 commits June 5, 2022 20:03
And also clean up URL to not contain `index.html`
```
/admin -> /admin/
/#  -> /#/
```

Since any non-API page can reasonably be expected to end in
a trailing slash by visitors (it is a path, not a file),
set the trailing slash version as canonical.

This has another positive side-effect:
Visiting `isso.dev/admin` (without trailing slash) will
redirect to `/admin/` automatically, thus obviating issues
like isso-comments#489 [^1]. Any Javascript or CSS files are not affected
as they are served throught the `SharedDataMiddleware` in
`__init__.py`` anyway.

[^1]: isso-comments#498
@ix5 ix5 added server (Python) server code improvement Not a new feature, but makes Isso more pleasant to use labels Jun 5, 2022
@ix5 ix5 added this to the 0.13 milestone Jun 5, 2022
@ix5 ix5 merged commit d098ab3 into isso-comments:master Jun 5, 2022
@ix5 ix5 deleted the demo-admin-clean-urls branch June 5, 2022 18:15
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
improvement Not a new feature, but makes Isso more pleasant to use server (Python) server code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant