Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Removed some dead code, and old/bad constructs from the HttpResponse …

…classes.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15781 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 6ffe1d1e1f881f7c952b7a022841d1c591f5771d 1 parent 9e637d3
Alex Gaynor authored March 09, 2011

Showing 1 changed file with 3 additions and 9 deletions. Show diff stats Hide diff stats

  1. 12  django/http/__init__.py
12  django/http/__init__.py
@@ -634,14 +634,14 @@ class HttpResponseRedirect(HttpResponse):
634 634
     status_code = 302
635 635
 
636 636
     def __init__(self, redirect_to):
637  
-        HttpResponse.__init__(self)
  637
+        super(HttpResponseRedirect, self).__init__()
638 638
         self['Location'] = iri_to_uri(redirect_to)
639 639
 
640 640
 class HttpResponsePermanentRedirect(HttpResponse):
641 641
     status_code = 301
642 642
 
643 643
     def __init__(self, redirect_to):
644  
-        HttpResponse.__init__(self)
  644
+        super(HttpResponsePermanentRedirect, self).__init__()
645 645
         self['Location'] = iri_to_uri(redirect_to)
646 646
 
647 647
 class HttpResponseNotModified(HttpResponse):
@@ -660,21 +660,15 @@ class HttpResponseNotAllowed(HttpResponse):
660 660
     status_code = 405
661 661
 
662 662
     def __init__(self, permitted_methods):
663  
-        HttpResponse.__init__(self)
  663
+        super(HttpResponseNotAllowed, self).__init__()
664 664
         self['Allow'] = ', '.join(permitted_methods)
665 665
 
666 666
 class HttpResponseGone(HttpResponse):
667 667
     status_code = 410
668 668
 
669  
-    def __init__(self, *args, **kwargs):
670  
-        HttpResponse.__init__(self, *args, **kwargs)
671  
-
672 669
 class HttpResponseServerError(HttpResponse):
673 670
     status_code = 500
674 671
 
675  
-    def __init__(self, *args, **kwargs):
676  
-        HttpResponse.__init__(self, *args, **kwargs)
677  
-
678 672
 # A backwards compatible alias for HttpRequest.get_host.
679 673
 def get_host(request):
680 674
     return request.get_host()

0 notes on commit 6ffe1d1

Please sign in to comment.
Something went wrong with that request. Please try again.