|
|
@ -397,12 +397,27 @@ def get_search( |
|
|
|
@view_config( |
|
|
|
route_name="new_topic", renderer="new_topic.jinja2", permission="topic.post" |
|
|
|
) |
|
|
|
@use_kwargs({"title": String(missing=""), "link": String(missing="")}) |
|
|
|
def get_new_topic_form(request: Request, title: str, link: str) -> dict: |
|
|
|
@use_kwargs( |
|
|
|
{ |
|
|
|
"title": String(missing=""), |
|
|
|
"link": String(missing=""), |
|
|
|
"tags": String(missing=""), |
|
|
|
"markdown": String(missing=""), |
|
|
|
} |
|
|
|
) |
|
|
|
def get_new_topic_form( |
|
|
|
request: Request, title: str, link: str, tags: str, markdown: str |
|
|
|
) -> dict: |
|
|
|
"""Form for entering a new topic to post.""" |
|
|
|
group = request.context |
|
|
|
|
|
|
|
return {"group": group, "title": title, "link": link} |
|
|
|
return { |
|
|
|
"group": group, |
|
|
|
"title": title, |
|
|
|
"link": link, |
|
|
|
"tags": tags, |
|
|
|
"markdown": markdown, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@view_config(route_name="topic", renderer="topic.jinja2") |
|
|
|