From 7c73bd51c42f7b4aed982659118270b104dad827 Mon Sep 17 00:00:00 2001 From: Corey Oordt Date: Thu, 7 May 2015 07:57:46 -0500 Subject: [PATCH] Removing outdated settings and updating outdated files --- .travis.yml | 1 - README.rst | 6 +++++ example/manage.py | 2 +- example/settings.py | 60 ++++++++++++++----------------------------- example/settings13.py | 16 ------------ example/settings14.py | 15 ----------- requirements.txt | 2 +- 7 files changed, 27 insertions(+), 75 deletions(-) delete mode 100644 example/settings13.py delete mode 100644 example/settings14.py diff --git a/.travis.yml b/.travis.yml index 6f4eaee..a4343ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: python python: - - "2.6" - "2.7" env: - DJANGO_VERSION=1.6.11 diff --git a/README.rst b/README.rst index 287bed1..bf68e9c 100644 --- a/README.rst +++ b/README.rst @@ -13,6 +13,12 @@ Django Categories grew out of our need to provide a basic hierarchical taxonomy As a news site, our stories, photos, and other content get divided into "sections" and we wanted all the apps to use the same set of sections. As our needs grew, the Django Categories grew in the functionality it gave to category handling within web pages. +New in 1.3 +========== + +* Support for Django 1.6, 1.7 and 1.8 +* Dropped support for Django versions 1.5 and below + New in 1.2 ========== diff --git a/example/manage.py b/example/manage.py index 2605e37..f9726f9 100755 --- a/example/manage.py +++ b/example/manage.py @@ -3,7 +3,7 @@ import os import sys if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example.settings") + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") from django.core.management import execute_from_command_line diff --git a/example/settings.py b/example/settings.py index d5d3f51..8e5aa31 100644 --- a/example/settings.py +++ b/example/settings.py @@ -26,61 +26,46 @@ DATABASES = { } } -# Local time zone for this installation. Choices can be found here: -# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name -# although not all choices may be available on all operating systems. -# If running in a Windows environment this must be set to the same as your -# system time zone. +INSTALLED_APPS = ( + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'django.contrib.flatpages', + 'categories', + 'categories.editor', + 'mptt', + 'simpletext', +) + TIME_ZONE = 'America/Chicago' -# Language code for this installation. All choices can be found here: -# http://www.i18nguy.com/unicode/language-identifiers.html LANGUAGE_CODE = 'en-us' SITE_ID = 1 -# If you set this to False, Django will make some optimizations so as not -# to load the internationalization machinery. USE_I18N = True -# Absolute filesystem path to the directory that will hold user-uploaded files. -# Example: "/home/media/media.lawrence.com/media/" MEDIA_ROOT = os.path.abspath(os.path.join(PROJ_ROOT, 'media', 'uploads')) -# URL that handles the media served from MEDIA_ROOT. Make sure to use a -# trailing slash. -# Examples: "http://media.lawrence.com/media/", "http://example.com/media/" MEDIA_URL = '/uploads/' -# Absolute path to the directory static files should be collected to. -# Don't put anything in this directory yourself; store your static files -# in apps' "static/" subdirectories and in STATICFILES_DIRS. -# Example: "/home/media/media.lawrence.com/static/" STATIC_ROOT = os.path.abspath(os.path.join(PROJ_ROOT, 'media', 'static')) -# URL prefix for static files. -# Example: "http://media.lawrence.com/static/" STATIC_URL = '/static/' -# Additional locations of static files -STATICFILES_DIRS = ( - # Put strings here, like "/home/html/static" or "C:/www/django/static". - # Always use forward slashes, even on Windows. - # Don't forget to use absolute paths, not relative paths. -) +STATICFILES_DIRS = () -# List of finder classes that know how to find static files in -# various locations. STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', -# 'django.contrib.staticfiles.finders.DefaultStorageFinder', ) -# Make this unique, and don't share it with anybody. SECRET_KEY = 'bwq#m)-zsey-fs)0#4*o=2z(v5g!ei=zytl9t-1hesh4b&-u^d' -# List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', @@ -94,12 +79,9 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.messages.middleware.MessageMiddleware', ) -ROOT_URLCONF = 'example.urls' +ROOT_URLCONF = 'urls' TEMPLATE_DIRS = ( - # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". - # Always use forward slashes, even on Windows. - # Don't forget to use absolute paths, not relative paths. os.path.abspath(os.path.join(os.path.dirname(__file__), 'templates')), ) @@ -123,9 +105,5 @@ CATEGORIES_SETTINGS = { }, } -TEST_RUNNER = 'django.test.runner.DiscoverRunner' - -if django.VERSION[1] >= 4: - from settings14 import * -if django.VERSION[1] == 3: - from settings13 import * +if django.VERSION[1] > 5: + TEST_RUNNER = 'django.test.runner.DiscoverRunner' diff --git a/example/settings13.py b/example/settings13.py deleted file mode 100644 index 25145b1..0000000 --- a/example/settings13.py +++ /dev/null @@ -1,16 +0,0 @@ -ADMIN_MEDIA_PREFIX = '/static/admin/' - -INSTALLED_APPS = ( - 'django.contrib.admin', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.sites', - 'django.contrib.staticfiles', - 'django.contrib.flatpages', - 'categories', - 'categories.editor', - 'mptt', - 'simpletext', - # 'south', -) diff --git a/example/settings14.py b/example/settings14.py deleted file mode 100644 index 0c9163f..0000000 --- a/example/settings14.py +++ /dev/null @@ -1,15 +0,0 @@ -INSTALLED_APPS = ( - 'django.contrib.admin', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.sites', - 'django.contrib.messages', - 'django.contrib.staticfiles', - 'django.contrib.flatpages', - 'categories', - 'categories.editor', - 'mptt', - 'simpletext', - # 'south', -) diff --git a/requirements.txt b/requirements.txt index bc7bd6c..38a3a73 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -django-mptt>=0.5.2 +django-mptt>=0.6,<0.7 unicode-slugify==0.1.1