diff --git a/tildes/tildes/routes.py b/tildes/tildes/routes.py index 0179dac..45e5609 100644 --- a/tildes/tildes/routes.py +++ b/tildes/tildes/routes.py @@ -37,6 +37,7 @@ def includeme(config: Configurator) -> None: config.add_route("group_topics", "/topics", factory=group_by_path) config.add_route("topic", "/{topic_id36}/{title}", factory=topic_by_id36) + config.add_route("topic_no_title", "/{topic_id36}", factory=topic_by_id36) config.add_route("user", "/user/{username}", factory=user_by_username) with config.route_prefix_context("/user/{username}"): diff --git a/tildes/tildes/views/topic.py b/tildes/tildes/views/topic.py index c67fcfa..856b2b3 100644 --- a/tildes/tildes/views/topic.py +++ b/tildes/tildes/views/topic.py @@ -255,6 +255,7 @@ def get_new_topic_form(request: Request) -> dict: @view_config(route_name="topic", renderer="topic.jinja2") +@view_config(route_name="topic_no_title", renderer="topic.jinja2") @use_kwargs({"comment_order": Enum(CommentTreeSortOption, missing="relevance")}) def get_topic(request: Request, comment_order: CommentTreeSortOption) -> dict: """View a single topic."""