Zine

open source content publishing system


Ticket #85 (closed defect: fixed)

Opened 4 months ago

Last modified 3 weeks ago

handle_user_pages uses get_application() which is not imported

Reported by: kleinweby Owned by:
Priority: blocker Milestone:
Component: general Version: dev
Keywords: Cc: kontakt@…

Description

In handle_user_pages (in zine/views/blog.py) on line 426 is the following:

   cfg = get_application().cfg

and on line 430 get_application() is used again. But get_application() is not imported in blog.py so that it happends in a error ("NameError?: global name 'get_application' is not defined").

I have looked at other parts of zine and i think, that get_application() has (mostly) replaced with req.app.

Here is the solution. Change line 426 - 432 to the following:

    cfg = req.app.cfg
    return render_response(
        'page_base.html',
        page=page,
        blog_title=cfg['blog_title'],
        show_title=cfg['show_page_title'],
        show_children=cfg['show_page_children']

Change History

Changed 4 months ago by kleinweby

  • cc kontakt@… added
  • component changed from admin to general

Changed 3 weeks ago by mitsuhiko

  • status changed from new to closed
  • resolution set to fixed

Fixed by now.

Note: See TracTickets for help on using tickets.