• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python urls.admin_url函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中shoop.admin.utils.urls.admin_url函数的典型用法代码示例。如果您正苦于以下问题:Python admin_url函数的具体用法?Python admin_url怎么用?Python admin_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了admin_url函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: get_urls

 def get_urls(self):
     return [
         admin_url(
             "^contacts/new/$",
             "shoop.admin.modules.contacts.views.ContactEditView",
             kwargs={"pk": None},
             name="contact.new",
             permissions=["shoop.add_contact"],
         ),
         admin_url(
             "^contacts/(?P<pk>\d+)/edit/$",
             "shoop.admin.modules.contacts.views.ContactEditView",
             name="contact.edit",
             permissions=["shoop.change_contact"],
         ),
         admin_url(
             "^contacts/(?P<pk>\d+)/$",
             "shoop.admin.modules.contacts.views.ContactDetailView",
             name="contact.detail",
             permissions=get_default_model_permissions(Contact),
         ),
         admin_url(
             "^contacts/reset-password/(?P<pk>\d+)/$",
             "shoop.admin.modules.contacts.views.ContactResetPasswordView",
             name="contact.reset_password",
             permissions=get_default_model_permissions(Contact),
         ),
         admin_url(
             "^contacts/$",
             "shoop.admin.modules.contacts.views.ContactListView",
             name="contact.list",
             permissions=get_default_model_permissions(Contact),
         ),
     ]
开发者ID:monokrome,项目名称:shuup,代码行数:34,代码来源:__init__.py


示例2: get_urls

 def get_urls(self):
     permissions = get_default_model_permissions(NotificationModel)
     return [
         admin_url(
             "notify/script-item-editor/",
             "shoop.notify.admin_module.views.script_item_editor",
             name="notify.script-item-editor",
             permissions=permissions
         ),
         admin_url(
             "notify/script/content/(?P<pk>\d+)/",
             "shoop.notify.admin_module.views.EditScriptContentView",
             name="notify.script.edit-content",
             permissions=permissions
         ),
         admin_url(
             "notify/mark-read/(?P<pk>\d+)/$",
             self.mark_notification_read_view,
             name="notify.mark-read",
             permissions=permissions
         ),
     ] + get_edit_and_list_urls(
         url_prefix="^notify/script",
         view_template="shoop.notify.admin_module.views.Script%sView",
         name_template="notify.script.%s",
         permissions=permissions
     )
开发者ID:monokrome,项目名称:shuup,代码行数:27,代码来源:__init__.py


示例3: _get_per_method_type_urls

 def _get_per_method_type_urls(self, url_part, class_name_prefix, url_name_prefix):
     ns = {
         "url_part": url_part,
         "class_name_prefix": class_name_prefix,
         "url_name_prefix": url_name_prefix,
     }
     return [
         admin_url(
             "^methods/%(url_part)s/(?P<pk>\d+)/detail/$" % ns,
             "shoop.admin.modules.methods.views.%(class_name_prefix)sEditDetailView" % ns,
             name="%(url_name_prefix)s.edit-detail" % ns
         ),
         admin_url(
             "^methods/%(url_part)s/(?P<pk>\d+)/$" % ns,
             "shoop.admin.modules.methods.views.%(class_name_prefix)sEditView" % ns,
             name="%(url_name_prefix)s.edit" % ns
         ),
         admin_url(
             "^methods/%(url_part)s/new/$" % ns,
             "shoop.admin.modules.methods.views.%(class_name_prefix)sEditView" % ns,
             kwargs={"pk": None},
             name="%(url_name_prefix)s.new" % ns
         ),
         admin_url(
             "^methods/%(url_part)s/$" % ns,
             "shoop.admin.modules.methods.views.%(class_name_prefix)sListView" % ns,
             name="%(url_name_prefix)s.list" % ns
         ),
     ]
开发者ID:charn,项目名称:shoop,代码行数:29,代码来源:__init__.py


