#20745: {{ block.super }} silences/hides errors
-------------------------------+--------------------
     Reporter:  robin          |      Owner:  nobody
         Type:  Bug            |     Status:  new
    Component:  Uncategorized  |    Version:  1.5
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 Say I create '''myapp/admin.py''' which contains:


 {{{
 from django.contrib import admin
 from myapp.models import MyModel

 class MyModelAdmin(admin.ModelAdmin):

     list_display = ('pk','abc')

     def abc(self, user):
         return 999+None

 admin.site.register(MyModel, MyModelAdmin)
 }}}

 Then when you visit http://localhost:8000/admin/myapp/mymodel/ a
 '''TypeError''' will raise because you cannot add 999 and None together.
 This is the '''expected outcome'''.

 However if I add '''templates/admin/myapp/mymodel/change_list.html'''
 which contains:

 {{{
 {% extends "admin/change_list.html" %}

 {% block content %}
     {{ block.super }}
 {% endblock %}

 }}}

 The '''TypeError will not appear''' and the page renders but without any
 content, which is '''not the expected outcome'''.

 This ticket seems similar to https://code.djangoproject.com/ticket/18169

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20745>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/048.04be849f02982eee1309bfb021da8f82%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to