diff --git a/junction/conferences/migrations/0016_auto_20200410_1926.py b/junction/conferences/migrations/0016_auto_20200410_1926.py index c989aabf..bfcdfd5b 100644 --- a/junction/conferences/migrations/0016_auto_20200410_1926.py +++ b/junction/conferences/migrations/0016_auto_20200410_1926.py @@ -2,31 +2,47 @@ # Generated by Django 1.11.17 on 2020-04-10 13:56 from __future__ import unicode_literals +import django.db.models.deletion from django.conf import settings from django.db import migrations, models -import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ - ('conferences', '0015_auto_20200322_1904'), + ("conferences", "0015_auto_20200322_1904"), ] operations = [ migrations.AddField( - model_name='historicalconferenceproposalreviewer', - name='history_change_reason', + model_name="historicalconferenceproposalreviewer", + name="history_change_reason", field=models.CharField(max_length=100, null=True), ), migrations.AlterField( - model_name='historicalconferenceproposalreviewer', - name='created_by', - field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Created By'), + model_name="historicalconferenceproposalreviewer", + name="created_by", + field=models.ForeignKey( + blank=True, + db_constraint=False, + null=True, + on_delete=django.db.models.deletion.DO_NOTHING, + related_name="+", + to=settings.AUTH_USER_MODEL, + verbose_name="Created By", + ), ), migrations.AlterField( - model_name='historicalconferenceproposalreviewer', - name='modified_by', - field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Modified By'), + model_name="historicalconferenceproposalreviewer", + name="modified_by", + field=models.ForeignKey( + blank=True, + db_constraint=False, + null=True, + on_delete=django.db.models.deletion.DO_NOTHING, + related_name="+", + to=settings.AUTH_USER_MODEL, + verbose_name="Modified By", + ), ), ] diff --git a/junction/conferences/views.py b/junction/conferences/views.py index f46e4042..af0e4f97 100644 --- a/junction/conferences/views.py +++ b/junction/conferences/views.py @@ -5,9 +5,7 @@ from django.http.response import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.views.decorators.http import require_http_methods - from django_filters import rest_framework as filters - from rest_framework import viewsets from .models import Conference, ConferenceVenue, Room diff --git a/junction/devices/migrations/0001_initial.py b/junction/devices/migrations/0001_initial.py index 58927534..5d4121cc 100644 --- a/junction/devices/migrations/0001_initial.py +++ b/junction/devices/migrations/0001_initial.py @@ -33,7 +33,7 @@ class Migration(migrations.Migration): auto_now=True, verbose_name="Last Modified At" ), ), - ('uuid', models.UUIDField(max_length=32, unique=True, db_index=True)), + ("uuid", models.UUIDField(max_length=32, unique=True, db_index=True)), ("is_verified", models.BooleanField(default=False)), ("verification_code", models.IntegerField()), ( diff --git a/junction/proposals/migrations/0028_auto_20200507_1202.py b/junction/proposals/migrations/0028_auto_20200507_1202.py index ee1e505f..382ebf50 100644 --- a/junction/proposals/migrations/0028_auto_20200507_1202.py +++ b/junction/proposals/migrations/0028_auto_20200507_1202.py @@ -2,51 +2,83 @@ # Generated by Django 1.11.17 on 2020-05-07 06:32 from __future__ import unicode_literals +import django.db.models.deletion from django.conf import settings from django.db import migrations, models -import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ - ('proposals', '0027_auto_20200502_0540'), + ("proposals", "0027_auto_20200502_0540"), ] operations = [ migrations.AddField( - model_name='historicalproposal', - name='history_change_reason', + model_name="historicalproposal", + name="history_change_reason", field=models.CharField(max_length=100, null=True), ), migrations.AddField( - model_name='historicalproposalsectionreviewervote', - name='history_change_reason', + model_name="historicalproposalsectionreviewervote", + name="history_change_reason", field=models.CharField(max_length=100, null=True), ), migrations.AlterField( - model_name='historicalproposal', - name='author', - field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Primary Speaker'), + model_name="historicalproposal", + name="author", + field=models.ForeignKey( + blank=True, + db_constraint=False, + null=True, + on_delete=django.db.models.deletion.DO_NOTHING, + related_name="+", + to=settings.AUTH_USER_MODEL, + verbose_name="Primary Speaker", + ), ), migrations.AlterField( - model_name='historicalproposal', - name='proposal_section', - field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='proposals.ProposalSection', verbose_name='Proposal Section'), + model_name="historicalproposal", + name="proposal_section", + field=models.ForeignKey( + blank=True, + db_constraint=False, + null=True, + on_delete=django.db.models.deletion.DO_NOTHING, + related_name="+", + to="proposals.ProposalSection", + verbose_name="Proposal Section", + ), ), migrations.AlterField( - model_name='historicalproposal', - name='proposal_type', - field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='proposals.ProposalType', verbose_name='Proposal Type'), + model_name="historicalproposal", + name="proposal_type", + field=models.ForeignKey( + blank=True, + db_constraint=False, + null=True, + on_delete=django.db.models.deletion.DO_NOTHING, + related_name="+", + to="proposals.ProposalType", + verbose_name="Proposal Type", + ), ), migrations.AlterField( - model_name='historicalproposal', - name='video_url', - field=models.URLField(blank=True, default='', help_text='Short 1-2 min video describing your talk'), + model_name="historicalproposal", + name="video_url", + field=models.URLField( + blank=True, + default="", + help_text="Short 1-2 min video describing your talk", + ), ), migrations.AlterField( - model_name='proposal', - name='video_url', - field=models.URLField(blank=True, default='', help_text='Short 1-2 min video describing your talk'), + model_name="proposal", + name="video_url", + field=models.URLField( + blank=True, + default="", + help_text="Short 1-2 min video describing your talk", + ), ), ] diff --git a/junction/proposals/views.py b/junction/proposals/views.py index 9152f610..5a1d5cc9 100644 --- a/junction/proposals/views.py +++ b/junction/proposals/views.py @@ -11,12 +11,11 @@ from django.http.response import HttpResponse, HttpResponseRedirect from django.shortcuts import get_object_or_404, render from django.views.decorators.http import require_http_methods +from django_filters import rest_framework as filters from hashids import Hashids from rest_framework import viewsets from rest_framework.response import Response -from django_filters import rest_framework as filters - from junction.base.constants import ( ConferenceSettingConstants, ConferenceStatus, @@ -41,7 +40,12 @@ class ProposalView(viewsets.ReadOnlyModelViewSet): queryset = Proposal.objects.filter(status=2) serializer_class = serializers.ProposalSerializer filter_backend = (filters.DjangoFilterBackend,) - filterset_fields = ("conference", "review_status", "proposal_type", "proposal_section") + filterset_fields = ( + "conference", + "review_status", + "proposal_type", + "proposal_section", + ) def get_queryset(self): data = super(ProposalView, self).get_queryset() diff --git a/junction/schedule/views.py b/junction/schedule/views.py index 3e09e503..a8ff827f 100644 --- a/junction/schedule/views.py +++ b/junction/schedule/views.py @@ -6,11 +6,10 @@ from django.http import HttpResponse from django.shortcuts import Http404, render from django.template.loader import render_to_string +from django_filters import rest_framework as filters from rest_framework import viewsets from rest_framework.response import Response -from django_filters import rest_framework as filters - from .models import ScheduleItem from .serializers import ScheduleSerializer