示例4: get_urls

 def get_urls(self):
     return [
         admin_url(
             "^addons/$",
             "shoop.addons.admin_module.views.AddonListView",
             name="addon.list",
             permissions=get_default_model_permissions(Shop)
         ),
         admin_url(
             "^addons/add/$",
             "shoop.addons.admin_module.views.AddonUploadView",
             name="addon.upload",
             permissions=get_default_model_permissions(Shop)
         ),
         admin_url(
             "^addons/add/confirm/$",
             "shoop.addons.admin_module.views.AddonUploadConfirmView",
             name="addon.upload_confirm",
             permissions=get_default_model_permissions(Shop)
         ),
         admin_url(
             "^addons/reload/$",
             "shoop.addons.admin_module.views.ReloadView",
             name="addon.reload",
             permissions=get_default_model_permissions(Shop)
         ),
     ]
开发者ID:monokrome,项目名称:shuup,代码行数:27,代码来源:__init__.py


示例5: get_urls

 def get_urls(self):
     return [
         admin_url(
             "^contacts/new/$",
             "shoop.admin.modules.contacts.views.ContactEditView",
             kwargs={"pk": None},
             name="contact.new"
         ),
         admin_url(
             "^contacts/(?P<pk>\d+)/edit/$",
             "shoop.admin.modules.contacts.views.ContactEditView",
             name="contact.edit"
         ),
         admin_url(
             "^contacts/(?P<pk>\d+)/$",
             "shoop.admin.modules.contacts.views.ContactDetailView",
             name="contact.detail"
         ),
         admin_url(
             "^contacts/reset-password/(?P<pk>\d+)/$",
             "shoop.admin.modules.contacts.views.ContactResetPasswordView",
             name="contact.reset_password"
         ),
         admin_url(
             "^contacts/$",
             "shoop.admin.modules.contacts.views.ContactListView",
             name="contact.list"
         ),
     ]
开发者ID:taedori81,项目名称:shoop,代码行数:29,代码来源:__init__.py


示例6: get_urls

def get_urls():
    urls = []
    urls.extend(get_module_urls())

    urls.extend([
        admin_url(r'^$', DashboardView.as_view(), name='dashboard'),
        admin_url(r'^search/$', SearchView.as_view(), name='search'),
        admin_url(r'^menu/$', MenuView.as_view(), name='menu'),
        admin_url(
            r'^login/$',
            login,
            kwargs={"template_name": "shoop/admin/auth/login.jinja"},
            name='login',
            require_authentication=False
        ),
        admin_url(
            r'^logout/$',
            auth_views.logout,
            kwargs={"template_name": "shoop/admin/auth/logout.jinja"},
            name='logout',
            require_authentication=False
        ),
    ])

    for u in urls:  # pragma: no cover
        if not isinstance(u, AdminRegexURLPattern):
            warnings.warn("Admin URL %r is not an AdminRegexURLPattern" % u)

    # Add Django javascript catalog url
    urls.append(url(r'^jsi18n.js$', javascript_catalog, {'packages': ('shoop',)}, name='js-catalog'))

    return tuple(urls)
开发者ID:hitchhooker,项目名称:shoop,代码行数:32,代码来源:urls.py


示例7: get_urls

 def get_urls(self):
     return [
         admin_url(
             "^orders/(?P<pk>\d+)/create-shipment/$",
             "shoop.admin.modules.orders.views.OrderCreateShipmentView",
             name="order.create-shipment"
         ),
         admin_url(
             "^orders/(?P<pk>\d+)/set-status/$",
             "shoop.admin.modules.orders.views.OrderSetStatusView",
             name="order.set-status"
         ),
         admin_url(
             "^orders/(?P<pk>\d+)/$",
             "shoop.admin.modules.orders.views.OrderDetailView",
             name="order.detail"
         ),
         admin_url(
             "^orders/new/$",
             "shoop.admin.modules.orders.views.OrderCreateView",
             name="order.new"
         ),
         admin_url(
             "^orders/$",
             "shoop.admin.modules.orders.views.OrderListView",
             name="order.list"
         ),
     ]
开发者ID:Carolina061,项目名称:shoop,代码行数:28,代码来源:__init__.py


