Changeset 3024
- Timestamp:
- 05/31/06 10:25:23 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/contrib/admin/views/main.py
r3018 r3024 36 36 SEARCH_VAR = 'q' 37 37 IS_POPUP_VAR = 'pop' 38 ERROR_FLAG = 'e' 38 39 39 40 # Text to display within change-list table cells if the value is blank. … … 558 559 if self.params.has_key(PAGE_VAR): 559 560 del self.params[PAGE_VAR] 561 if self.params.has_key(ERROR_FLAG): 562 del self.params[ERROR_FLAG] 560 563 561 564 self.order_field, self.order_type = self.get_ordering() … … 731 734 cl = ChangeList(request, model) 732 735 except IncorrectLookupParameters: 733 return HttpResponseRedirect(request.path) 736 # Wacky lookup parameters were given, so redirect to the main 737 # changelist page, without parameters, and pass an 'invalid=1' 738 # parameter via the query string. If wacky parameters were given and 739 # the 'invalid=1' parameter was already in the query string, something 740 # is screwed up with the database, so display an error page. 741 if ERROR_FLAG in request.GET.keys(): 742 return render_to_response('admin/invalid_setup.html', {'title': _('Database error')}) 743 return HttpResponseRedirect(request.path + '?' + ERROR_FLAG + '=1') 734 744 c = template.RequestContext(request, { 735 745 'title': cl.title,
