Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

No formal way to customise error pages #5

Open
rt121212121 opened this issue Jul 17, 2020 · 5 comments · May be fixed by #6
Open

No formal way to customise error pages #5

rt121212121 opened this issue Jul 17, 2020 · 5 comments · May be fixed by #6
Assignees
Labels
enhancement New feature or request

Comments

@rt121212121
Copy link

At the moment entering a non-routed path, shows the path on a displayed page. It would be good if there was routing for errors, allowing styling of the error page like any other page but with the error status code.

@rt121212121
Copy link
Author

This is the display of errors atm. Including 404 as mentioned above.
https://github.com/trollfot/trinket/blob/master/src/trinket/http.py#L30

@trollfot
Copy link
Owner

Thank you for the report. I'll try to find a way to make them easily customizable.

@trollfot trollfot self-assigned this Jul 23, 2020
@trollfot trollfot added the enhancement New feature or request label Jul 23, 2020
@rt121212121
Copy link
Author

BTW, enjoying using it, it is very simple and easy to understand.

@trollfot
Copy link
Owner

Thank you, let me know if there are bugs or other improvements you'd like to see. In the meantime, I created a branch with a first attempt/proposal for that customizable error.

#6

Let me know if that covers your needs

@trollfot trollfot linked a pull request Jul 24, 2020 that will close this issue
@rt121212121
Copy link
Author

I'm on the fence about this. One of the things about trinket is that it is very easy to understand, the more hand-holding changes that are made it slowly becomes larger and larger.

If the solution to this is to subclass the Trinket class, then I think it is perfectly fine to expect me to subclass Trinket and override lookup and catch and specialise the exceptions myself. I'd vote close the issue and do not apply the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants