<commit_before>from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response, render, get_object_or_404
from models import Minutes, Agenda, Annualreport
from datetime import datetime, timedelta
import re
from ap.settings import ADMINURL

today = datetime.now()

def loginrequired(f):
   """Decoration to secure views against non-logged-in users."""
   def securedf(request, *args, **kwargs):
      if request.user.is_authenticated():
         return f(request, *args, **kwargs)
      else:
         return HttpResponseRedirect(ADMINURL)
   return securedf
      
@loginrequired
def minutetop(request):
      n = Minutes.objects.all()
      return render(request, 'boarddocs/minutetop.html', 
                                {'p': n, })

@loginrequired
def start(request):
   return render(request, 'boarddocs/start.html')

<commit_msg>boarddocs "top" views.<commit_after>from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response, render, get_object_or_404
from models import Minutes, Agenda, Annualreport
from datetime import datetime, timedelta
import re
from ap.settings import ADMINURL

today = datetime.now()

def loginrequired(f):
   """Decoration to secure views against non-logged-in users."""
   def securedf(request, *args, **kwargs):
      if request.user.is_authenticated():
         return f(request, *args, **kwargs)
      else:
         return HttpResponseRedirect(ADMINURL)
   return securedf
      
@loginrequired
def start(request):
   return render(request, 'boarddocs/start.html')

@loginrequired
def minutetop(request):
      n = Minutes.objects.all()
      return render(request, 'boarddocs/minutetop.html', 
                                {'p': n, })

@loginrequired
def otherfilestop(request):
      n = Boardfile.objects.all()
   return render(request, 'boarddocs/otherfilestop.html', {'p': n, })

@loginrequired
def budgettop(request):
      n = Budgetreport.objects.all()
   return render(request, 'boarddocs/budgettop.html', {'p': n, })

@loginrequired
def agendatop(request):
      n = Agenda.objects.all()
   return render(request, 'boarddocs/agendatop.html', {'p': n, })

@loginrequired
def legaltop(request):
      n = LegalDoc.objects.all()
   return render(request, 'boarddocs/legaltop.html', {'p': n, })

@loginrequired
def historicaltop(request):
      n = Historical.objects.all()
   return render(request, 'boarddocs/historicaltop.html', {'p': n, })

@loginrequired
def gallery(request):
      n = Picture.objects.all()
   return render(request, 'boarddocs/gallery.html', {'p': n, })




{'fraction_non_alphanumeric': 0.11874761359297442, 'fraction_numerical': 0.002290950744558992, 'mean_word_length': 3.906367041198502, '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': '7416529', 'n_tokens_mistral': 797, 'n_tokens_neox': 770, 'n_words': 202}