Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrated to 3.6 #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions accountsplus/admin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

import django.core.exceptions
import django.shortcuts
import django.http
Expand All @@ -21,8 +19,8 @@
from django.conf import settings
from django.apps import apps

import signals
import models
from . import signals
from . import models


sensitive_post_parameters_m = django.utils.decorators.method_decorator(
Expand Down Expand Up @@ -185,7 +183,7 @@ def reset_passwords(self, request, queryset):
reset_passwords.short_description = 'Send password reset emails to selected Users'

def get_timezone(self, obj):
return unicode(obj.timezone)
return str(obj.timezone)

def masquerade(self, obj):
return '<a href="{}">sign in</a>'.format(django.urls.reverse('masquerade', kwargs={'user_id': obj.id}))
Expand Down Expand Up @@ -314,7 +312,7 @@ def queryset(self, request, queryset):
return queryset

def lookups(self, request, model_admin):
return LogEntryAdmin.ACTION_NAMES.items()
return list(LogEntryAdmin.ACTION_NAMES.items())


@django.contrib.admin.register(django.contrib.admin.models.LogEntry)
Expand Down
2 changes: 0 additions & 2 deletions accountsplus/apps.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

from django.apps import AppConfig


Expand Down
2 changes: 0 additions & 2 deletions accountsplus/context_processors.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals


def masquerade_info(request):
if request.user.is_authenticated():
Expand Down
2 changes: 0 additions & 2 deletions accountsplus/forms.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

import django.forms
from django.conf import settings
from django.apps import apps
Expand Down
1 change: 0 additions & 1 deletion accountsplus/middleware.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import unicode_literals
import django.utils.timezone
from django.utils.deprecation import MiddlewareMixin

Expand Down
2 changes: 0 additions & 2 deletions accountsplus/models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

import logging

from django.utils.translation import ugettext_lazy as _
Expand Down
2 changes: 0 additions & 2 deletions accountsplus/signals.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

import django.contrib.auth.signals
from django.dispatch import receiver, Signal
from django.conf import settings
Expand Down
5 changes: 1 addition & 4 deletions accountsplus/tests/test_admin.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
from __future__ import unicode_literals

import django.test
import django.contrib.admin

import logging

from .. import admin
from test_models import (UnitTestCompany, UnitTestUser, UnitTestAuditLogEvent, )
from .test_models import (UnitTestCompany, UnitTestUser, UnitTestAuditLogEvent, )


logging.disable(logging.CRITICAL)
Expand Down
2 changes: 1 addition & 1 deletion accountsplus/tests/test_context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import django.test.client
import django.utils.timezone

from test_models import (UnitTestCompany, UnitTestUser)
from .test_models import (UnitTestCompany, UnitTestUser)


logging.disable(logging.CRITICAL)
Expand Down
2 changes: 1 addition & 1 deletion accountsplus/tests/test_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import pytz

from .. import middleware
from test_models import (UnitTestCompany, UnitTestUser, )
from .test_models import (UnitTestCompany, UnitTestUser, )


logging.disable(logging.CRITICAL)
Expand Down
2 changes: 0 additions & 2 deletions accountsplus/tests/test_models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

import django.test
import django.core.mail
import django.db.models
Expand Down
4 changes: 1 addition & 3 deletions accountsplus/tests/test_signals.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

import django.test
import django.test.utils

Expand All @@ -10,7 +8,7 @@
import accountsplus.signals

from .. import signals, models
from test_models import (UnitTestCompany, UnitTestUser, UnitTestAuditLogEvent)
from .test_models import (UnitTestCompany, UnitTestUser, UnitTestAuditLogEvent)

logging.disable(logging.CRITICAL)

Expand Down
2 changes: 0 additions & 2 deletions accountsplus/tests/test_urls.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

import django.test
import django.shortcuts
import django.conf.urls
Expand Down
5 changes: 1 addition & 4 deletions accountsplus/tests/test_views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

import django.test
import django.test.utils
import django.test.client
Expand All @@ -9,8 +7,7 @@

import logging

from test_models import (UnitTestCompany, UnitTestUser)
import test_admin
from .test_models import (UnitTestCompany, UnitTestUser)


logging.disable(logging.CRITICAL)
Expand Down
6 changes: 2 additions & 4 deletions accountsplus/urls.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
from __future__ import unicode_literals

import django.conf.urls
from django.contrib.auth.urls import url
import django.contrib.auth.views

import views
import forms
from . import views
from . import forms

urlpatterns = [
url(r'^logout/$', views.logout_then_login, name='logout'),
Expand Down
7 changes: 3 additions & 4 deletions accountsplus/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import unicode_literals
import logging

from django.utils.translation import ugettext as _
Expand All @@ -19,9 +18,9 @@

from axes import utils

import signals
import forms
import settings
from . import signals
from . import forms
from . import settings


logger = logging.getLogger(__name__)
Expand Down
1 change: 0 additions & 1 deletion settings_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import unicode_literals
import os


Expand Down
2 changes: 0 additions & 2 deletions urls.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

import django.conf.urls
import django.contrib.admin

Expand Down