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

Path rule for /template not forwarding to category #188

fluffy-critter opened this issue Apr 3, 2019 · 1 comment


Copy link

commented Apr 3, 2019

Expected Behavior

A URL like should redirect to if foo is a category and not a template

Current Behavior returns a 404 with an error like:

path: /photos
full_path: /photos?
endpoint: category
url_rule: /<template>
Exception information: NotFound: No such view

for example:

@fluffy-critter fluffy-critter added the bug label Apr 3, 2019


This comment has been minimized.

Copy link
Collaborator Author

commented Apr 3, 2019

This seems to be a regression; there is code to handle this already, on (in render_category):

    if not tmpl:
        # this might actually be a malformed category URL
        test_path = '/'.join((category, template))
        record =
            e for e in model.Entry if e.category == test_path).exists()
        if record:
            return redirect(url_for('category', category=test_path, **request.args))

        # nope, we just don't know what this is
        raise http_error.NotFound("No such view")

@fluffy-critter fluffy-critter added this to the 0.4 milestone Apr 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.