def get_urls(self):
        urlpatterns = super(EmailAdmin, self).get_urls()
        from django.conf.urls.defaults import patterns, url

        def wrap(view):
            def wrapper(*args, **kwargs):
                return self.admin_site.admin_view(view)(*args, **kwargs)
            return update_wrapper(wrapper, view)

        appname = self.model._meta.app_label

        urlpatterns = patterns('',
            url(r'^(?P<email_id>\d+)/attachments/(?P<attachment_id>\d+)/(?P<filename>[\w.]+)$',
                wrap(self.serve_attachment),
                name=appname % '%s_email_attachment')
        ) + urlpatterns
        return urlpatterns
dataset/ETHPy150Open stefanfoulis/django-database-email-backend/database_email_backend/admin.py/EmailAdmin.get_urls/swapped operands of `%`