Ejemplo n.º 1
0
 def get_context_data(self, request):
     router_id = self.tab_group.kwargs['router_id']
     try:
         router = api.router_get(request, router_id)
     except:
         redirect = reverse(redirect_url)
         exceptions.handle(self.request,
                           _('Unable to retrieve router details.'),
                           redirect=redirect)
     return {'router': router}
Ejemplo n.º 2
0
 def get_data(self, request, router_id):
     router = api.router_get(request, router_id)
     return router