當前位置: 首頁>>代碼示例>>Python>>正文


Python AdminSite.get_urls方法代碼示例

本文整理匯總了Python中django.contrib.admin.AdminSite.get_urls方法的典型用法代碼示例。如果您正苦於以下問題:Python AdminSite.get_urls方法的具體用法?Python AdminSite.get_urls怎麽用?Python AdminSite.get_urls使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在django.contrib.admin.AdminSite的用法示例。


在下文中一共展示了AdminSite.get_urls方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: get_urls

# 需要導入模塊: from django.contrib.admin import AdminSite [as 別名]
# 或者: from django.contrib.admin.AdminSite import get_urls [as 別名]
    def get_urls(self):
        from django.conf.urls.defaults import patterns, url, include
        from obadmin.admin.urls import urlpatterns as local_urls

        url_patterns = local_urls
        url_patterns += AdminSite.get_urls(self)

        return url_patterns
開發者ID:frankk00,項目名稱:openblock,代碼行數:10,代碼來源:sites.py

示例2: get_urls

# 需要導入模塊: from django.contrib.admin import AdminSite [as 別名]
# 或者: from django.contrib.admin.AdminSite import get_urls [as 別名]
 def get_urls(self):
     urlpatterns = DjangoAdminSite.get_urls(self)
     
     urlpatterns += patterns('',
         url(r'^confirm_script$', is_staff(ConfirmScriptView.as_view()), name='confirm_script'),
         url(r'^run_script$', is_staff(RunScriptView.as_view()), name='run_script'),
         url(r'^kill_script$', is_staff(KillScriptView.as_view()), name='kill_script')
     )
     
     return urlpatterns
開發者ID:IRI-Research,項目名稱:plan4learning,代碼行數:12,代碼來源:sites.py

示例3: get_urls

# 需要導入模塊: from django.contrib.admin import AdminSite [as 別名]
# 或者: from django.contrib.admin.AdminSite import get_urls [as 別名]
    def get_urls(self):
        """
        Add some extra URLs to the admin site, as per
        https://docs.djangoproject.com/en/dev/ref/contrib/admin/#adding-views-to-admin-sites
        """
        from obadmin.admin.urls import urlpatterns as local_urls

        url_patterns = local_urls
        url_patterns += AdminSite.get_urls(self)

        return url_patterns
開發者ID:DotNetWebs,項目名稱:openblock,代碼行數:13,代碼來源:sites.py


注:本文中的django.contrib.admin.AdminSite.get_urls方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。