On Mon, Jun 15, 2009 at 3:28 AM, eri x<[email protected]> wrote: > It's an attribute that i change from the template, but sometimes(usually > when i don't use trac for some minutes) when i send a request to dhe admin > pannel it takes the default value.Looking on request arguments i noticed > that when this problem happens the request arguments are the same that are > used when trac loads the plugin and there are none of the arguments that i > have inserted in my code and are used when it works fine. Until now the only > solution that i think can work is to use an outer file where to save this > variable. > -------------------------------------------------------------------------------------------------- > class WorkflowEditorAdmin(Component): > > tipo_ticket='default_workflow' > > def render_admin_panel(self, req, cat, page, path_info): > req.perm.assert_permission('TRAC_ADMIN') > > if req.method == 'POST': > if "select_ticket" and "flag" in req.args: > self.tipo_ticket=req.args['select_ticket'] > > else: > self._update_config(req,page_param) >
Right. Unless you've configured your system to only serve requests one at a time from a single Python interpreter, this won't work. You need to save your setting either in the config file or in the DB somewhere. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en -~----------~----~----~----~------~----~------~--~---
