Commits

Dmitri Lebedev committed b47b2be

added a view to show the editable html again

  • Participants
  • Parent commits 9ceb6d4

Comments (0)

Files changed (2)

File example/django_inline/urls.py

 urlpatterns = patterns('django_inline.views',
     url(r'^widget/', 'widget', name='django_inline_widget'),
     url(r'^update/', 'update', name='django_inline_update'),
+    url(r'^editable/', 'editable', name='django_inline_editable'),
 )

File example/django_inline/views.py

         setattr(obj, field_name, request.POST['value'])
         obj.save()
 
-    return HttpResponse(getattr(obj, field_name))
+    return show_editable(request)
+
+
+@get_params
+def editable(request, obj, field_name, id):
+    return render_to_response(
+        templates_list('inline-editable.html', obj), {
+        'obj': obj,
+        'field': field_name,
+        'inner': getattr(obj, field_name),
+    }, context_instance=RequestContext(request))