aboutsummaryrefslogtreecommitdiffstats
path: root/examples/pygments_api
diff options
context:
space:
mode:
authorTom Christie2011-12-29 13:31:12 +0000
committerTom Christie2011-12-29 13:31:12 +0000
commit07349597ab936dc9887caa70b5d7d2860c897b12 (patch)
treedb1fdb8934e4d8dc8d3afe8d1e9fd076e3a4e27d /examples/pygments_api
parent1bdc5eacc6290c486796eb5ab8fa29092137dab6 (diff)
downloaddjango-rest-framework-07349597ab936dc9887caa70b5d7d2860c897b12.tar.bz2
whitespace fixes
Diffstat (limited to 'examples/pygments_api')
-rw-r--r--examples/pygments_api/forms.py2
-rw-r--r--examples/pygments_api/tests.py2
-rw-r--r--examples/pygments_api/urls.py2
-rw-r--r--examples/pygments_api/views.py4
4 files changed, 5 insertions, 5 deletions
diff --git a/examples/pygments_api/forms.py b/examples/pygments_api/forms.py
index 8488db06..30a59a84 100644
--- a/examples/pygments_api/forms.py
+++ b/examples/pygments_api/forms.py
@@ -13,7 +13,7 @@ class PygmentsForm(forms.Form):
code = forms.CharField(widget=forms.Textarea,
label='Code Text',
- max_length=1000000,
+ max_length=1000000,
help_text='(Copy and paste the code text here.)')
title = forms.CharField(required=False,
help_text='(Optional)',
diff --git a/examples/pygments_api/tests.py b/examples/pygments_api/tests.py
index 6eb69da5..98139ce2 100644
--- a/examples/pygments_api/tests.py
+++ b/examples/pygments_api/tests.py
@@ -46,4 +46,4 @@ class TestPygmentsExample(TestCase):
self.assertEquals(locations, response_locations)
- \ No newline at end of file
+
diff --git a/examples/pygments_api/urls.py b/examples/pygments_api/urls.py
index 905e31c5..e0d44ece 100644
--- a/examples/pygments_api/urls.py
+++ b/examples/pygments_api/urls.py
@@ -2,6 +2,6 @@ from django.conf.urls.defaults import patterns, url
from pygments_api.views import PygmentsRoot, PygmentsInstance
urlpatterns = patterns('',
- url(r'^$', PygmentsRoot.as_view(), name='pygments-root'),
+ url(r'^$', PygmentsRoot.as_view(), name='pygments-root'),
url(r'^([a-zA-Z0-9-]+)/$', PygmentsInstance.as_view(), name='pygments-instance'),
)
diff --git a/examples/pygments_api/views.py b/examples/pygments_api/views.py
index e50029f6..884cff3a 100644
--- a/examples/pygments_api/views.py
+++ b/examples/pygments_api/views.py
@@ -72,10 +72,10 @@ class PygmentsRoot(View):
linenos = 'table' if self.CONTENT['linenos'] else False
options = {'title': self.CONTENT['title']} if self.CONTENT['title'] else {}
formatter = HtmlFormatter(style=self.CONTENT['style'], linenos=linenos, full=True, **options)
-
+
with open(pathname, 'w') as outfile:
highlight(self.CONTENT['code'], lexer, formatter, outfile)
-
+
remove_oldest_files(HIGHLIGHTED_CODE_DIR, MAX_FILES)
return Response(status.HTTP_201_CREATED, headers={'Location': reverse('pygments-instance', args=[unique_id])})