Source code for cards.views
# -*- coding: utf-8 -*-
from annoying.decorators import render_to
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
@login_required
@render_to('cards/processing_card_new_run.html')
[docs]def proces_card_new_run(request):
"""**View at the creation of new cards.**
:When choosing a new card in "processing_card_menu" function transferred dictionary "rev_url" values:
{<button_a_new_card>: <url_to_create_a_new_card>}
"""
title = 'Create New Processing Cards'
rev_url = {
'qrf_button': 'new_run_qrf',
'rfscore_button': 'new_run_rfscore',
'remap_button': 'new_run_remap',
'year_filter_button': 'new_run_year_filter',
'collate_button': 'new_run_collate',
'preproc_button': 'new_run_preproc',
'margecsv_button': 'new_run_mergecsv',
'rftrain_button': 'new_run_rftrain',
'cancel_button': 'run_new_card_sequence_add',
}
if request.method == "POST":
return processing_card_menu(request, rev_url)
data = {
'title': title,
}
return data