PageRenderTime 45ms CodeModel.GetById 21ms RepoModel.GetById 0ms 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
Possible License(s): BSD-3-Clause
  1. from django.conf.urls.defaults import *
  2. from django.contrib import admin
  3. from django.contrib.comments.admin import CommentsAdmin
  4. from django.contrib.comments.models import Comment
  5. # Make a new AdminSite to avoid picking up the deliberately broken admin
  6. # modules in other tests.
  7. admin_site = admin.AdminSite()
  8. admin_site.register(Comment, CommentsAdmin)
  9. # To demonstrate proper functionality even when ``delete_selected`` is removed.
  10. admin_site2 = admin.AdminSite()
  11. admin_site2.disable_action('delete_selected')
  12. admin_site2.register(Comment, CommentsAdmin)
  13. urlpatterns = patterns('',
  14. (r'^admin/', include(admin_site.urls)),
  15. (r'^admin2/', include(admin_site2.urls)),
  16. )