Reformat code

pull/1/head
Luca 2 years ago
parent 024926e44c
commit e8deebae0c

@ -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 = {

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

@ -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"),
] ]

@ -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"),
] ]

@ -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"),
] ]

@ -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"),
] ]

@ -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"),
] ]

@ -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"),
] ]

@ -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"),
] ]

@ -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"),
] ]

@ -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"),
] ]

@ -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"),
] ]

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

@ -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")
) )

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

@ -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()

@ -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)

@ -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"})
)

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

@ -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):

@ -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

@ -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

Loading…
Cancel
Save