Browse Source

Fix settings import

According to django 1.5 documentation, settings should be imported as
>>> from django.conf import settings
pull/1/head
Hidden Z 11 years ago
parent
commit
43bcfec7ed
  1. 2
      pyi2phosts/jump/views.py
  2. 3
      pyi2phosts/latest/views.py
  3. 3
      pyi2phosts/lib/generic.py
  4. 4
      pyi2phosts/lib/rss.py
  5. 2
      pyi2phosts/postkey/views.py
  6. 3
      pyi2phosts/urls.py

2
pyi2phosts/jump/views.py

@ -3,10 +3,10 @@ import re @@ -3,10 +3,10 @@ import re
from django.shortcuts import render_to_response
from django.shortcuts import redirect
from django.core.exceptions import ValidationError
from django.conf import settings
from pyi2phosts.postkey.models import i2phost
from pyi2phosts.lib.validation import validate_hostname
import settings
def jumper(request, host):
"""Actually do jumps."""

3
pyi2phosts/latest/views.py

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
import datetime
import settings
from django.conf import settings
from pyi2phosts.postkey.models import i2phost
from pyi2phosts.lib.generic import HostsListsView

3
pyi2phosts/lib/generic.py

@ -1,14 +1,13 @@ @@ -1,14 +1,13 @@
from django.views.generic.base import TemplateView
from django.views.generic.list import ListView
from django.core.paginator import Paginator
from django.conf import settings
from pyi2phosts.lib.utils import get_b32
from pyi2phosts.extsources.models import ExternalSource
from pyi2phosts.postkey.models import i2phost
from pyi2phosts.postkey.templatetags import paginator
import settings
class LocalTemplateView(TemplateView):
""" Renders some template with passing some local config variables """

4
pyi2phosts/lib/rss.py

@ -1,9 +1,9 @@ @@ -1,9 +1,9 @@
from django.contrib.syndication.views import Feed
from django.conf import settings
from pyi2phosts.postkey.models import i2phost
from pyi2phosts.latest.views import get_latest
import settings
class AliveHostsFeed(Feed):
""" Generate RSS feed with all alive hosts """

2
pyi2phosts/postkey/views.py

@ -8,9 +8,9 @@ from django import forms @@ -8,9 +8,9 @@ from django import forms
from django.shortcuts import render_to_response
from django.shortcuts import redirect
from django.template import RequestContext
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
import settings
from pyi2phosts.postkey.models import i2phost
from pyi2phosts.lib.utils import get_logger
from pyi2phosts.lib.validation import validate_hostname

3
pyi2phosts/urls.py

@ -4,11 +4,12 @@ from django.conf.urls.defaults import * @@ -4,11 +4,12 @@ from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
from django.conf import settings
from pyi2phosts.lib.rss import AliveHostsFeed
from pyi2phosts.lib.generic import LocalTemplateView
from pyi2phosts.lib.generic import FaqView
from pyi2phosts.lib.generic import HostsListsView
import settings
urlpatterns = patterns('',

Loading…
Cancel
Save