diff options
| -rw-r--r-- | examples/djangoproject/djangoproject/urls.py | 4 | ||||
| -rw-r--r-- | pykss/contrib/django/templatetags/pykss.py | 6 | ||||
| -rw-r--r-- | pykss/contrib/django/views.py | 6 | ||||
| -rw-r--r-- | tests/test_contrib/test_django/test_templatetags/test_pykss.py | 2 | ||||
| -rw-r--r-- | tests/test_contrib/test_django/test_views.py | 8 | 
5 files changed, 13 insertions, 13 deletions
| diff --git a/examples/djangoproject/djangoproject/urls.py b/examples/djangoproject/djangoproject/urls.py index 061ec2c..a329ed6 100644 --- a/examples/djangoproject/djangoproject/urls.py +++ b/examples/djangoproject/djangoproject/urls.py @@ -1,10 +1,10 @@  from django.conf.urls import patterns, url  from django.views.generic.base import TemplateView -from pykss.contrib.django.views import StyleGuideView +from pykss.contrib.django.views import StyleguideView  urlpatterns = patterns('',      url(r'^$', TemplateView.as_view(template_name='index.html'), name='index'), -    url(r'^styleguide/$', StyleGuideView.as_view(template_name='styleguide.html'), name='styleguide'), +    url(r'^styleguide/$', StyleguideView.as_view(template_name='styleguide.html'), name='styleguide'),  ) diff --git a/pykss/contrib/django/templatetags/pykss.py b/pykss/contrib/django/templatetags/pykss.py index c7be567..a99c3ab 100644 --- a/pykss/contrib/django/templatetags/pykss.py +++ b/pykss/contrib/django/templatetags/pykss.py @@ -8,7 +8,7 @@ from django.utils.html import escape  register = template.Library() -class StyleGuideBlockNode(template.Node): +class StyleguideBlockNode(template.Node):      def __init__(self, styleguide, reference, template_name, nodelist):          self.styleguide = styleguide @@ -17,7 +17,7 @@ class StyleGuideBlockNode(template.Node):          self.nodelist = nodelist      def __repr__(self): -        return '<StyleGuideBlockNode>' +        return '<StyleguideBlockNode>'      def render(self, context):          styleguide = self.styleguide.resolve(context) @@ -88,7 +88,7 @@ def styleguideblock(parser, token):      nodelist = parser.parse(('endstyleguideblock',))      parser.delete_first_token() -    return StyleGuideBlockNode( +    return StyleguideBlockNode(          styleguide=parser.compile_filter(styleguide),          reference=parser.compile_filter(reference),          template_name=parser.compile_filter(template_name), diff --git a/pykss/contrib/django/views.py b/pykss/contrib/django/views.py index 00695f4..f35eb50 100644 --- a/pykss/contrib/django/views.py +++ b/pykss/contrib/django/views.py @@ -4,7 +4,7 @@ from django.views.generic.base import ContextMixin, TemplateView  import pykss -class StyleGuideMixin(ContextMixin): +class StyleguideMixin(ContextMixin):      def get_styleguide(self):          dirs = getattr(settings, 'PYKSS_DIRS', []) @@ -13,8 +13,8 @@ class StyleGuideMixin(ContextMixin):      def get_context_data(self, **kwargs):          context = {'styleguide': self.get_styleguide()}          context.update(kwargs) -        return super(StyleGuideMixin, self).get_context_data(**context) +        return super(StyleguideMixin, self).get_context_data(**context) -class StyleGuideView(StyleGuideMixin, TemplateView): +class StyleguideView(StyleguideMixin, TemplateView):      pass diff --git a/tests/test_contrib/test_django/test_templatetags/test_pykss.py b/tests/test_contrib/test_django/test_templatetags/test_pykss.py index 1f0d967..dc48e41 100644 --- a/tests/test_contrib/test_django/test_templatetags/test_pykss.py +++ b/tests/test_contrib/test_django/test_templatetags/test_pykss.py @@ -11,7 +11,7 @@ from pykss.exceptions import SectionDoesNotExist  from pykss.parser import Parser -class StyleGuideBlockTestCase(TestCase): +class StyleguideBlockTestCase(TestCase):      def setUp(self):          css = os.path.join(settings.PROJECT_ROOT, 'tests', 'fixtures', 'css') diff --git a/tests/test_contrib/test_django/test_views.py b/tests/test_contrib/test_django/test_views.py index b47ce20..1ba1baf 100644 --- a/tests/test_contrib/test_django/test_views.py +++ b/tests/test_contrib/test_django/test_views.py @@ -3,16 +3,16 @@ import os  from django.conf import settings  from django.test import TestCase -from pykss.contrib.django.views import StyleGuideMixin +from pykss.contrib.django.views import StyleguideMixin -class StyleGuideMixinTestCase(TestCase): +class StyleguideMixinTestCase(TestCase):      def test_get_styleguide_get_dirs_from_settings(self):          css = os.path.join(settings.PROJECT_ROOT, 'tests', 'fixtures', 'css')          with self.settings(PYKSS_DIRS=[css]): -            styleguide = StyleGuideMixin().get_styleguide() +            styleguide = StyleguideMixin().get_styleguide()              self.assertEqual(styleguide.section('2.1.1').description, 'Your standard form button.')      def test_get_context_data_adds_sytleguide_to_context(self): -        self.assertIn('styleguide', StyleGuideMixin().get_context_data()) +        self.assertIn('styleguide', StyleguideMixin().get_context_data()) | 
