Hi RjOllos This worked, thank you.
On Sat, May 23, 2020 at 2:54 AM RjOllos <rjol...@gmail.com> wrote: > > > On Friday, May 22, 2020 at 4:07:03 PM UTC-7, Ozgur Polat wrote: >> >> Hi, >> >> I am working on a trac plug-in that I developed a few years ago, I am >> modifying it on it to put it on my Github account. When I tried the plug-in >> with the the latest Trac, I get an error. It cannot find the Context. So I >> went inside >> >> trac.mimeview.api to search for Context, and I realized that it has been >> removed and maybe replaced with RenderingContext. Just to see if it would >> work I tried to replace Context with rendering context but that did not >> work. I was wondering if anyone had a similar problem and if you know how >> to fix this? >> >> context = Context.from_request(self.req, 'wiki') >> >> context = RenderingContext.from_request(self.req, 'wiki') >> >> Many thanks. >> > > You'll want to use: > > from trac.web.chrome import web_context > > context = web_context(self.req, 'wiki') > > > https://www.edgewall.org/docs/branches-1.4-stable/html/api/trac_web_chrome.html#trac.web.chrome.web_context > > > > -- > You received this message because you are subscribed to the Google Groups > "Trac Development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to trac-dev+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/trac-dev/f7d38746-9899-4036-b551-df9f176fb9af%40googlegroups.com > <https://groups.google.com/d/msgid/trac-dev/f7d38746-9899-4036-b551-df9f176fb9af%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Trac Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to trac-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/trac-dev/CAMeDY8HZcazV2VJPzz9163HZeGrbs6GC%2BYoryjhjX5rKjgo8Tw%40mail.gmail.com.