Moved the editor app so its inside the categories app
15
README.rst
|
|
@ -2,6 +2,21 @@ 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.
|
||||
|
||||
Updated in 0.8.8
|
||||
================
|
||||
|
||||
The `editor` app was placed inside the categories app, `categories.editor`, to avoid any name clashes.
|
||||
|
||||
Upgrading
|
||||
---------
|
||||
|
||||
A setting change is all that is needed::
|
||||
|
||||
INSTALLED_APPS = (
|
||||
'categories',
|
||||
'categories.editor',
|
||||
)
|
||||
|
||||
New in 0.8
|
||||
==========
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
__version_info__ = {
|
||||
'major': 0,
|
||||
'minor': 8,
|
||||
'micro': 7,
|
||||
'micro': 8,
|
||||
'releaselevel': 'final',
|
||||
'serial': 1
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,12 +2,13 @@ from django.contrib import admin
|
|||
from django import forms
|
||||
from django.template.defaultfilters import slugify
|
||||
|
||||
from editor.tree_editor import TreeEditor
|
||||
from genericcollection import GenericCollectionTabularInline
|
||||
|
||||
from settings import ALLOW_SLUG_CHANGE, RELATION_MODELS, JAVASCRIPT_URL
|
||||
from .settings import ALLOW_SLUG_CHANGE, RELATION_MODELS, JAVASCRIPT_URL
|
||||
from .editor.tree_editor import TreeEditor
|
||||
from .models import Category
|
||||
from categories import model_registry
|
||||
from models import Category
|
||||
|
||||
|
||||
class NullTreeNodeChoiceField(forms.ModelChoiceField):
|
||||
"""A ModelChoiceField for tree nodes."""
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
|
@ -4,7 +4,7 @@ from django.contrib.admin.templatetags.admin_list import result_headers
|
|||
try:
|
||||
from django.contrib.admin.util import lookup_field, display_for_field, label_for_field
|
||||
except ImportError:
|
||||
from editor.utils import lookup_field, display_for_field, label_for_field
|
||||
from categories.editor.utils import lookup_field, display_for_field, label_for_field
|
||||
from django.contrib.admin.views.main import EMPTY_CHANGELIST_VALUE
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
from django.utils.encoding import smart_unicode, force_unicode
|
||||
|
|
@ -1,8 +1,6 @@
|
|||
from django.db.models import ForeignKey, ManyToManyField
|
||||
|
||||
from categories.models import Category
|
||||
|
||||
|
||||
from .models import Category
|
||||
|
||||
class CategoryM2MField(ManyToManyField):
|
||||
def __init__(self, **kwargs):
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ from django.db import models, DatabaseError
|
|||
|
||||
from south.db import db
|
||||
from south.signals import post_migrate
|
||||
from categories.fields import CategoryM2MField, CategoryFKField
|
||||
from categories.models import Category
|
||||
from .fields import CategoryM2MField, CategoryFKField
|
||||
from .models import Category
|
||||
from categories import model_registry, field_registry
|
||||
|
||||
def migrate_app(app, *args, **kwargs):
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ from django.utils.translation import ugettext as _
|
|||
|
||||
from mptt.models import MPTTModel
|
||||
|
||||
from settings import (RELATION_MODELS, RELATIONS, THUMBNAIL_UPLOAD_PATH,
|
||||
from .settings import (RELATION_MODELS, RELATIONS, THUMBNAIL_UPLOAD_PATH,
|
||||
THUMBNAIL_STORAGE)
|
||||
|
||||
STORAGE = get_storage_class(THUMBNAIL_STORAGE)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from django.conf.urls.defaults import *
|
||||
from categories.models import Category
|
||||
from .models import Category
|
||||
|
||||
categorytree_dict = {
|
||||
'queryset': Category.objects.filter(level=0)
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ from django.views.decorators.cache import cache_page
|
|||
from django.template.loader import select_template
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
from categories.models import Category
|
||||
from settings import CACHE_VIEW_LENGTH
|
||||
from .models import Category
|
||||
from .settings import CACHE_VIEW_LENGTH
|
||||
|
||||
@cache_page(CACHE_VIEW_LENGTH)
|
||||
def category_detail(request, path,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ Installation
|
|||
INSTALLED_APPS = [
|
||||
# ...
|
||||
"categories",
|
||||
"editor",
|
||||
"categories.editor",
|
||||
]
|
||||
|
||||
3. Run ``./manage.py syncdb`` (or ``./manage.py migrate categories`` if you are using `South <http://south.aeracode.org/>`_)
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ INSTALLED_APPS = (
|
|||
'django.contrib.staticfiles',
|
||||
'django.contrib.flatpages',
|
||||
'categories',
|
||||
'editor',
|
||||
'categories.editor',
|
||||
'mptt',
|
||||
'simpletext',
|
||||
'south',
|
||||
|
|
|
|||