Permalink
Browse files

Merge branch 'natsumi'

  • Loading branch information...
2 parents 1c7e98b + 03f2b2a commit 0d49d5af28fdc0bbf25e03a07cd0d1703c3f2d01 @bryanveloso bryanveloso committed Jun 22, 2008
View
@@ -1,2 +1,3 @@
*.pyc
-.DS_Store
+.DS_Store
+plugables.py
@@ -8,8 +8,8 @@
from django.contrib.sitemaps import ping_google
from managers import *
-from template_utils.markup import formatter
-from typogrify.templatetags.typogrify import typogrify
+from applications.template_utils.markup import formatter
+from applications.typogrify.templatetags.typogrify import typogrify
class Entry(models.Model):
@@ -46,7 +46,7 @@ class Entry(models.Model):
footnotes_processed = models.TextField('Processed Footnotes', blank=True, editable=False)
# Options
- status = models.PositiveSmallIntegerField(choices=STATUS_CHOICES, default=LIVE_STATUS, radio_admin=True, help_text='Select the status of this blog entry.')
+ status = models.PositiveSmallIntegerField(choices=STATUS_CHOICES, default=LIVE_STATUS, help_text='Select the status of this blog entry.')
enable_comments = models.BooleanField('Comments?', default=True, help_text='Select \'True\' if you wish to enable visitors to comment on this entry.')
# Mangers
@@ -1,2 +1,2 @@
# Administration
-from blog import admin
+import admin
@@ -5,7 +5,7 @@
from django.dispatch import dispatcher
from django.contrib.contenttypes.models import ContentType
-from tagging.fields import TagField
+from applications.tagging.fields import TagField
class ItemManager(models.Manager):
@@ -3,7 +3,7 @@
from django.contrib.contenttypes.generic import GenericForeignKey
from managers import ItemManager
-from tagging.fields import TagField
+from applications.tagging.fields import TagField
class Item(models.Model):
@@ -1,5 +1,5 @@
# Administration
-from core import admin
+import admin
# Core Template Tags
from django import template
@@ -8,8 +8,8 @@
template.add_to_builtins('django.templatetags.cache')
# 3rd Party Template Tags
-template.add_to_builtins('typogrify.templatetags.typogrify')
-template.add_to_builtins('template_utils.templatetags.comparison')
-template.add_to_builtins('template_utils.templatetags.feeds')
-template.add_to_builtins('template_utils.templatetags.generic_content')
-template.add_to_builtins('template_utils.templatetags.generic_markup')
+template.add_to_builtins('applications.typogrify.templatetags.typogrify')
+template.add_to_builtins('applications.template_utils.templatetags.comparison')
+template.add_to_builtins('applications.template_utils.templatetags.feeds')
+template.add_to_builtins('applications.template_utils.templatetags.generic_content')
+template.add_to_builtins('applications.template_utils.templatetags.generic_markup')
@@ -5,7 +5,7 @@
from django.utils import text
#from core.models import Item
-from tagging.fields import TagField
+from applications.tagging.fields import TagField
class Developer(models.Model):
@@ -1,2 +1,2 @@
# Administration
-from projects import admin
+import admin
@@ -1,6 +1,6 @@
from django.utils.translation import ugettext as _
-from tagging.managers import ModelTaggedItemManager, TagDescriptor
+from managers import ModelTaggedItemManager, TagDescriptor
VERSION = (0, 3, 'pre')
@@ -6,10 +6,10 @@
from django.dispatch import dispatcher
from django.utils.translation import ugettext_lazy as _
-from tagging import settings
-from tagging.models import Tag
-from tagging.utils import edit_string_for_tags
-from tagging.validators import isTagList
+import settings
+from models import Tag
+from utils import edit_string_for_tags
+from validators import isTagList
class TagField(CharField):
"""
@@ -104,7 +104,7 @@ def get_internal_type(self):
return 'CharField'
def formfield(self, **kwargs):
- from tagging import forms
+ import forms
defaults = {'form_class': forms.TagField}
defaults.update(kwargs)
return super(TagField, self).formfield(**defaults)
@@ -4,8 +4,8 @@
from django import newforms as forms
from django.utils.translation import ugettext as _
-from tagging import settings
-from tagging.utils import parse_tag_input
+import settings
+from utils import parse_tag_input
class TagField(forms.CharField):
"""
@@ -5,7 +5,7 @@
from django.contrib.contenttypes.models import ContentType
from django.db import models
-from tagging.models import Tag, TaggedItem
+from models import Tag, TaggedItem
class ModelTagManager(models.Manager):
"""
@@ -11,10 +11,10 @@
from django.db.models.query import QuerySet
from django.utils.translation import ugettext_lazy as _
-from tagging import settings
-from tagging.utils import calculate_cloud, get_tag_list, get_queryset_and_model, parse_tag_input
-from tagging.utils import LOGARITHMIC
-from tagging.validators import isTag
+import settings
+from utils import calculate_cloud, get_tag_list, get_queryset_and_model, parse_tag_input
+from utils import LOGARITHMIC
+from validators import isTag
qn = connection.ops.quote_name
@@ -2,8 +2,8 @@
from django.template import Library, Node, TemplateSyntaxError, Variable, resolve_variable
from django.utils.translation import ugettext as _
-from tagging.models import Tag, TaggedItem
-from tagging.utils import LINEAR, LOGARITHMIC
+from models import Tag, TaggedItem
+from utils import LINEAR, LOGARITHMIC
register = Library()
@@ -1,6 +1,6 @@
from django.db import models
-from tagging.fields import TagField
+from fields import TagField
class Perch(models.Model):
size = models.IntegerField()
@@ -2,13 +2,13 @@
tests = r"""
>>> import os
>>> from django import newforms as forms
->>> from tagging.forms import TagField
->>> from tagging import settings
->>> from tagging.models import Tag, TaggedItem
->>> from tagging.tests.models import Article, Link, Perch, Parrot, FormTest
->>> from tagging.utils import calculate_cloud, get_tag_list, get_tag, parse_tag_input
->>> from tagging.utils import LINEAR
->>> from tagging.validators import isTagList, isTag
+>>> from forms import TagField
+>>> import settings
+>>> from models import Tag, TaggedItem
+>>> from tests.models import Article, Link, Perch, Parrot, FormTest
+>>> from utils import calculate_cloud, get_tag_list, get_tag, parse_tag_input
+>>> from utils import LINEAR
+>>> from validators import isTagList, isTag
#############
# Utilities #
@@ -412,7 +412,7 @@
>>> spaces = Tag.objects.create(name='spa ces')
>>> comma = Tag.objects.create(name='com,ma')
->>> from tagging.utils import edit_string_for_tags
+>>> from utils import edit_string_for_tags
>>> edit_string_for_tags([plain])
u'plain'
>>> edit_string_for_tags([plain, spaces])
@@ -157,7 +157,7 @@ def get_tag_list(tags):
* A ``Tag`` ``QuerySet``.
"""
- from tagging.models import Tag
+ from models import Tag
if isinstance(tags, Tag):
return [tags]
elif isinstance(tags, QuerySet) and tags.model is Tag:
@@ -199,7 +199,7 @@ def get_tag(tag):
If no matching tag can be found, ``None`` will be returned.
"""
- from tagging.models import Tag
+ from models import Tag
if isinstance(tag, Tag):
return tag
@@ -6,8 +6,8 @@
from django.core.validators import ValidationError
from django.utils.translation import ugettext as _
-from tagging import settings
-from tagging.utils import parse_tag_input
+import settings
+from utils import parse_tag_input
def isTagList(field_data, all_data):
"""
@@ -5,8 +5,8 @@
from django.utils.translation import ugettext as _
from django.views.generic.list_detail import object_list
-from tagging.models import Tag, TaggedItem
-from tagging.utils import get_tag, get_queryset_and_model
+from models import Tag, TaggedItem
+from utils import get_tag, get_queryset_and_model
def tagged_object_list(request, queryset_or_model=None, tag=None,
related_tags=False, related_tag_counts=True, **kwargs):
@@ -12,7 +12,7 @@
from django import template
from django.template.loader import render_to_string
-from template_utils.nodes import ContextUpdatingNode
+from applications.template_utils.nodes import ContextUpdatingNode
class FeedIncludeNode(template.Node):
@@ -7,7 +7,7 @@
from django import template
from django.db.models import get_model
-from template_utils.nodes import ContextUpdatingNode, GenericContentNode
+from applications.template_utils.nodes import ContextUpdatingNode, GenericContentNode
class RandomObjectsNode(GenericContentNode):
View
@@ -1,4 +1,4 @@
-import os
+import os.path
# Getting Started
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
@@ -27,7 +27,6 @@
# Middleware
MIDDLEWARE_CLASSES = (
- 'django.middleware.gzip.GZipMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.http.SetRemoteAddrFromForwardedFor',
'django.contrib.sessions.middleware.SessionMiddleware',
@@ -39,11 +38,20 @@
USE_ETAGS = True
APPEND_SLASH = True
+
# Template Settings
+MARKUP_FILTER = ('markdown', {})
+TEMPLATE_DIRS = (
+ os.path.join(os.path.dirname(__file__), 'templates'),
+)
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
)
# Import Local Settings
-from plugables import *
+try:
+ from plugables import *
+except ImportError:
+ pass
+

0 comments on commit 0d49d5a

Please sign in to comment.