Skip to content

Commit

Permalink
project isorted
Browse files Browse the repository at this point in the history
  • Loading branch information
YuriyCherniy committed Aug 9, 2022
1 parent 087c1bc commit acbfa97
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
3 changes: 2 additions & 1 deletion short_urls/admin.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from email.headerregistry import Group

from django.contrib import admin
from django.contrib.auth.models import Group

from short_urls.models import Url, ForbiddenDomain
from short_urls.models import ForbiddenDomain, Url

admin.site.register(Url)
admin.site.register(ForbiddenDomain)
Expand Down
2 changes: 1 addition & 1 deletion short_urls/migrations/0024_forbiddendomain_created.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Generated by Django 3.2.14 on 2022-08-09 19:27

from django.db import migrations, models
import django.utils.timezone
from django.db import migrations, models


class Migration(migrations.Migration):
Expand Down
3 changes: 1 addition & 2 deletions short_urls/services.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from random import randint

from hashids import Hashids

from django.contrib.auth.hashers import make_password
from hashids import Hashids

from short_urls.models import Url

Expand Down
3 changes: 2 additions & 1 deletion short_urls/tests/test_model.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from tracemalloc import DomainFilter

from django.test import TestCase

from short_urls.models import Url, ForbiddenDomain
from short_urls.models import ForbiddenDomain, Url


class UrlModelTestCase(TestCase):
Expand Down
6 changes: 4 additions & 2 deletions short_urls/tests/test_validators.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from django.test import TestCase
from django.core.exceptions import ValidationError
from short_urls.validators import LzyURLValidator
from django.test import TestCase

from short_urls.models import ForbiddenDomain
from short_urls.validators import LzyURLValidator


class LzyURLValidatorTestCase(TestCase):

Expand Down
4 changes: 2 additions & 2 deletions short_urls/tests/test_views.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from django.contrib.auth.hashers import make_password
from django.test import Client, TestCase
from django.urls import reverse
from django.contrib.auth.hashers import make_password

from short_urls.models import Url, ForbiddenDomain
from short_urls.models import ForbiddenDomain, Url
from short_urls.views import UrlOpen


Expand Down
2 changes: 1 addition & 1 deletion short_urls/views.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from django.contrib.auth.hashers import check_password
from django.core.validators import ValidationError
from django.db.models import F
from django.shortcuts import get_object_or_404, redirect, render
from django.views import View
from django.views.generic import TemplateView
from django.contrib.auth.hashers import check_password

from short_urls.forms import UrlCreateForm
from short_urls.models import Url
Expand Down

0 comments on commit acbfa97

Please sign in to comment.