2
0
Fork 0

Reformat code

This commit is contained in:
Luca 2023-04-21 21:26:07 +02:00
parent 024926e44c
commit e8deebae0c
22 changed files with 11 additions and 16 deletions

View File

@ -1,6 +1,7 @@
from django.conf import settings from django.conf import settings
from .models import LoginToken from .models import LoginToken
# enhance template contexts with frequently used data so we have less code duplication # enhance template contexts with frequently used data so we have less code duplication
def proc(request): def proc(request):
context = { context = {

View File

@ -7,7 +7,6 @@ import shiftregister.app.models
class Migration(migrations.Migration): class Migration(migrations.Migration):
initial = True initial = True
dependencies = [] dependencies = []

View File

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("app", "0001_initial"), ("app", "0001_initial"),
] ]

View File

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("app", "0002_message_sent_at"), ("app", "0002_message_sent_at"),
] ]

View File

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("app", "0003_logintoken_send_count"), ("app", "0003_logintoken_send_count"),
] ]

View File

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("app", "0004_shift_required_helpers"), ("app", "0004_shift_required_helpers"),
] ]

View File

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("app", "0005_shift_description_alter_shift_required_helpers"), ("app", "0005_shift_description_alter_shift_required_helpers"),
] ]

View File

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("app", "0006_alter_shift_description"), ("app", "0006_alter_shift_description"),
] ]

View File

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("app", "0007_shiftregistration_state"), ("app", "0007_shiftregistration_state"),
] ]

View File

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("app", "0008_alter_message_sent_at"), ("app", "0008_alter_message_sent_at"),
] ]

View File

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("app", "0009_helper_asta_confirmed"), ("app", "0009_helper_asta_confirmed"),
] ]

View File

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
("app", "0010_room_meeting_location"), ("app", "0010_room_meeting_location"),
] ]

View File

@ -5,7 +5,6 @@ import django.db.models.deletion
class Migration(migrations.Migration): class Migration(migrations.Migration):
initial = True initial = True
dependencies = [ dependencies = [

View File

@ -5,7 +5,6 @@ from django.db import models
def metrics(request): def metrics(request):
help_wanted = Q(required_helpers__gt=F("reg_count")) | Q(required_helpers=0) & Q( help_wanted = Q(required_helpers__gt=F("reg_count")) | Q(required_helpers=0) & Q(
room__required_helpers__gt=F("reg_count") room__required_helpers__gt=F("reg_count")
) )

View File

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
initial = True initial = True
dependencies = [] dependencies = []

View File

@ -1,6 +1,8 @@
from django.db import models from django.db import models
# Create your models here. # Create your models here.
class Page(models.Model): class Page(models.Model):
url = models.fields.SlugField(unique=True) url = models.fields.SlugField(unique=True)
content = models.TextField() content = models.TextField()

View File

@ -3,6 +3,8 @@ from django.shortcuts import render
from .models import Page from .models import Page
# Create your views here. # Create your views here.
class PageView(DetailView): class PageView(DetailView):
template_name = "page.html" template_name = "page.html"
queryset = Page.objects.filter(visible=True) queryset = Page.objects.filter(visible=True)

View File

@ -2,4 +2,6 @@ from django import forms
class TeamBackupForm(forms.Form): 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"})
)

View File

@ -5,7 +5,6 @@ import django.db.models.deletion
class Migration(migrations.Migration): class Migration(migrations.Migration):
initial = True initial = True
dependencies = [ dependencies = [

View File

@ -10,6 +10,7 @@ from datetime import timedelta
from django.db.models import DateTimeField from django.db.models import DateTimeField
from datetime import date, datetime, time from datetime import date, datetime, time
# Create your views here. # Create your views here.
@login_required @login_required
def worklist(request): def worklist(request):

View File

@ -1,6 +1,7 @@
from django import forms from django import forms
from .models import ShiftRegistration, Helper from .models import ShiftRegistration, Helper
# placeholder form for simple submit button use cases so we get csrf protection # placeholder form for simple submit button use cases so we get csrf protection
class EmptyForm(forms.Form): class EmptyForm(forms.Form):
pass pass

View File

@ -10,6 +10,7 @@ from django.contrib import messages
from django.db import models from django.db import models
from .forms import BulkMessage, HelperShift from .forms import BulkMessage, HelperShift
# Create your views here. # Create your views here.
def index(request): def index(request):
pass pass