Unverified Commit 7e20a36c authored by Joost Rijneveld's avatar Joost Rijneveld
Browse files

Apply isort to entire codebase

parent 8aacf7db
import re
import json
import requests
from django.contrib.auth.models import User
import re
from datetime import datetime
from django.core.management.base import BaseCommand
import requests
from django.conf import settings
from django.contrib.auth.models import User
from django.core.exceptions import ImproperlyConfigured
from django.core.management.base import BaseCommand
from django.utils import timezone
import events.models as events_models
import members.models as members_models
FIELD_DATA_TYPES = {
'0': events_models.RegistrationInformationField.TEXT_FIELD,
'1': events_models.RegistrationInformationField.INTEGER_FIELD,
......
......@@ -4,8 +4,10 @@ from django.db import models
from django.db.models import Q
from django.urls import reverse
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _, string_concat
from utils.translation import MultilingualField, ModelTranslateMeta
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import string_concat
from utils.translation import ModelTranslateMeta, MultilingualField
class Event(models.Model, metaclass=ModelTranslateMeta):
......
......@@ -4,9 +4,8 @@ from django.core.exceptions import ValidationError
from django.test import TestCase
from django.utils import timezone
from members.models import Member
from events.models import Event, Registration
from members.models import Member
class RegistrationTest(TestCase):
......
......@@ -5,6 +5,7 @@ Events URL Configuration
from django.conf.urls import url
from events.feeds import EventFeed
from . import views
urlpatterns = [
......
......@@ -2,18 +2,19 @@ import csv
import json
from datetime import timedelta
from django.http import HttpResponse, JsonResponse
from django.views.decorators.http import require_http_methods
from django.shortcuts import render, get_object_or_404, redirect
from django.contrib import messages
from django.contrib.admin.views.decorators import staff_member_required
from django.contrib.auth.decorators import permission_required, login_required
from django.contrib.auth.decorators import login_required, permission_required
from django.http import HttpResponse, JsonResponse
from django.shortcuts import get_object_or_404, redirect, render
from django.utils import timezone
from django.utils.text import slugify
from django.utils.translation import ugettext_lazy as _, pgettext_lazy
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import pgettext_lazy
from django.views.decorators.http import require_http_methods
from .models import Event, Registration, RegistrationInformationField
from .forms import FieldsForm
from .models import Event, Registration, RegistrationInformationField
@staff_member_required
......
from django.contrib import admin
from .models import MailingList, VerbatimAddress, ListAlias
from .models import ListAlias, MailingList, VerbatimAddress
class VerbatimAddressInline(admin.TabularInline):
......
import requests
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.management.base import BaseCommand
from activemembers.models import Committee, Board
from members.models import Member
from activemembers.models import Board, Committee
from mailinglists.models import MailingList, VerbatimAddress
import requests
from members.models import Member
class Command(BaseCommand):
......
from django.db import models
from django.core import validators
from django.db import models
from django.utils.translation import ugettext_lazy as _
from members.models import Member
from activemembers.models import Committee
from members.models import Member
class MailingList(models.Model):
......
import hashlib
from django.core.exceptions import PermissionDenied
from django.shortcuts import render, get_object_or_404
from django.http import Http404
from django.shortcuts import get_object_or_404, render
from .models import MailingList
from members.models import Member
from activemembers.models import CommitteeMembership
from members.models import Member
from .models import MailingList
import hashlib
# Consider replacing this completely;
# - either by a cronjob Python script that queries the database directly
......
......@@ -5,11 +5,11 @@ import datetime
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm as BaseUserCreationForm
from django.contrib.auth.models import User
from django.utils.translation import ugettext_lazy as _
from . import models, forms
from . import forms, models
class MembershipInline(admin.StackedInline):
......
import copy
from datetime import datetime
from django.utils import timezone
from rest_framework import viewsets
from rest_framework.decorators import list_route
from datetime import datetime
import copy
from rest_framework.exceptions import ParseError
from rest_framework.response import Response
......
......@@ -4,7 +4,8 @@ from django import forms
from django.contrib.auth.models import User
from django.template import loader
from django.utils import translation
from django.utils.translation import ugettext_lazy as _, ugettext as t
from django.utils.translation import ugettext as t
from django.utils.translation import ugettext_lazy as _
from .models import Member
......
from django.core.files.base import ContentFile
import json
import os
import requests
from bs4 import BeautifulSoup
from django.conf import settings
from django.contrib.auth.models import User
from django.core.exceptions import ImproperlyConfigured
from django.utils.dateparse import parse_date
from django.core.files.base import ContentFile
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from django.utils.dateparse import parse_date
from django.utils.translation import activate
from activemembers.models import (Board, Committee, CommitteeMembership,
Mentorship)
from activemembers.models import (Board, Committee,
CommitteeMembership, Mentorship)
from members.models import Member
from bs4 import BeautifulSoup
import requests
import json
import os
def imagefield_from_url(imagefield, url):
file = ContentFile(requests.get(url).content)
......
from django.utils import timezone
import operator
from datetime import date, timedelta
from functools import reduce
from django.conf import settings
from django.core import validators
from django.db import models
from django.db.models import Q
from django.core import validators
from django.conf import settings
from django.urls import reverse
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from datetime import timedelta, date
import operator
from functools import reduce
from localflavor.generic.countries.sepa import IBAN_SEPA_COUNTRIES
from localflavor.generic.models import IBANField
......
from datetime import datetime, date, timedelta
from datetime import date, datetime, timedelta
from django.contrib.auth.models import User
from django.test import TestCase
from django.utils import timezone
from django.contrib.auth.models import User
from members.models import (Member, Membership,
gen_stats_year, gen_stats_member_type)
gen_stats_member_type, gen_stats_year)
class MemberBirthdayTest(TestCase):
......
......@@ -2,7 +2,6 @@ from django.conf.urls import url
from . import views
urlpatterns = [
url('^become-a-member-document/(?P<pk>[0-9]*)', views.get_become_a_member_document, name='become-a-member-document'),
url('^profile/(?P<pk>[0-9]*)$', views.profile, name='profile'),
......
import json
import os
from datetime import date, datetime
from sendfile import sendfile
import json
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.contrib.auth.decorators import login_required
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from django.db.models import Q
from django.shortcuts import get_object_or_404, render
from django.contrib.auth.decorators import login_required
from django.utils.text import slugify
from sendfile import sendfile
from . import models
from .forms import MemberForm
......
from django.contrib import admin
from utils.translation import TranslatedModelAdmin
from .models import MerchandiseItem
......
import os
from decimal import Decimal
import requests
from bs4 import BeautifulSoup
from django.core.files.base import ContentFile
from django.core.management.base import BaseCommand
from decimal import Decimal
from merchandise.models import MerchandiseItem
from bs4 import BeautifulSoup
import requests
import os
def filefield_from_url(filefield, url):
file = ContentFile(requests.get(url).content)
......
from django.db import models
from utils.translation import MultilingualField, ModelTranslateMeta
from utils.translation import ModelTranslateMeta, MultilingualField
class MerchandiseItem(models.Model, metaclass=ModelTranslateMeta):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment