PageRenderTime 23ms CodeModel.GetById 19ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/tests/regressiontests/comment_tests/urls_admin.py

https://code.google.com/p/mango-py/
Python | 19 lines | 13 code | 3 blank | 3 comment | 0 complexity | 3f54b6b6f210f15b5ed390bd2e4b3462 MD5 | raw file
 1from django.conf.urls.defaults import *
 2from django.contrib import admin
 3from django.contrib.comments.admin import CommentsAdmin
 4from django.contrib.comments.models import Comment
 5
 6# Make a new AdminSite to avoid picking up the deliberately broken admin
 7# modules in other tests.
 8admin_site = admin.AdminSite()
 9admin_site.register(Comment, CommentsAdmin)
10
11# To demonstrate proper functionality even when ``delete_selected`` is removed.
12admin_site2 = admin.AdminSite()
13admin_site2.disable_action('delete_selected')
14admin_site2.register(Comment, CommentsAdmin)
15
16urlpatterns = patterns('',
17    (r'^admin/', include(admin_site.urls)),
18    (r'^admin2/', include(admin_site2.urls)),
19)