Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
835 Переглядів

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.




Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
4
трав. 25
2510
2
трав. 25
5866
1
бер. 25
1689
4
бер. 25
4474
3
лют. 25
5478