Issue #18 open

Add namespace support for named Urls.

mzu
created an issue

It would be nice to have postman support Django namespaces for Urls. This would allow multiple apps within a project to use one postman instance with different url options (e.g. user_filter based on current user role). Afaik there are only the reverse() calls in views.py that need patching, e.g. {{{ def _folder(...): ... app_name = resolve(request.path).app_name namespace = resolve(request.path).namespace return render_to_response(template_name, { 'pm_messages': msgs, # avoid 'messages', already used by contrib.messages 'by_conversation': option is None, 'by_message': option == OPTION_MESSAGES, 'by_conversation_url': reverse('%s:%s' % (namespace, view_name), current_app=app_name), 'by_message_url': reverse('%s:%s' % (namespace, view_name), args=[OPTION_MESSAGES], current_app=app_name), 'current_url': request.get_full_path(), 'gets': request.GET, # useful to postman_order_by template tag }, context_instance=RequestContext(request)) }}} I can create a pull request if this of any interest to you.

Let me know if this makes any sense (I am a complete newbie to Django/Python so it is likely that I am missing something ;))

Mischa

Comments (4)

  1. Log in to comment