def get_urls(self):
        pattern_list = []
        for admin_view in self.views:
            admin_view.model_admin = self
            get_kwargs = getattr(self, "get_%s_kwargs" % admin_view.name, None)
            if not get_kwargs:
                get_kwargs = admin_view.get_view_kwargs
            try:
                view_instance = admin_view.view.as_view(**get_kwargs())
            except Exception as e:
                trace = sys.exc_info()[2]
                new_exception = TypeError(
                    'Cannot instantiate admin view "{}.{}". '
                    'The error that got raised was: {}'.format(
                        self.__class__.__name__, admin_view.name, e))
                try:
                    raise new_exception.with_traceback(trace)
                except AttributeError:
                    raise (new_exception, None, trace)

            pattern_list.append(
                url(
                    regex=admin_view.url,
                    view=view_instance,
                    name=self.get_prefixed_view_name(admin_view.name)
                )
            )
        return patterns('', *pattern_list)
dataset/ETHPy150Open pydanny/django-admin2/djadmin2/types.py/ModelAdmin2.get_urls/original