<commit_before>from django.views.generic.edit import CreateView

from .forms import SubmissionForm
from .models import Submission


class SubmissionView(CreateView):
    model = Submission
    template_name = "dashboard.html"
    form_class = SubmissionForm
    # Anton: Change the below to redirect to your review page
    success_url = "/signin/done/"

    def form_valid(self, form):
        if form.is_valid():
            submission = form.save(commit=False)
            submission.user = self.request.user
            submission.save()
        return super(SubmissionView, self).form_valid(form)<commit_msg>redirect to review-view after submission<commit_after>from django.views.generic.edit import CreateView
from django.core.urlresolvers import reverse_lazy

from .forms import SubmissionForm
from .models import Submission


class SubmissionView(CreateView):
    model = Submission
    template_name = "dashboard.html"
    form_class = SubmissionForm
    # Anton: Change the below to redirect to your review page
    success_url = reverse_lazy('create-review')

    def form_valid(self, form):
        if form.is_valid():
            submission = form.save(commit=False)
            submission.user = self.request.user
            submission.save()
        return super(SubmissionView, self).form_valid(form)
{'fraction_non_alphanumeric': 0.07972665148063782, 'fraction_numerical': 0.0, 'mean_word_length': 3.335526315789474, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7542737', 'n_tokens_mistral': 355, 'n_tokens_neox': 357, 'n_words': 97}