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

Apply isort to entire codebase

parent 8aacf7db
from django.contrib import admin
from django.shortcuts import redirect
from newsletters.models import Newsletter, NewsletterEvent, NewsletterItem
from utils.translation import TranslatedModelAdmin
from newsletters.models import (
Newsletter,
NewsletterEvent,
NewsletterItem
)
class NewsletterItemInline(admin.StackedInline):
model = NewsletterItem
......
......@@ -3,7 +3,8 @@ from django.db import models
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from tinymce.models import HTMLField
from utils.translation import MultilingualField, ModelTranslateMeta
from utils.translation import ModelTranslateMeta, MultilingualField
class Newsletter(models.Model, metaclass=ModelTranslateMeta):
......
......@@ -5,6 +5,7 @@ from django.core.exceptions import ValidationError
from django.test import TestCase
from django.urls import reverse
from django.utils import timezone
from newsletters.models import Newsletter, NewsletterEvent
......
......@@ -2,7 +2,6 @@ from django.conf.urls import url
from . import views
urlpatterns = [
url('^(?P<pk>\d+)/$', views.preview, name='preview'),
url(r'admin/send/(?P<pk>\d+)/$', views.admin_send, name='admin-send'),
......
......@@ -2,10 +2,11 @@ from django.conf import settings
from django.contrib.admin.views.decorators import staff_member_required
from django.contrib.auth.decorators import login_required, permission_required
from django.core.mail import EmailMultiAlternatives
from django.shortcuts import get_object_or_404, render, redirect
from django.shortcuts import get_object_or_404, redirect, render
from django.template import Context
from django.template.loader import get_template
from django.utils import translation
from members.models import Member
from newsletters.models import Newsletter
from partners.models import Partner
......
from django.contrib import admin
from partners.models import (Partner, PartnerEvent, PartnerImage,
Vacancy, VacancyCategory)
from utils.translation import TranslatedModelAdmin
from partners.models import (
Partner,
PartnerImage,
VacancyCategory,
Vacancy,
PartnerEvent
)
class PartnerImageInline(admin.StackedInline):
model = PartnerImage
......
from datetime import datetime
from django.utils import timezone
from rest_framework import viewsets
from rest_framework.decorators import list_route
from rest_framework.exceptions import ParseError
from rest_framework.response import Response
from rest_framework.decorators import list_route
from django.utils import timezone
from datetime import datetime
from partners.api.serializers import PartnerEventSerializer
from partners.models import Partner, PartnerEvent
......
......@@ -3,7 +3,8 @@ from django.db import models
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from tinymce.models import HTMLField
from utils.translation import MultilingualField, ModelTranslateMeta
from utils.translation import ModelTranslateMeta, MultilingualField
class Partner(models.Model):
......
from random import random
from django.shortcuts import get_object_or_404, render
from partners.models import Partner, Vacancy, VacancyCategory
from random import random
def index(request):
......
from django.contrib import admin
import os
from zipfile import ZipFile
from django import forms
from django.conf import settings
from django.contrib import admin
from django.core.files.base import ContentFile
from .models import Album, Photo
import os
from zipfile import ZipFile
class AlbumForm(forms.ModelForm):
album_archive = forms.FileField(
......
from django.urls import reverse
from django.conf import settings
from django.utils.functional import cached_property
from django.db import models
from PIL import Image
import hashlib
import os
import random
from django.conf import settings
from django.db import models
from django.urls import reverse
from django.utils.functional import cached_property
from PIL import Image
COVER_FILENAME = 'cover.jpg'
......
......@@ -2,7 +2,6 @@ from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^download/(?P<path>.*)', views.download, name='download'),
url(r'^shared-download/(?P<slug>[-\w]+)/(?P<token>[a-zA-Z0-9]+)/(?P<path>.*)', views.shared_download, name='shared-download'),
......
from django.shortcuts import get_object_or_404, render
import os
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from django.http import Http404
from django.conf import settings
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.shortcuts import get_object_or_404, render
from sendfile import sendfile
from .models import Album
from utils.snippets import sanitize_path
from utils.views import _private_thumbnails_unauthed
from sendfile import sendfile
import os
from .models import Album
COVER_FILENAME = 'cover.jpg'
......
from django.contrib import admin
from .models import PizzaEvent, Order, Product
from django.core.urlresolvers import reverse
from django.utils.html import format_html
from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse
from .models import Order, PizzaEvent, Product
admin.site.register(Product)
......
from django.core.exceptions import ValidationError
from django.db import models
from django.utils import timezone
from django.core.exceptions import ValidationError
from utils.translation import MultilingualField, ModelTranslateMeta
from django.utils.translation import ugettext_lazy as _
import events
import members
from utils.translation import ModelTranslateMeta, MultilingualField
class PizzaEvent(models.Model):
......
from django.shortcuts import render, get_object_or_404
from django.views.decorators.http import require_http_methods
from django.http import HttpResponseRedirect, JsonResponse
from django.core.urlresolvers import reverse
from django.contrib import messages
from django.contrib.auth.decorators import permission_required
from django.http import Http404
from django.contrib.auth.decorators import login_required, permission_required
from django.core.urlresolvers import reverse
from django.http import Http404, HttpResponseRedirect, JsonResponse
from django.shortcuts import get_object_or_404, render
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.decorators import login_required
from django.views.decorators.http import require_http_methods
from .models import Product, PizzaEvent, Order
from .forms import AddOrderForm
from .models import Order, PizzaEvent, Product
@login_required
......
from django.db import models
import os
import shutil
import subprocess
from django.conf import settings
from django.core.validators import MinValueValidator
from django.utils.text import slugify
from django.db import models
from django.urls import reverse
from django.utils.text import slugify
from utils.validators import validate_file_extension
import os
import subprocess
import shutil
def thabloid_filename(instance, filename):
ext = os.path.splitext(filename)[1]
......
from django.shortcuts import get_object_or_404, render
from django.db.models import Max
from django.shortcuts import get_object_or_404, render
from .models import Thabloid
......
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
admin.site.site_header = _('Thalia administration')
admin.site.site_title = _('Thalia')
......@@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/dev/ref/settings/
"""
import os
from django.utils.translation import ugettext_lazy as _
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
......
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