<commit_before>from django.core.urlresolvers import reverse
from django.shortcuts import redirect
from django.views.generic import View, TemplateView


class LandingView(TemplateView):
    template_name = "landing.html"

    def get(self, request):
        return super(LandingView, self).get(request)


class LoginView(TemplateView):

    def post(self, request):
    	#Save client
    	#Notify all clients of new user
        return redirect(reverse('dashboard_view'))


class DashboardView(TemplateView):
	template_name = "dashboard.html"

	def get(self, request):
    	#load current state
		return super(DashboardView, self).get(request)

<commit_msg>Generate url anchor for new canvas<commit_after>from django.core.urlresolvers import reverse
from django.shortcuts import redirect
from django.views.generic import View, TemplateView
import random

class LandingView(TemplateView):
    template_name = "landing.html"

    def get(self, request):
        return super(LandingView, self).get(request)


class LoginView(TemplateView):

    def post(self, request):
    	#Create new canvas
    	new_canvas_name = '-'.join(
    		(request.POST['username'], str(random.randint(1,1000000))))
    	#Save client
    	#Notify all clients of new user
        return redirect('{}#{}'.format(reverse('dashboard_view'), new_canvas_name))


class DashboardView(TemplateView):
	template_name = "dashboard.html"

	def get(self, request):
    	#load current state
		return super(DashboardView, self).get(request)


{'fraction_non_alphanumeric': 0.10066666666666667, 'fraction_numerical': 0.005333333333333333, 'mean_word_length': 4.458181818181818, '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': '69220', 'n_tokens_mistral': 452, 'n_tokens_neox': 436, 'n_words': 117}