Skip to content

Adding Django 1.6 support #20

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

Open
wants to merge 2 commits 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
15 changes: 6 additions & 9 deletions example/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@
sys.stderr.write("django-faq isn't installed; trying to use a source checkout in ../faq.")
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))

from django.core.management import execute_manager
try:
import settings # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
sys.exit(1)

if __name__ == "__main__":
execute_manager(settings)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example.settings")

from django.core.management import execute_from_command_line

execute_from_command_line(sys.argv)

2 changes: 1 addition & 1 deletion example/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.conf.urls.defaults import patterns, url, include
from django.conf.urls import patterns, url, include
from django.contrib import admin; admin.autodiscover()
from django.conf import settings
from django.views.generic import TemplateView
Expand Down
2 changes: 1 addition & 1 deletion faq/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from django.conf.urls.defaults import *
from django.conf.urls import *
from . import views as faq_views

urlpatterns = patterns('',
Expand Down