예제 #1
0
 def dispatch(self, request, key):
     verification_key_object = get_object_or_404(VerificationKey, key=key)
     if not verification_key_object.is_valid:
         msg = u'Данная ссылка уже использовалась, попробуйте получить новую.'
         return {'message': msg}
     return TemplateView.dispatch(
         self, request, verification_key_object=verification_key_object)
예제 #2
0
 def dispatch(self, request, *args, **kwargs):
     self.status = "closed"
     if "status" in request.GET and request.GET['status'] in ("*", "open", "closed"):
         self.status = request.GET['status']
         
     self.tracker = None
     if "tracker" in request.GET and request.GET['tracker'] in ("1", "2"):
         self.tracker = request.GET['tracker']
     
     return TemplateView.dispatch(self, request, *args, **kwargs)
예제 #3
0
파일: views.py 프로젝트: cmjatai/cmj
    def dispatch(self, request, *args, **kwargs):

        slug = kwargs.get('slug', '')

        if not slug:
            raise Http404()

        result = self._pre_dispatch(request, *args, **kwargs)
        if result:
            return result

        return TemplateView.dispatch(self, request, *args, **kwargs)
예제 #4
0
 def dispatch(self, request, key):
     try:
         verification_key_object = VerificationKey.objects.get(key=key)
     except VerificationKey.DoesNotExist:
         messages.error(request, u'Данная ссылка недействительна')
         return HttpResponseRedirect(reverse('reset_password_request'))
     if not verification_key_object.is_valid:
         msg = u'Данная ссылка уже использовалась, попробуйте получить новую.'
         messages.error(request, msg)
         return HttpResponseRedirect(reverse('reset_password_request'))
     return TemplateView.dispatch(
         self, request, verification_key_object=verification_key_object)
예제 #5
0
파일: views.py 프로젝트: cmjatai/cmj
    def dispatch(self, request, *args, **kwargs):

        slug = kwargs.get('slug', '')

        if slug:
            self._pre_dispatch(request, *args, **kwargs)

        classe = self.classe
        # recupera classe de parlamentar avaliando permissões

        slug = 'parlamentar'
        if kwargs['parlamentar']:
            slug = 'parlamentar/' + kwargs['parlamentar']

        kwargs['slug'] = slug
        self._pre_dispatch(request, *args, **kwargs)
        self.parlamentar = self.classe

        return TemplateView.dispatch(self, request, *args, **kwargs)
예제 #6
0
 def dispatch(self, request, *args, **kwargs):
     return TemplateView.dispatch(self, request, *args, **kwargs)
예제 #7
0
 def dispatch(self, request, *args, **kwargs):
     # bypass the TournamentMixin checks, to avoid potential redirect loops
     return TemplateView.dispatch(self, request, *args, **kwargs)
예제 #8
0
파일: views.py 프로젝트: pysagar/elk
 def dispatch(self, request, *args, **kwargs):
     return TemplateView.dispatch(self, request, *args, **kwargs)
예제 #9
0
파일: views.py 프로젝트: czlee/tabbycat
 def dispatch(self, request, *args, **kwargs):
     # bypass the TournamentMixin checks, to avoid potential redirect loops
     return TemplateView.dispatch(self, request, *args, **kwargs)