dcramer/django-sentry — Issue #274: Fixing urlresolve issues
Author: mattrobenolt
Created: 2011-11-29 23:05:27+00:00
State: open

I started traversing through and trying to fix all of the broken links and came across a design flaw and wanted some input.

Ref: cd5066dc7371ca4001e4eb6031e1794fc7b5e57a

Your template filter "get_widgets" will probably need to be translated to an actual template tag. Here's what it current is:

```python
@register.filter
def get_widgets(group, request):
for cls in GroupActionProvider.plugins.itervalues():
inst = cls(group.pk)
resp = inst.widget(request, group)
if resp:
yield resp
```

But it now needs to pass the project through as well, and we can't pass two variables through a filter.

I'm proposing a templatetag that can be used like:

```python
{% get_widgets request=request project=project group=group %}
```

Now, the issue with that, is, I'm not sure how you could iterate over those values in template syntax.