<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from django . conf . urls import patterns <EOL> from django . contrib import admin <EOL> from django . http import HttpResponse <EOL> from django . contrib . auth . models import User <EOL> from django . contrib . auth . admin import UserAdmin <EOL> from . import models , forms , admin as base_admin <EOL> class Admin2 ( admin . AdminSite ) : <EOL> login_form = forms . CustomAdminAuthenticationForm <EOL> login_template = '<STR_LIT>' <EOL> logout_template = '<STR_LIT>' <EOL> index_template = '<STR_LIT>' <EOL> password_change_template = '<STR_LIT>' <EOL> password_change_done_template = '<STR_LIT>' <EOL> def index ( self , request , extra_context = None ) : <EOL> return super ( Admin2 , self ) . index ( request , { '<STR_LIT:foo>' : '<STR_LIT>' } ) <EOL> def get_urls ( self ) : <EOL> return patterns ( '<STR_LIT>' , <EOL> ( r'<STR_LIT>' , self . admin_view ( self . my_view ) ) , <EOL> ) + super ( Admin2 , self ) . get_urls ( ) <EOL> def my_view ( self , request ) : <EOL> return HttpResponse ( "<STR_LIT>" ) <EOL> class UserLimitedAdmin ( UserAdmin ) : <EOL> def queryset ( self , request ) : <EOL> qs = super ( UserLimitedAdmin , self ) . queryset ( request ) <EOL> return qs . filter ( is_superuser = False ) <EOL> site = Admin2 ( name = "<STR_LIT>" ) <EOL> site . register ( models . Article , base_admin . ArticleAdmin ) <EOL> site . register ( models . Section , inlines = [ base_admin . ArticleInline ] ) <EOL> site . register ( models . Thing , base_admin . ThingAdmin ) <EOL> site . register ( models . Fabric , base_admin . FabricAdmin ) <EOL> site . register ( models . ChapterXtra1 , base_admin . ChapterXtra1Admin ) <EOL> site . register ( User , UserLimitedAdmin ) </s>
