Ejemplo n.º 1
0
 def get_context_data(self, **kwargs):
     context = super(JobListView, self).get_context_data(**kwargs)
     if not user_has_valid_proxy(self.request.user):
         context['proxy_invalid'] = True
     if not hasattr(self.request.user, 'userproxy'):
         context['first_run'] = True
     return context
Ejemplo n.º 2
0
 def get_context_data(self, **kwargs):
     context = super(JobListView, self).get_context_data(**kwargs)
     if not user_has_valid_proxy(self.request.user):
         context['proxy_invalid'] = True
     if not hasattr(self.request.user, 'userproxy'):
         context['first_run'] = True
     return context
Ejemplo n.º 3
0
def new(request):
    if request.method == "GET":
        ctx = {}
        if not user_has_valid_proxy(request.user):
            ctx['proxy_invalid'] = True
        return render(request, 'rimrock_communication/new.html', ctx)
    elif request.method == "POST":
        if new_job(request):
            return redirect('all_jobs')
        else:
            return redirect('new')
Ejemplo n.º 4
0
def new(request):
    if request.method == "GET":
        ctx = {}
        if not user_has_valid_proxy(request.user):
            ctx['proxy_invalid'] = True
        return render(request, 'rimrock_communication/new.html', ctx)
    elif request.method == "POST":
        if new_job(request):
            return redirect('all_jobs')
        else:
            return redirect('new')