示例8: get_urls

 def get_urls(self):
     return [
         admin_url(
             "^products/(?P<pk>\d+)/delete/$", "shoop.admin.modules.products.views.ProductDeleteView",
             name="product.delete"
         ),
         admin_url(
             "^products/(?P<pk>\d+)/media/$", "shoop.admin.modules.products.views.ProductMediaEditView",
             name="product.edit_media"
         ),
         admin_url(
             "^products/(?P<pk>\d+)/crosssell/$", "shoop.admin.modules.products.views.ProductCrossSellEditView",
             name="product.edit_cross_sell"
         ),
         admin_url(
             "^products/(?P<pk>\d+)/variation/$", "shoop.admin.modules.products.views.ProductVariationView",
             name="product.edit_variation"
         ),
         admin_url(
             "^products/(?P<pk>\d+)/package/$", "shoop.admin.modules.products.views.ProductPackageView",
             name="product.edit_package"
         ),
     ] + get_edit_and_list_urls(
         url_prefix="^products",
         view_template="shoop.admin.modules.products.views.Product%sView",
         name_template="product.%s"
     )
开发者ID:00WhengWheng,项目名称:shuup,代码行数:27,代码来源:__init__.py


示例9: get_urls

 def get_urls(self):  # doccov: ignore
     return [
         admin_url(
             "^xtheme/(?P<theme_identifier>.+?)/",
             "shoop.xtheme.admin_module.views.ThemeConfigDetailView",
             name="xtheme.config_detail",
         ),
         admin_url("^xtheme/", "shoop.xtheme.admin_module.views.ThemeConfigView", name="xtheme.config"),
     ]
开发者ID:portlyjent,项目名称:shoop,代码行数:9,代码来源:__init__.py


示例10: get_urls

    def get_urls(self):
        return [

            # TODO: Add url for tax dashboard?

            # urls for Tax
            admin_url(
                "^taxes/tax/(?P<pk>\d+)/$",
                "shoop.admin.modules.taxes.views.edit.TaxEditView",
                name="tax.edit"
            ),
            admin_url(
                "^taxes/tax/new/$",
                "shoop.admin.modules.taxes.views.edit.TaxEditView",
                kwargs={"pk": None},
                name="tax.new"
            ),
            admin_url(
                "^taxes/tax/$",
                "shoop.admin.modules.taxes.views.list.TaxListView",
                name="tax.list"
            ),

            # urls for CustomerTaxGroup
            admin_url(
                "^taxes/customer-tax-group/(?P<pk>\d+)/$",
                "shoop.admin.modules.taxes.views.edit.CustomerTaxGroupEditView",
                name="customer_tax_group.edit"
            ),
            admin_url(
                "^taxes/customer-tax-group/new/$",
                "shoop.admin.modules.taxes.views.edit.CustomerTaxGroupEditView",
                kwargs={"pk": None},
                name="customer_tax_group.new"),
            admin_url(
                "^taxes/customer-tax-group/$",
                "shoop.admin.modules.taxes.views.list.CustomerTaxGroupListView",
                name="customer_tax_group.list"
            ),

            # urls for TaxClass
            admin_url(
                "^taxes/tax-class/(?P<pk>\d+)/$",
                "shoop.admin.modules.taxes.views.edit.TaxClassEditView",
                name="tax_class.edit"
            ),
            admin_url(
                "^taxes/tax-class/new/$",
                "shoop.admin.modules.taxes.views.edit.TaxClassEditView",
                kwargs={"pk": None},
                name="tax_class.new"
            ),
            admin_url(
                "^taxes/tax-class/$",
                "shoop.admin.modules.taxes.views.list.TaxClassListView",
                name="tax_class.list"
            ),
        ]
开发者ID:charn,项目名称:shoop,代码行数:58,代码来源:__init__.py


示例11: get_urls

 def get_urls(self):
     return [
         admin_url(
             "^adjust-stock/(?P<supplier_id>\d+)/(?P<product_id>\d+)/",
             "shoop.simple_supplier.admin_module.views.process_stock_adjustment",
             name="simple_supplier.stocks"
         ),
         admin_url(
             "^stocks/",
             "shoop.simple_supplier.admin_module.views.StocksListView",
             name="simple_supplier.stocks"
         ),
     ]
开发者ID:00WhengWheng,项目名称:shuup,代码行数:13,代码来源:__init__.py


