当前位置: 首页>>代码示例>>Python>>正文


Python urls.admin_url函数代码示例

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


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

示例1: get_urls

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

示例2: get_urls

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

示例3: get_urls

 def get_urls(self):
     return [
         admin_url(
             "^adjust-stock/(?P<supplier_id>\d+)/(?P<product_id>\d+)/",
             "shuup.simple_supplier.admin_module.views.process_stock_adjustment",
             name="simple_supplier.stocks",
             permissions=get_default_model_permissions(StockAdjustment)
         ),
         admin_url(
             "^alert-limit/(?P<supplier_id>\d+)/(?P<product_id>\d+)/",
             "shuup.simple_supplier.admin_module.views.process_alert_limit",
             name="simple_supplier.alert_limits",
             permissions=get_default_model_permissions(StockAdjustment)
         ),
         admin_url(
             "^stocks/",
             "shuup.simple_supplier.admin_module.views.StocksListView",
             name="simple_supplier.stocks"
         ),
         admin_url(
             "^list-settings/",
             "shuup.admin.modules.settings.views.ListSettingsView",
             name="simple_supplier.list_settings",
             permissions=get_default_model_permissions(StockAdjustment),
         )
     ]
开发者ID:shawnadelic,项目名称:shuup,代码行数:26,代码来源:__init__.py

示例4: get_urls

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

示例5: get_urls

 def get_urls(self):
     permissions = get_default_model_permissions(NotificationModel)
     return [
         admin_url(
             "notify/script-item-editor/",
             "shuup.notify.admin_module.views.script_item_editor",
             name="notify.script-item-editor",
             permissions=permissions
         ),
         admin_url(
             "notify/script/content/(?P<pk>\d+)/",
             "shuup.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="shuup.notify.admin_module.views.Script%sView",
         name_template="notify.script.%s",
         permissions=permissions
     )
开发者ID:suutari,项目名称:shoop,代码行数:27,代码来源:__init__.py

示例6: get_urls

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

示例7: get_urls

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

示例8: get_urls

 def get_urls(self):
     return [
         admin_url(
             "^printouts/delivery/(?P<shipment_pk>\d+)/$",
             "shuup.order_printouts.admin_module.views.get_delivery_pdf",
             name="printouts.delivery_pdf"
         ),
         admin_url(
             "^printouts/confirmation/(?P<order_pk>\d+)/$",
             "shuup.order_printouts.admin_module.views.get_confirmation_pdf",
             name="printouts.confirmation_pdf"
         ),
     ]
开发者ID:NamiStudio,项目名称:shuup,代码行数:13,代码来源:__init__.py

示例9: get_urls

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

示例10: get_urls

 def get_urls(self):
     return [
         admin_url(
             "^importer/import$",
             "shuup.importer.admin_module.import_views.ImportView",
             name="importer.import",
             permissions=get_default_model_permissions(Shop)
         ),
         admin_url(
             "^importer/import/process$",
             "shuup.importer.admin_module.import_views.ImportProcessView",
             name="importer.import_process",
             permissions=get_default_model_permissions(Shop)
         ),
     ]
开发者ID:suutari,项目名称:shoop,代码行数:15,代码来源:__init__.py

示例11: get_urls

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

示例12: get_urls

 def get_urls(self):
     return [
         admin_url(
             "^mocker/$",
             "shuup.testing.modules.mocker.mocker_view.MockerView",
             name="mocker"
         )
     ]
开发者ID:ruqaiya,项目名称:shuup,代码行数:8,代码来源:__init__.py

示例13: get_urls

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

示例14: get_urls

 def get_urls(self):
     return get_edit_and_list_urls(
         url_prefix="^tasks",
         view_template="shuup.tasks.admin_module.views.Task%sView",
         name_template="task.%s"
     ) + [
         admin_url(
             "^tasks/(?P<pk>\d+)/delete/$",
             "shuup.tasks.admin_module.views.TaskDeleteView",
             name="task.delete"
         ),
         admin_url(
             "^tasks/(?P<pk>\d+)/set_status/$",
             "shuup.tasks.admin_module.views.TaskSetStatusView",
             name="task.set_status"
         ),
     ]
开发者ID:ruqaiya,项目名称:shuup,代码行数:17,代码来源:__init__.py

示例15: get_urls

 def get_urls(self):
     return [
         admin_url(
             "^settings/$",
             "shuup.admin.modules.settings.views.SystemSettingsView",
             name="settings.list",
             permissions=get_default_model_permissions(Shop)
         ),
     ]
开发者ID:gurch101,项目名称:shuup,代码行数:9,代码来源:__init__.py


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