diff --git a/colab/proxy/gitlab/admin.py b/colab/proxy/gitlab/admin.py deleted file mode 100644 index 8c38f3f..0000000 --- a/colab/proxy/gitlab/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/colab/proxy/gitlab/models.py b/colab/proxy/gitlab/models.py index 2998b7d..c0bd5e6 100644 --- a/colab/proxy/gitlab/models.py +++ b/colab/proxy/gitlab/models.py @@ -1,6 +1,5 @@ from django.db import models -from django.conf import settings -from colab.accounts.models import User + class GitlabProject(models.Model): diff --git a/colab/proxy/gitlab/tests.py b/colab/proxy/gitlab/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/colab/proxy/gitlab/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/colab/proxy/jenkins/admin.py b/colab/proxy/jenkins/admin.py deleted file mode 100644 index 8c38f3f..0000000 --- a/colab/proxy/jenkins/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/colab/proxy/jenkins/models.py b/colab/proxy/jenkins/models.py index 71a8362..e69de29 100644 --- a/colab/proxy/jenkins/models.py +++ b/colab/proxy/jenkins/models.py @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/colab/proxy/jenkins/tests.py b/colab/proxy/jenkins/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/colab/proxy/jenkins/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/colab/proxy/jenkins/views.py b/colab/proxy/jenkins/views.py index e7ab64e..5555788 100644 --- a/colab/proxy/jenkins/views.py +++ b/colab/proxy/jenkins/views.py @@ -1,6 +1,4 @@ -from django.conf import settings - from ..utils.views import ColabProxyView diff --git a/colab/proxy/noosfero/admin.py b/colab/proxy/noosfero/admin.py deleted file mode 100644 index 8c38f3f..0000000 --- a/colab/proxy/noosfero/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/colab/proxy/noosfero/models.py b/colab/proxy/noosfero/models.py index 71a8362..e69de29 100644 --- a/colab/proxy/noosfero/models.py +++ b/colab/proxy/noosfero/models.py @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/colab/proxy/noosfero/tests.py b/colab/proxy/noosfero/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/colab/proxy/noosfero/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/colab/proxy/redmine/admin.py b/colab/proxy/redmine/admin.py deleted file mode 100644 index 8c38f3f..0000000 --- a/colab/proxy/redmine/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/colab/proxy/redmine/models.py b/colab/proxy/redmine/models.py index 71a8362..e69de29 100644 --- a/colab/proxy/redmine/models.py +++ b/colab/proxy/redmine/models.py @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/colab/proxy/redmine/tests.py b/colab/proxy/redmine/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/colab/proxy/redmine/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/colab/proxy/redmine/views.py b/colab/proxy/redmine/views.py index 34f6f06..de1994e 100644 --- a/colab/proxy/redmine/views.py +++ b/colab/proxy/redmine/views.py @@ -1,6 +1,4 @@ -from django.conf import settings - from ..utils.views import ColabProxyView diff --git a/colab/proxy/trac/admin.py b/colab/proxy/trac/admin.py index 6127dc7..bb4382f 100644 --- a/colab/proxy/trac/admin.py +++ b/colab/proxy/trac/admin.py @@ -1,3 +1 @@ -from django.contrib import admin - -from . import signals +from . import signals # noqa diff --git a/colab/proxy/trac/routers.py b/colab/proxy/trac/routers.py index 9d053cb..37a8ee9 100644 --- a/colab/proxy/trac/routers.py +++ b/colab/proxy/trac/routers.py @@ -11,7 +11,7 @@ class TracRouter(object): def allow_relation(self, obj1, obj2, **hints): if obj1._meta.app_label == 'proxy' or \ - obj2._meta.app_label == 'proxy': + obj2._meta.app_label == 'proxy': return True return None diff --git a/colab/proxy/trac/search_indexes.py b/colab/proxy/trac/search_indexes.py index a4c0e97..0e0923f 100644 --- a/colab/proxy/trac/search_indexes.py +++ b/colab/proxy/trac/search_indexes.py @@ -1,10 +1,8 @@ # -*- coding: utf-8 -*- -import math import string from django.template import loader, Context -from django.utils.text import slugify from haystack import indexes from haystack.utils import log as logging @@ -15,7 +13,7 @@ from .models import Attachment, Ticket, Wiki, Revision logger = logging.getLogger('haystack') # the string maketrans always return a string encoded with latin1 -# http://stackoverflow.com/questions/1324067/how-do-i-get-str-translate-to-work-with-unicode-strings +# http://stackoverflow.com/questions/1324067/how-do-i-get-str-translate-to-work-with-unicode-strings # noqa table = string.maketrans( string.punctuation, '.' * len(string.punctuation) diff --git a/colab/proxy/trac/signals.py b/colab/proxy/trac/signals.py index 62eb17c..cb0d4d1 100644 --- a/colab/proxy/trac/signals.py +++ b/colab/proxy/trac/signals.py @@ -12,22 +12,22 @@ def change_session_attribute_email(sender, instance, **kwargs): cursor.execute(("UPDATE session_attribute SET value=%s " "WHERE name='email' AND sid=%s"), - [instance.email, instance.username]) + [instance.email, instance.username]) cursor.execute(("UPDATE session_attribute SET value=%s " "WHERE name='name' AND sid=%s"), - [instance.get_full_name(), instance.username]) + [instance.get_full_name(), instance.username]) cursor.execute(("INSERT INTO session_attribute " "(sid, authenticated, name, value) " "SELECT %s, '1', 'email', %s WHERE NOT EXISTS " "(SELECT 1 FROM session_attribute WHERE sid=%s " "AND name='email')"), - [instance.username, instance.email, instance.username]) + [instance.username, instance.email, instance.username]) cursor.execute(("INSERT INTO session_attribute " "(sid, authenticated, name, value) " "SELECT %s, '1', 'name', %s WHERE NOT EXISTS " "(SELECT 1 FROM session_attribute WHERE sid=%s " "AND name='name')"), - [instance.username, instance.get_full_name(), - instance.username]) + [instance.username, instance.get_full_name(), + instance.username]) diff --git a/colab/proxy/trac/tests.py b/colab/proxy/trac/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/colab/proxy/trac/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/colab/proxy/trac/views.py b/colab/proxy/trac/views.py index d7291e4..c189e91 100644 --- a/colab/proxy/trac/views.py +++ b/colab/proxy/trac/views.py @@ -1,6 +1,4 @@ -from django.conf import settings - from hitcounter.views import HitCounterViewMixin from ..utils.views import ColabProxyView -- libgit2 0.21.2