示例12: get_urls

 def get_urls(self):
     return [
         admin_url(
             "test/$", OkAction,
             name="test-auth", require_authentication=True),
         admin_url(
             "test2/$", "shoop_tests.admin.fixtures.test_module.OkAction",
             name="test-unauth", require_authentication=False),
         admin_url(
             "test3/$", "shoop_tests.admin.fixtures.test_module.OkAction",
             name="test-perm", require_authentication=True,
             permissions=("bogus-permission",)),
     ]
开发者ID:monokrome,项目名称:shuup,代码行数:13,代码来源:test_module.py


示例13: get_urls

 def get_urls(self):  # doccov: ignore
     return [
         admin_url(
             "^xtheme/(?P<theme_identifier>.+?)/",
             "shoop.xtheme.admin_module.views.ThemeConfigDetailView",
             name="xtheme.config_detail",
             permissions=get_default_model_permissions(ThemeSettings)
         ),
         admin_url(
             "^xtheme/",
             "shoop.xtheme.admin_module.views.ThemeConfigView",
             name="xtheme.config",
             permissions=get_default_model_permissions(ThemeSettings)
         )
     ]
开发者ID:monokrome,项目名称:shuup,代码行数:15,代码来源:__init__.py


示例14: get_urls

 def get_urls(self):
     return [
         admin_url(
             "^media/$",
             "shoop.admin.modules.media.views.MediaBrowserView",
             name="media.browse"
         ),
     ]
开发者ID:00WhengWheng,项目名称:shuup,代码行数:8,代码来源:__init__.py


示例15: get_urls

 def get_urls(self):
     return [
         admin_url(
             "^carts/$",
             "shoop.front.admin_module.carts.views.CartListView",
             name="cart.list",
             permissions=get_default_model_permissions(StoredBasket),
         ),
     ]
开发者ID:monokrome,项目名称:shuup,代码行数:9,代码来源:__init__.py


示例16: get_urls

 def get_urls(self):
     return [
         admin_url(
             "^mocker/$",
             "shoop.testing.admin_module.mocker_view.MockerView",
             name="mocker",
             permissions=get_default_model_permissions(Shop)
         )
     ]
开发者ID:monokrome,项目名称:shuup,代码行数:9,代码来源:__init__.py


示例17: get_urls

 def get_urls(self):
     return [
         admin_url(
             "^contact-groups/(?P<pk>\d+)/$",
             "shoop.admin.modules.contact_groups.views.ContactGroupEditView",
             name="contact-group.edit"),
         admin_url(
             "^contact-groups/new/$",
             "shoop.admin.modules.contact_groups.views.ContactGroupEditView",
             kwargs={"pk": None},
             name="contact-group.new"
         ),
         admin_url(
             "^contact-groups/$",
             "shoop.admin.modules.contact_groups.views.ContactGroupListView",
             name="contact-group.list"
         ),
     ]
开发者ID:jaywink,项目名称:shoop,代码行数:18,代码来源:__init__.py


示例18: get_urls

 def get_urls(self):
     return [
         admin_url(
             "cms/page/(?P<pk>\d+)/",
             "shoop.simple_cms.admin_module.views.PageEditView",
             name="simple_cms.page.edit"
         ),
         admin_url(
             "cms/page/new/",
             "shoop.simple_cms.admin_module.views.PageEditView",
             kwargs={"pk": None},
             name="simple_cms.page.new"
         ),
         admin_url(
             "cms/pages/",
             "shoop.simple_cms.admin_module.views.PageListView",
             name="simple_cms.page.list"
         ),
     ]
开发者ID:charn,项目名称:shoop,代码行数:19,代码来源:__init__.py


示例19: get_urls

 def get_urls(self):
     return get_edit_and_list_urls(
         url_prefix="^carousels",
         view_template="shoop_carousel.admin.views.Carousel%sView",
         name_template="carousel.%s"
     ) + [
         admin_url(
             "^carousel/(?P<pk>\d+)/delete/$",
             "shoop_carousel.admin.views.CarouselDeleteView",
             name="carousel.delete"
         ),
     ]
开发者ID:suutari-ai,项目名称:shoop-carousel,代码行数:12,代码来源:__init__.py



注:本文中的shoop.admin.utils.urls.admin_url函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python urls.derive_model_url函数代码示例发布时间:2022-05-27
下一篇:
Python toolbar.get_default_edit_toolbar函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap