Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
832 Lượt xem

Hello,

I use the checkout process from the website_sale module with some additional pages for user-input. This is done with an additional template and controller.

It worked fine until I recently pulled the latest changes from the community repo (v17).


This caused 2 changes:

my form submit:

 form action="/shop/example" method="post"

is getting logged as:

"POST /shop/exampleundefined HTTP/1.1"


I solved this by adding the following:

form action="/shop/example" method="post" data-mark="*" data-pre-fill="true" data-model_name=""

 This allowed my controller to be reachable again.

The 2nd problem arises once I try to render a new template after the call to the controller. e.g. :

@http.route(['/shop/example'], type='http', auth="user", website=True, sitemap=False)      

def get_values_from_form(self, **post):

​// retrieve the values from **post

render_​values = get_values()

​return request.render('my_module.other_template', render_values)


From debugging and logging I see the return being accessed, but the new page is not rendering.  No errors are thrown, not in the console nor in the terminal.

I changed the render to a redirect to a different controller. This one is called and executed, but is also unable to render a template.




Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
4
thg 5 25
2507
2
thg 5 25
5865
1
thg 3 25
1687
4
thg 3 25
4472
3
thg 2 25
5475