Coder Social home page Coder Social logo

trac-listmilestones's People

Contributors

mitar avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

ramok gerhro mitar

trac-listmilestones's Issues

fix API changes 1.1.2 for _post_process_request

In trac 1.2 I got this error

2016-12-26 21:35:01,555 Trac[formatter] ERROR: Macro ListMilestones(boss-q1-2016) failed:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/trac/wiki/formatter.py", line 802, in _macro_formatter
    return macro.ensure_inline(macro.process(args))
  File "/usr/lib/python2.7/dist-packages/trac/wiki/formatter.py", line 379, in process
    text = self.processor(text)
  File "/usr/lib/python2.7/dist-packages/trac/wiki/formatter.py", line 351, in _macro_processor
    text)
  File "/usr/lib/python2.7/dist-packages/listmilestones/api.py", line 35, in expand_macro
    template, data, content_type = dispatcher._post_process_request(req, template, data, content_type)
ValueError: too many values to unpack

I found API changes in trac there https://trac.edgewall.org/changeset/12527.

This patch fix for me:

--- a/api.py	2016-12-26 21:57:28.478528109 +0100
+++ b/api.py	2016-12-26 21:58:39.000000000 +0100
@@ -32,9 +32,9 @@
         content_type = 'text/html'
 
         dispatcher = RequestDispatcher(self.env)
-        template, data, content_type = dispatcher._post_process_request(req, template, data, content_type)
+        template, data, content_type, method = dispatcher._post_process_request(req, template, data, content_type)
 
-        return Markup(Chrome(self.env).render_template(formatter.req, template, data, content_type=content_type, fragment=True))
+        return Markup(Chrome(self.env).render_template(formatter.req, template, data, content_type=content_type, fragment=True, method=method))
 
     def get_templates_dirs(self):
         from pkg_resources import resource_filename

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.