committed by
Michael Youngstrom
parent
158973ea70
commit
c557379cab
@@ -1,6 +1,8 @@
|
||||
"""
|
||||
Admin module for the rss_proxy djangoapp.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
from django.contrib import admin
|
||||
|
||||
from rss_proxy.models import WhitelistedRssUrl
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from __future__ import absolute_import
|
||||
from django.db import migrations, models
|
||||
import django.utils.timezone
|
||||
import model_utils.fields
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
"""
|
||||
Models for the rss_proxy djangoapp.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
import six
|
||||
from django.db import models
|
||||
from model_utils.models import TimeStampedModel
|
||||
|
||||
@@ -19,4 +22,4 @@ class WhitelistedRssUrl(TimeStampedModel):
|
||||
app_label = "rss_proxy"
|
||||
|
||||
def __unicode__(self):
|
||||
return unicode(self.url)
|
||||
return six.text_type(self.url)
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
"""
|
||||
Tests for the rss_proxy models
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
import six
|
||||
from django.test import TestCase
|
||||
|
||||
from rss_proxy.models import WhitelistedRssUrl
|
||||
@@ -17,4 +20,4 @@ class WhitelistedRssUrlTests(TestCase):
|
||||
"""
|
||||
Test the unicode function returns the url
|
||||
"""
|
||||
self.assertEqual(unicode(self.whitelisted_rss_url), self.whitelisted_rss_url.url)
|
||||
self.assertEqual(six.text_type(self.whitelisted_rss_url), self.whitelisted_rss_url.url)
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
"""
|
||||
Tests for the rss_proxy views
|
||||
"""
|
||||
from __future__ import print_function
|
||||
from django.urls import reverse
|
||||
from __future__ import absolute_import, print_function
|
||||
|
||||
from django.test import TestCase
|
||||
from django.urls import reverse
|
||||
from mock import Mock, patch
|
||||
|
||||
from rss_proxy.models import WhitelistedRssUrl
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
"""
|
||||
URLs for the rss_proxy djangoapp.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
from django.conf.urls import url
|
||||
|
||||
from rss_proxy.views import proxy
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
"""
|
||||
Views for the rss_proxy djangoapp.
|
||||
"""
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import, print_function
|
||||
|
||||
import requests
|
||||
from django.conf import settings
|
||||
from django.core.cache import cache
|
||||
|
||||
Reference in New Issue
Block a user