Django

Code

Changeset 9063

Show
Ignore:
Timestamp:
09/17/08 03:59:55 (4 months ago)
Author:
mtredinnick
Message:

Changed a slightly suspicious usage of request.POST to request.method == 'POST'.
Refs #9014 (not the root cause of that bug, but discovered whilst people were
diagnosing it).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/contrib/admin/options.py

    r8985 r9063  
    559559            raise Http404('%s object with primary key %r does not exist.' % (force_unicode(opts.verbose_name), escape(object_id))) 
    560560 
    561         if request.POST and request.POST.has_key("_saveasnew"): 
     561        if request.method == 'POST' and request.POST.has_key("_saveasnew"): 
    562562            return self.add_view(request, form_url='../../add/') 
    563563