title: NoReverseMatch at URL, error during template rendering, etc
body: <p>I am trying to incorporate an export button into my Django admin site. Able to get the button to show in admin, but every time I click the button it breaks and I get the following error:</p>
  
  <blockquote>
    <p>NoReverseMatch at /admin/emarshalapp/attorney/export/ Reverse for
    'app_list' with arguments '()' and keyword arguments '{'app_label':
    ''}' not found. 1 pattern(s) tried:
    ['admin/(?Pfiler|emarshalapp|auth)/$']</p>
  </blockquote>
  
  <p>Here is <a href="http://dpaste.com/3G31750" rel="nofollow noreferrer">the full traceback</a> in case that is helpful. </p>
  
  <p>I am trying to follow <a href="https://assist-software.net/blog/how-export-excel-files-python-django-application" rel="nofollow noreferrer">this tutorial</a> to do the export logic, but I obviously must be doing something wrong, just not sure what. I have tried all the solutions recommended for NoReverseMatch on SO (including <a href="https://stackoverflow.com/questions/38390177/what-is-a-noreversematch-error-and-how-do-i-fix-it">this answer</a>) and elsewhere but no fix in sight. I am stumped, please help! </p>
  
  <p>The part of my <code>change-list.html</code> template that adds the button: </p>
  
  <pre><code>{% block object-tools-items %}
  
      {{ block.super }}
  
      &lt;li&gt;
          &lt;a href="export/"
             class="grp-state-focus addlink"&gt;Export&lt;/a&gt;
      &lt;/li&gt;
  
  {% endblock %} 
  </code></pre>
  
  <p>here is my <code>INSTALLED_APPS</code> setting: </p>
  
  <pre><code>INSTALLED_APPS = [
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
  
      # my apps here
      'emarshalapp',
      'localflavor',
      'simple_history',
      'easy_thumbnails',
      'filer',
      'mptt',
      'PIL',
      'django_extensions',
  
  ]
  </code></pre>
  
  <p>admin.py:</p>
  
  <pre><code>def my_view(self, request):
          # custom view which should return an HttpResponse
          if request.method == 'POST':
              if 'export' in request.POST:
                  response = HttpResponse(
                      content_type='application/vnd.ms-excel')
                  response['Content-Disposition'] = \
                      'attachment; filename=Report.xlsx'
                  xlsx_data = WriteToExcel(attorney_range, attorney)
                  response.write(xlsx_data)
                  return response
          else:
              return render(request, "change_list.html",
                            context_instance=RequestContext(request))
  
  def get_urls(self):
      urls = super(AttorneyAdmin, self).get_urls()
      my_urls = patterns('', url(r'^export/$', self.my_view, name='export/'))
      return my_urls + urls
  </code></pre>
  
  <p>views.py: </p>
  
  <pre><code>def attorney_history(request):
      attorney_range = Attorney.objects.all().filter(active=True)
      attorney = None
      if request.method == 'POST':
          if 'export' in request.POST:
              response = HttpResponse(content_type='application/vnd.ms-excel')
              response['Content-Disposition'] = \
                  'attachment; filename=Report.xlsx'
              xlsx_data = WriteToExcel(attorney_range, attorney)
              response.write(xlsx_data)
              return HttpResponseRedirect('%s/export/' % reverse('export/'))
      else:
          return render("change_list.html",
                        context_instance=RequestContext(request))
  </code></pre>
  
  <p>urls.py:</p>
  
  <pre><code>app_name = 'emarshalapp'
  ...
      def get_urls(self):
          urls = super(AttorneyAdmin, self).get_urls()
          my_urls = url(r"^export/$",
                        name='export/')
          return my_urls + urls
  
  urlpatterns = [
      url(r'^admin/', admin.site.urls, name='admin'),
      url(r'^advanced_filters/', include('advanced_filters.urls'))
  </code></pre>
  
  <p>Then I have an <code>excel_utils.py</code> as per the tutorial:</p>
  
  <pre><code>def WriteToExcel(attorney_range, attorney=None):
      output = StringIO.StringIO()
      workbook = xlsxwriter.Workbook(output)
      worksheet_s = workbook.add_worksheet("Summary")
  [code to add excel data]
  </code></pre>
  
  <p>my AttorneyAdmin class: </p>
  
  <pre><code>@admin.register(Attorney)
  class AttorneyAdmin(SimpleHistoryAdmin):
      change_list_template = 'change_list.html'
  
      def my_view(self, request):
          # custom view which should return an HttpResponse
          if request.method == 'POST':
              if 'export' in request.POST:
                  response = HttpResponse(
                      content_type='application/vnd.ms-excel')
                  response['Content-Disposition'] = \
                      'attachment; filename=Report.xlsx'
                  xlsx_data = WriteToExcel(attorney_range, attorney)
                  response.write(xlsx_data)
                  return response
          else:
              return render(request, "change_list.html",
                            context_instance=RequestContext(request))
      fieldsets = (...)
      list_display = (...)
      inlines = (...)
      search_fields = (...)
      list_filter = (...)
  </code></pre>