Opened 18 years ago
Closed 18 years ago
#3910 closed enhancement (wontfix)
Add ad-hoc functionality to pages
Reported by: | anonymous | Owned by: | Jonas Borgström |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | wiki system | Version: | 0.10 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
(Disclaimer: I'm new to trac).
As far as I understand, if I want a page that is dynamic - gathering data from other pages and displaying it, then I need to create a plugin, and use a macro defined by this plugin.
This is cumbersome when I want this functionality for just one page.
It would be nice to be able to write the code in the page itself. For example, a syntax to embed python code in the page - accessing the trac API, or querying the DB.
Attachments (0)
Change History (5)
comment:1 by , 18 years ago
Type: | defect → enhancement |
---|
comment:4 by , 18 years ago
No, I don't think so… my suggestion was meant to be humorous, sorry ;)
It's way too easy to shoot yourself in the foot with such a thing. Moreover, the security implication of this imply that you would have to restrict writing such embedded code to TRAC_ADMIN only… and TRAC_ADMIN has by definition access to the Trac server and therefore he can already easily upload plugins using the WebAdmin. Single file plugins are quite easy to write anyway, see TracDev/PluginDevelopment#Writingtheplugincode for example, so you don't gain much by being able to write this inside a wiki page.
You already have many other "generic" ways to produce dynamic content: the TicketQuery macro is one example, the TracWikiTemplates plugin is another, etc.
Of course, ideas for enhancing the TicketQuery macro are welcomed. For example, the idea to generalize that to some kind of query langage for the whole Trac system has some appeal to me. But enabling Python code embedded in Wiki pages to be executed will probably never be part of Trac core.
comment:5 by , 18 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
So back to the original topic:
It would be nice to be able to write the (Python) code in the page itself.
I'll close that as wontfix.
For the idea of generalizing the TicketQuery language, see #2465.
opened as bug by mistake