<commit_before>"""Django shortcuts."""
from django.shortcuts import render, redirect
import datetime
from django.conf import settings
from .models import MoneyUnit, BucketList
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth import login, authenticate
from django.urls import reverse
from nec_todo.models import Todo


def dashboard(request):
    if request.user.is_authenticated:
        bucketlists = BucketList.objects.filter(
            author=request.user,
            created_date__lte=datetime.datetime.now()).order_by('-created_date')
        todolists = Todo.objects.filter(
            owner=request.user,
            created_date__lte=datetime.datetime.now()).order_by('-created_date')
        return render(request, 'nec/dashboard.html',
                      {'bucketlists': bucketlists, 'todolists': todolists})
    else:
        return redirect(settings.LOGIN_URL)


def bank(request):
    if request.user.is_authenticated:
        money_unit_lists = MoneyUnit.objects.filter(
            created_date__lte=datetime.datetime.now()).order_by('-created_date')<commit_msg>index page -> todo calendar<commit_after>"""Django shortcuts."""
from django.shortcuts import render, redirect
import datetime
from django.conf import settings
from .models import MoneyUnit, BucketList
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth import login, authenticate
from django.urls import reverse
from nec_todo.models import Todo


def dashboard(request):
    if request.user.is_authenticated:
        return reverse('todo_index')
    # if request.user.is_authenticated:
    #     bucketlists = BucketList.objects.filter(
    #         author=request.user,
    #         created_date__lte=datetime.datetime.now()).order_by('-created_date')
    #     todolists = Todo.objects.filter(
    #         owner=request.user,
    #         created_date__lte=datetime.datetime.now()).order_by('-created_date')
    #     return render(request, 'nec/dashboard.html',
    #                   {'bucketlists': bucketlists, 'todolists': todolists})
    else:
        return redirect(settings.LOGIN_URL)


def bank(request):
    if request.user.is_authenticated:
        money_unit_lists = MoneyUnit.objects.filter(
            created_date__lte=datetime.datetime.now()).order_by('-created_date')
{'fraction_non_alphanumeric': 0.10175288584865327, 'fraction_numerical': 0.0, 'mean_word_length': 3.526112185686654, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '7337786', 'n_tokens_mistral': 669, 'n_tokens_neox': 657, 'n_words': 134}