Permalink
Browse files

Code cleanup (+ 1 bug fixed in html.py due to a variable name).

  • Loading branch information...
1 parent 3a80d66 commit f80100f9e479040c756ebf90ada043b74e39fb39 @BertrandBordage committed Aug 6, 2012
Showing with 15 additions and 20 deletions.
  1. +11 −12 setup.py
  2. +0 −1 terms/cms_app.py
  3. +0 −1 terms/forms.py
  4. +1 −1 terms/html.py
  5. +2 −2 terms/menu.py
  6. +1 −1 terms/settings.py
  7. +0 −1 terms/templatetags/terms.py
  8. +0 −1 terms/urls.py
View
@@ -1,20 +1,19 @@
#!/usr/bin/env python
# coding: utf-8
-import os
from setuptools import setup, find_packages
setup(
- name = 'django-terms',
- version = '0.1',
- author = 'Bertrand Bordage',
- author_email = 'bordage.bertrand@gmail.com',
- url = 'https://github.com/BertrandBordage/django-terms',
- description = 'Site-wide adds a definition '
+ name='django-terms',
+ version='0.1',
+ author='Bertrand Bordage',
+ author_email='bordage.bertrand@gmail.com',
+ url='https://github.com/BertrandBordage/django-terms',
+ description='Site-wide adds a definition '
'or a link for specialized terms.',
- long_description = open('README.rst').read(),
- classifiers = [
+ long_description=open('README.rst').read(),
+ classifiers=[
'Development Status :: 3 - Alpha',
'Framework :: Django',
'Intended Audience :: Developers',
@@ -23,11 +22,11 @@
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP',
],
- license = 'BSD',
- packages = find_packages(),
+ license='BSD',
+ packages=find_packages(),
install_requires=[
"Django >= 1.4",
],
include_package_data=True,
- zip_safe = False,
+ zip_safe=False,
)
View
@@ -11,4 +11,3 @@ class TermApp(CMSApp):
apphook_pool.register(TermApp)
-
View
@@ -10,7 +10,6 @@ def clean(self):
cleaned_data = self.cleaned_data
definition = cleaned_data.get('definition')
link = cleaned_data.get('link')
- errors = []
if not definition and not link:
raise ValidationError(_(u'Fill either “Definition” or “Link”.'))
return super(TermForm, self).clean()
View
@@ -47,7 +47,7 @@ def handle_decl(self, decl):
def handle_pi(self, data):
self.out.append('<?%s>' % data)
- def unknown_decl(self, data):
+ def unknown_decl(self, decl):
self.out.append('<![%s]>' % decl)
View
@@ -1,7 +1,7 @@
from cms.menu_bases import CMSAttachMenu
-from menus.base import Menu, NavigationNode
+from menus.base import NavigationNode
from menus.menu_pool import menu_pool
-from django.core.urlresolvers import reverse, NoReverseMatch
+from django.core.urlresolvers import NoReverseMatch
from .models import Term
from django.utils.translation import ugettext_lazy as _
View
@@ -29,4 +29,4 @@
)
)
-TERMS_REPLACE_FIRST_ONLY = getattr(settings, 'TERMS_REPLACE_FIRST_ONLY', True)
+TERMS_REPLACE_FIRST_ONLY = getattr(settings, 'TERMS_REPLACE_FIRST_ONLY', True)
@@ -2,7 +2,6 @@
from django.template import Library
from ..html import TermsHTMLReconstructor
-from ..models import Term
register = Library()
View
@@ -4,4 +4,3 @@
urlpatterns = patterns('',
url(r'^(?P<pk>\d+)/$', TermDetail.as_view(), name='term'),
)
-

0 comments on commit f80100f

Please sign in to comment.