Author: floguy
Date: Wed Oct 15 00:15:41 2008
New Revision: 44
Modified:
trunk/things/__init__.py
trunk/things/fields.py
trunk/things/models.py
trunk/things/options.py
trunk/things/sites.py
trunk/things/templatetags/things_tags.py
trunk/thingsproject/urls.py
Log:
Bunch of fixes, adding required imports and removing imports that were not
required, thanks to PyFlakes.
Modified: trunk/things/__init__.py
==============================================================================
--- trunk/things/__init__.py (original)
+++ trunk/things/__init__.py Wed Oct 15 00:15:41 2008
@@ -2,6 +2,14 @@
from things.fields import *
from things.sites import ThingSite, site
+# To placate PyFlakes
+def __exported_functionality__():
+ return [
+ Thing, ModelThing, ThingGroup, OrderField, ForeignKeyAggregate,
+ GenericForeignKeyAggregate, OrderSumField, OrderCountField,
+ OrderGenericCountField, OrderGenericSumField, ThingSite, site
+ ]
+
def autodiscover():
"""
Auto-discover INSTALLED_APPS thing.py modules and fail silently when
Modified: trunk/things/fields.py
==============================================================================
--- trunk/things/fields.py (original)
+++ trunk/things/fields.py Wed Oct 15 00:15:41 2008
@@ -1,6 +1,5 @@
from django.template import defaultfilters
from django.core.urlresolvers import reverse
-from django.db.models import ManyToManyField
from django.db.models.options import FieldDoesNotExist
from django.db import connection
from django.contrib.contenttypes.models import ContentType
Modified: trunk/things/models.py
==============================================================================
--- trunk/things/models.py (original)
+++ trunk/things/models.py Wed Oct 15 00:15:41 2008
@@ -1,3 +1 @@
-from django.db import models
-
# Import all of the sub-projects models here?
Modified: trunk/things/options.py
==============================================================================
--- trunk/things/options.py (original)
+++ trunk/things/options.py Wed Oct 15 00:15:41 2008
@@ -1,15 +1,12 @@
-import re
import copy
from operator import or_
from django.conf.urls.defaults import *
from django.http import HttpResponse, Http404
-from django.shortcuts import render_to_response, get_object_or_404
from django.template import RequestContext
from django.template.loader import select_template
from django.core.urlresolvers import reverse
from django.db.models import Q
-from things.fields import BaseField, OrderCountField, AggregateBase
-from django.template import defaultfilters
+from things.fields import BaseField, AggregateBase
__all__ = ('Thing', 'ModelThing', 'ThingGroup')
Modified: trunk/things/sites.py
==============================================================================
--- trunk/things/sites.py (original)
+++ trunk/things/sites.py Wed Oct 15 00:15:41 2008
@@ -1,8 +1,6 @@
-import re
import things
from django.conf.urls.defaults import *
from django.db.models.base import ModelBase
-from django.http import HttpResponseRedirect, HttpResponse, Http404
from django.core.urlresolvers import reverse
from django.shortcuts import render_to_response
from django.template import RequestContext
Modified: trunk/things/templatetags/things_tags.py
==============================================================================
--- trunk/things/templatetags/things_tags.py (original)
+++ trunk/things/templatetags/things_tags.py Wed Oct 15 00:15:41 2008
@@ -1,5 +1,7 @@
from django import template
+from django.conf import settings
from django.core.urlresolvers import reverse, NoReverseMatch
+from django.utils.encoding import smart_str
register = template.Library()
@@ -50,7 +52,7 @@
def do_urlslash(parser, token):
bits = token.contents.split(' ')
if len(bits) < 2:
- raise TemplateSyntaxError("'%s' takes at least one argument"
+ raise template.TemplateSyntaxError("'%s' takes at least one
argument"
" (path to a view)" % bits[0])
viewname = bits[1]
args = []
Modified: trunk/thingsproject/urls.py
==============================================================================
--- trunk/thingsproject/urls.py (original)
+++ trunk/thingsproject/urls.py Wed Oct 15 00:15:41 2008
@@ -6,7 +6,6 @@
#things.autodiscover()
from twitter.thing import TweetThing, group_dicts
-from twitter.models import Tweet
thing = things.ThingGroup(TweetThing, group_dicts=group_dicts)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---