Skip to content

Commit

Permalink
Lint the code
Browse files Browse the repository at this point in the history
  • Loading branch information
sks444 committed May 7, 2020
1 parent f69e5f0 commit a027755
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 39 deletions.
36 changes: 26 additions & 10 deletions junction/conferences/migrations/0016_auto_20200410_1926.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
),
),
]
2 changes: 0 additions & 2 deletions junction/conferences/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion junction/devices/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
(
Expand Down
74 changes: 53 additions & 21 deletions junction/proposals/migrations/0028_auto_20200507_1202.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
),
),
]
10 changes: 7 additions & 3 deletions junction/proposals/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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()
Expand Down
3 changes: 1 addition & 2 deletions junction/schedule/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a027755

Please sign in to comment.