تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
13011 أدوات العرض

I want to use below method which is call while rendering any page. If I pass ‘/’ in http.route it will call only for homepage not for others like ‘/shop’, ‘/blog’ etc. Also wanted to pass dynamic template rendering in return on the basis of http.route(‘URL’).

@http.route(['/'], type='http', auth="public", website=True)

def custom_controller_func(self, **kwargs):

     values = {

     # some values which is passing in template

  }

   return request.render('website.homepage', values)

Can anyone help me out?

Thanks.


الصورة الرمزية
إهمال

Can i know what exactly you are looking for ? I feel the question is not clear. looking how to connect the url and a template ? or how to pass value to template from controller ?

I cant understand your problem hope this will helps you: http://bit.ly/odoo-web-controller

المنشورات ذات الصلة الردود أدوات العرض النشاط
0
يونيو 24
1794
1
مارس 15
13596
6
أكتوبر 21
18993
4
أكتوبر 20
5356
2
مارس 16
4136