#
# Copy from django source template admin/change_form.html to your app template dir
# And replace the block 
# "./your_app/templates/admin/change_form.html"

{% block object-tools %}
  {% if change %}{% if not is_popup %}
  <ul class="object-tools">
  {% for button in buttons %}
     <li><a {% if button.confirm %} onclick="return confirm('{{ button.confirm }}')" {% endif %} 
        href="./{{ button.url }}/">{{ button.textname }}</a></li>
  {% endfor %}
  <li><a href="history/" class="historylink">History</a></li>
  {% if has_absolute_url %}<li><a href="../../../r/{{ content_type_id }}/{{ object_id }}/" class="viewsitelink">View on site</a></li>{% endif%}
  </ul>
  {% endif %}{% endif %}
{% endblock %}


#
# Add this code to your models.py
#

def _ban_user(request, id):
    from django.http.response import HttpResponse
    return HttpResponse(u'User %s Banned! :)' % id)

class MyUserAdmin(UserAdmin):
    buttons = [
        {
         'url': '_ban_action',
         'textname': 'Ban user',
         'func': _ban_user,
         'confirm': u'Do you want ban this user?'
        },
    ]

    def change_view(self, request, object_id, form_url='', extra_context={}):
        extra_context['buttons'] = self.buttons
        return super(MyUserAdmin, self).change_view(request, object_id, form_url, extra_context=extra_context)

    def get_urls(self):
        from django.conf.urls import patterns, url, include
        urls = super(MyUserAdmin, self).get_urls()
        my_urls = list( (url(r'^(.+)/%(url)s/$' % b, self.admin_site.admin_view(b['func'])) for b in self.buttons) )
        return my_urls + urls
        

# Enjoy!