@ -1,6 +1,7 @@
from django.conf import settings
from .models import LoginToken
# enhance template contexts with frequently used data so we have less code duplication
def proc(request):
context = {
@ -7,7 +7,6 @@ import shiftregister.app.models
class Migration(migrations.Migration):
initial = True
dependencies = []
@ -4,7 +4,6 @@ from django.db import migrations, models
dependencies = [
("app", "0001_initial"),
]
("app", "0002_message_sent_at"),
("app", "0003_logintoken_send_count"),
("app", "0004_shift_required_helpers"),
("app", "0005_shift_description_alter_shift_required_helpers"),
("app", "0006_alter_shift_description"),
("app", "0007_shiftregistration_state"),
("app", "0008_alter_message_sent_at"),
("app", "0009_helper_asta_confirmed"),
("app", "0010_room_meeting_location"),
@ -5,7 +5,6 @@ import django.db.models.deletion
@ -5,7 +5,6 @@ from django.db import models
def metrics(request):
help_wanted = Q(required_helpers__gt=F("reg_count")) | Q(required_helpers=0) & Q(
room__required_helpers__gt=F("reg_count")
)
@ -1,6 +1,8 @@
from django.db import models
# Create your models here.
class Page(models.Model):
url = models.fields.SlugField(unique=True)
content = models.TextField()
@ -3,6 +3,8 @@ from django.shortcuts import render
from .models import Page
# Create your views here.
class PageView(DetailView):
template_name = "page.html"
queryset = Page.objects.filter(visible=True)
@ -2,4 +2,6 @@ from django import forms
class TeamBackupForm(forms.Form):
name = forms.CharField(max_length=100, widget=forms.TextInput(attrs={"class": "input"}))
name = forms.CharField(
max_length=100, widget=forms.TextInput(attrs={"class": "input"})
@ -10,6 +10,7 @@ from datetime import timedelta
from django.db.models import DateTimeField
from datetime import date, datetime, time
@login_required
def worklist(request):
from django import forms
from .models import ShiftRegistration, Helper
# placeholder form for simple submit button use cases so we get csrf protection
class EmptyForm(forms.Form):
pass
@ -10,6 +10,7 @@ from django.contrib import messages
from .forms import BulkMessage, HelperShift
def index(request):