Skip to content

Commit 008c1ed

Browse files
committed
Merge pull request concentricsky#24 from algrs/master
Fix for django 1.5 and tastypie 0.9.14
2 parents fd28188 + f4cbdd8 commit 008c1ed

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tastypie_swagger/templates/tastypie_swagger/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<script type="text/javascript">
4646
$(function () {
4747
window.swaggerUi = new SwaggerUi({
48-
discoveryUrl:"{% url tastypie_swagger:resources %}",
48+
discoveryUrl:"{% url 'tastypie_swagger:resources' %}",
4949
apiKey:"special-key",
5050
dom_id:"swagger-ui-container",
5151
supportHeaderParams: false,

tastypie_swagger/views.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ def render_to_response(self, context, **response_kwargs):
5656
"""
5757
Returns a response with a template rendered with the given context.
5858
"""
59-
if 'params' in context:
60-
del context['params']
59+
for k in ['params','view']:
60+
if k in context:
61+
del context[k]
6162
return self.response_class(
6263
json.dumps(context),
6364
content_type='application/json',

0 commit comments

Comments
 (0)