Commits

offline committed aca576e

docstrings added to HttpResponseReload utility

Comments (0)

Files changed (2)

 
 
 class HttpResponseReload(HttpResponse):
+    """
+    Reload page and stay on the same page from where request was made.
+
+    example:
+
+    def simple_view(request):
+        if request.POST:
+            form = CommentForm(request.POST):
+            if form.is_valid():
+                form.save()
+                return HttpResponseReload(request)
+        else:
+            form = CommentForm()
+        return render_to_response('some_template.html', {'form': form})
+    """
     status_code = 302
 
     def __init__(self, request):
 from setuptools import setup, find_packages
 setup(
     name = "django-annoying",
-    version = "0.5",
+    version = "0.5.1",
     packages = find_packages(),
     author = "Anderson",
     author_email = "self.anderson@gmail.com",