Skip to content

Commit

Permalink
remove six
Browse files Browse the repository at this point in the history
  • Loading branch information
ebertti committed Aug 27, 2024
1 parent aa14ea3 commit 54b8192
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 33 deletions.
1 change: 0 additions & 1 deletion easy/admin/decorators.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from collections.abc import Iterable
from functools import wraps
from django import utils as django_utils
from django.core.cache import cache as django_cache
Expand Down
4 changes: 3 additions & 1 deletion easy/admin/field.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
from django.contrib.admin.templatetags.admin_urls import admin_urlname
from django.db.models import Model, ImageField as ModelImageField, ForeignKey
from django.conf import settings
from django.forms.utils import flatatt
from django.urls import reverse
from django.utils.html import conditional_escape
from django.template.loader import render_to_string
from django.utils.http import urlencode
from django.utils.safestring import mark_safe
from .decorators import django_cache
from easy.six import reverse, urlencode, flatatt

from easy import helper

Expand Down
7 changes: 3 additions & 4 deletions easy/admin/mixin.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from django.contrib import messages
from django.http.response import HttpResponseRedirect

from easy.six import reverse, url
from django.urls import re_path, reverse


class MixinEasyViews(object):
Expand All @@ -13,10 +12,10 @@ def get_urls(self):
urls = super(MixinEasyViews, self).get_urls()

easy_urls = [
url(r'^(?P<pk>.+)/easy/(?P<action>.+)/$', self.admin_site.admin_view(self.easy_object_view),
re_path(r'^(?P<pk>.+)/easy/(?P<action>.+)/$', self.admin_site.admin_view(self.easy_object_view),
name='%s_%s_easy' % self._get_info()),

url(r'^easy/(?P<action>.+)/$', self.admin_site.admin_view(self.easy_list_view),
re_path(r'^easy/(?P<action>.+)/$', self.admin_site.admin_view(self.easy_list_view),
name='%s_%s_easy' % self._get_info()),
]

Expand Down
24 changes: 0 additions & 24 deletions easy/six.py

This file was deleted.

2 changes: 1 addition & 1 deletion easy/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from django.contrib.sessions.backends.db import SessionStore
from django.http.request import HttpRequest, QueryDict
from django import test
from django.utils.http import urlencode
from django.utils.safestring import SafeData
from easy.six import urlencode
from model_bakery import baker

import easy
Expand Down
5 changes: 3 additions & 2 deletions test_project/urls.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from django.contrib import admin
from easy.six import url
from django.urls import re_path

# from debug_toolbar.toolbar import debug_toolbar_urls


urlpatterns = [
url(r'^admin/', admin.site.urls),
re_path(r'^admin/', admin.site.urls),
] # + debug_toolbar_urls()

0 comments on commit 54b8192

Please sign in to comment.