Se rendre au contenu
Menu
Cette question a été signalée
I am a Junior Odoo developer, and I am currently having an issue with the blog post, I am trying to spot which method is actually calling here and how the line is being converted to text (the second line which is double starred) , so the previous issue was removal Id from blog URL and after removing the ID the problem now, is to load the blog page from existing URL. Since I am very new to this platform and there are no resources on this topic, "I haven't got any idea to load the blog page" the 404 error is coming. It would be great if you give any suggestions or help to resolve this issue.  

@http.route([

    **'''/blog//''**',

], type='http', auth="public", website=True, sitemap=True)

def blog_post(self, blog, blog_post, tag_id=None, page=1, enable_editor=None, **post):

    """ Prepare all values to display the blog.



    :return dict values: values for the templates, containing



     - 'blog_post': browse of the current post

     - 'blog': browse of the current blog

     - 'blogs': list of browse records of blogs

     - 'tag': current tag, if tag_id in parameters

     - 'tags': all tags, for tag-based navigation

     - 'pager': a pager on the comments

     - 'nav_list': a dict [year][month] for archives navigation

     - 'next_post': next blog post, to direct the user towards the next interesting post

    """

    if not blog.can_access_from_current_website():

        raise werkzeug.exceptions.NotFound()



    BlogPost = request.env['blog.post']

    date_begin, date_end = post.get('date_begin'), post.get('date_end')

Avatar
Ignorer
Publications associées Réponses Vues Activité
2
févr. 24
2678
2
nov. 23
1855