[kforge-user] [0.13 bug] Mailman service creation

John Bywater john.bywater at appropriatesoftware.net
Thu Sep 6 10:29:32 UTC 2007


Nicolas Steinmetz wrote:
> Hello,
>
> I have the following bug (maybe because mailman is not installed).
>
> Use case :
> 1/ In an existing project, go to service page
> 2/ create service with a name and select mailman
> 3/ Ugly error regarding the file mailman.mailman_url :
>
>     * |/usr/lib/python2.5/site-packages/django/core/handlers/base.py|
>       in |get_response|
>         70. # Apply view middleware
>
>
>         71. for middleware_method in self._view_middleware:
>
>
>         72. response = middleware_method(request, callback,
>             callback_args, callback_kwargs)
>
>
>         73. if response:
>
>
>         74. return response
>
>
>        75.
>
>
>
>
>
>         76. try:
>
>
>         77. response = callback(request, *callback_args,
>             **callback_kwargs) ...
>
>
>         78. except Exception, e:
>
>
>         79. # If the view raised an exception, run it through exception
>
>
>         80. # middleware, and if the exception middleware returns a
>
>
>         81. # response, use that. Otherwise, reraise the exception.
>
>
>         82. for middleware_method in self._exception_middleware:
>
>
>         83. response = middleware_method(request, e)
>
>
>       ▶ Local vars
>       <http://support.unelectronlibre.info/project/ptitclic/services/create/#>
>
>       Variable
>
>
>       	Value
>
>
>       callback
>
>
>       	
>       <function create at 0x8a21a3c>
>
>
>
>       callback_args
>
>
>       	
>       ()
>
>
>
>       callback_kwargs
>
>
>       	
>       {'projectName': 'ptitclic'}
>
>
>
>       debug
>
>
>       	
>       <module 'django.views.debug' from
>       '/usr/lib/python2.5/site-packages/django/views/debug.pyc'>
>
>
>
>       e
>
>
>       	
>       KeyError('mailman.mailman_url',)
>
>
>
>       exceptions
>
>
>       	
>       <module 'django.core.exceptions' from
>       '/usr/lib/python2.5/site-packages/django/core/exceptions.pyc'>
>
>
>
>       mail_admins
>
>
>       	
>       <function mail_admins at 0x89a01b4>
>
>
>
>       middleware_method
>
>
>       	
>       <bound method XViewMiddleware.process_view of
>       <django.middleware.doc.XViewMiddleware object at 0x898ff2c>>
>
>
>
>       request
>
>
>       	
>       <ModPythonRequest path:/project/ptitclic/services/create/,
>       GET:<MultiValueDict: {}>, POST:<MultiValueDict:
>       {'edit-submission': ['create the service \xc2\xbb'], 'name':
>       ['kikoolol'], 'plugin': ['example']}>, COOKIES:{'kforge_auth':
>       '7b812366c588d56cec3163b5999ad63fc0391a550b5438d7bbb9579ed3bfd058'},
>       META:{'AUTH_TYPE': None, 'CONTENT_LENGTH': 0L, 'CONTENT_TYPE':
>       None, 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT':
>       'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
>       'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
>       'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE':
>       'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3', 'HTTP_CONNECTION':
>       'keep-alive', 'HTTP_CONTENT_LENGTH': '70', 'HTTP_CONTENT_TYPE':
>       'application/x-www-form-urlencoded', 'HTTP_COOKIE':
>       'kforge_auth=7b812366c588d56cec3163b5999ad63fc0391a550b5438d7bbb9579ed3bfd058',
>       'HTTP_HOST': 'support.unelectronlibre.info
>       <http://support.unelectronlibre.info>', 'HTTP_KEEP_ALIVE':
>       '300', 'HTTP_REFERER':
>       'http://support.unelectronlibre.info/project/ptitclic/services/create/',
>       'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US;
>       rv:1.8.1.6 <http://1.8.1.6>) Gecko/20061201 Firefox/2.0.0.6
>       (Ubuntu-feisty)', 'PATH_INFO':
>       '/project/ptitclic/services/create/', 'PATH_TRANSLATED': None,
>       'QUERY_STRING': None, 'REMOTE_ADDR': '127.0.0.1
>       <http://127.0.0.1>', 'REMOTE_HOST': None, 'REMOTE_IDENT': None,
>       'REMOTE_USER': None, 'REQUEST_METHOD': 'POST', 'SCRIPT_NAME':
>       None, 'SERVER_NAME': 'support.unelectronlibre.info
>       <http://support.unelectronlibre.info>', 'SERVER_PORT': 0,
>       'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'mod_python'}>
>
>
>
>       resolver
>
>
>       	
>       <django.core.urlresolvers.RegexURLResolver object at 0x898fc6c>
>
>
>
>       response
>
>
>       	
>       None
>
>
>
>       self
>
>
>       	
>       <django.core.handlers.modpython.ModPythonHandler object at
>       0xb7478dec>
>
>
>
>       settings
>
>
>       	
>       <django.conf.LazySettings object at 0xb74404cc>
>
>
>
>       urlconf
>
>
>       	
>       'kforge.django.settings.urls.main'
>
>
>
>       urlresolvers
>
>
>       	
>       <module 'django.core.urlresolvers' from
>       '/usr/lib/python2.5/site-packages/django/core/urlresolvers.pyc'>
>
>
>
>
>
>
> |Traceback (most recent call last):
> File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py" 
> in get_response
>   77. response = callback(request, *callback_args, **callback_kwargs)
>
>   KeyError at /project/ptitclic/services/create/
>   'mailman.mailman_url'|
>

This will be looked into under:
http://project.knowledgeforge.net/kforge/trac/ticket/47

> That's also why I thought there were a global admin interface : to 
> define which services are enabled/disabled and maybe set some rights 
> or default rights for a new visitor, member, etc.

Currently, and it isn't very nice, service plugins are enabled and 
disabled using the Python shell.

 >>> r.plugins.create('myplugin')
 >>> del(r.plugins['myplugin'])

Default rights are controlled by config file variables: member_role, 
person_role, visitor_role.

The ticket 47 is to present the plugins in the web interface.

To present the role configuration through the web interface, we'd 
firstly need to add something to the KForge domain model, something like 
a Settings class. Then add config pages.

Best wishes,

John.

>
> Nicolas
>   





More information about the kforge-user mailing list