Permalink
Browse files

Seems like my server doesn't like the way django-tagging is being imp…

…orted. Fixing that.
  • Loading branch information...
1 parent 5d223c6 commit 834146aaa24215c8103ec742e74252045a67f41f @bryanveloso bryanveloso committed Jun 22, 2008
View
2 applications/tagging/__init__.py
@@ -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')
View
10 applications/tagging/fields.py
@@ -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)
View
4 applications/tagging/forms.py
@@ -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):
"""
View
2 applications/tagging/managers.py
@@ -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):
"""
View
8 applications/tagging/models.py
@@ -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
View
4 applications/tagging/templatetags/tagging_tags.py
@@ -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()
View
2 applications/tagging/tests/models.py
@@ -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()
View
16 applications/tagging/tests/tests.py
@@ -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])
View
4 applications/tagging/utils.py
@@ -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
View
4 applications/tagging/validators.py
@@ -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):
"""
View
4 applications/tagging/views.py
@@ -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):

0 comments on commit 834146a

Please sign in to comment.