本文整理汇总了Python中shuup.admin.utils.urls.derive_model_url函数的典型用法代码示例。如果您正苦于以下问题:Python derive_model_url函数的具体用法?Python derive_model_url怎么用?Python derive_model_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了derive_model_url函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: get_model_url
def get_model_url(self, object, kind, shop=None):
if isinstance(object, Product):
if not shop:
try:
shop = object.shop_products.first().shop
except ObjectDoesNotExist:
return None
object = object.get_shop_instance(shop)
return derive_model_url(ShopProduct, "shuup_admin:shop_product", object, kind)
开发者ID:ruqaiya,项目名称:shuup,代码行数:9,代码来源:__init__.py
示例2: get_model_url
def get_model_url(self, object, kind):
return derive_model_url(DisplayUnit, "shuup_admin:display_unit", object, kind)
开发者ID:suutari-ai,项目名称:shuup,代码行数:2,代码来源:__init__.py
示例3: get_model_url
def get_model_url(self, object, kind):
return derive_model_url(Category, "shuup_admin:category", object, kind)
开发者ID:ahmadzai,项目名称:shuup,代码行数:2,代码来源:__init__.py
示例4: get_model_url
def get_model_url(self, object, kind):
return derive_model_url(Script, "shuup_admin:notify.script", object, kind)
开发者ID:gurch101,项目名称:shuup,代码行数:2,代码来源:__init__.py
示例5: get_model_url
def get_model_url(self, object, kind):
return derive_model_url(Manufacturer, "shuup_admin:manufacturers", object, kind)
开发者ID:ahmadzai,项目名称:shuup,代码行数:2,代码来源:__init__.py
示例6: get_model_url
def get_model_url(self, object, kind):
return derive_model_url(Order, "shuup_admin:order", object, kind)
开发者ID:hrayr-artunyan,项目名称:shuup,代码行数:2,代码来源:__init__.py
示例7: get_model_url
def get_model_url(self, object, kind):
return derive_model_url(get_user_model(), "shuup_admin:user", object, kind)
开发者ID:shawnadelic,项目名称:shuup,代码行数:2,代码来源:__init__.py
示例8: get_model_url
def get_model_url(self, object, kind, shop=None):
return derive_model_url(Snippet, "shuup_admin:xtheme_snippet", object, kind)
开发者ID:ruqaiya,项目名称:shuup,代码行数:2,代码来源:__init__.py
示例9: get_model_url
def get_model_url(self, object, kind):
return derive_model_url(Supplier, "shuup_admin:supplier", object, kind)
开发者ID:gurch101,项目名称:shuup,代码行数:2,代码来源:__init__.py
示例10: get_model_url
def get_model_url(self, object, kind):
return derive_model_url(Page, "shuup_admin:simple_cms.page", object, kind)
开发者ID:ahmadzai,项目名称:shuup,代码行数:2,代码来源:__init__.py
示例11: get_model_url
def get_model_url(self, object, kind, shop=None):
return derive_model_url(AvailabilityException, "shuup_admin:discounts_availability_exception", object, kind)
开发者ID:ruqaiya,项目名称:shuup,代码行数:2,代码来源:_exceptions.py
示例12: get_model_url
def get_model_url(self, object, kind, shop=None):
return derive_model_url(Discount, "shuup_admin:discounts", object, kind)
开发者ID:ruqaiya,项目名称:shuup,代码行数:2,代码来源:_discounts.py
示例13: get_model_url
def get_model_url(self, object, kind):
return (
derive_model_url(Tax, "shuup_admin:tax", object, kind) or
derive_model_url(TaxClass, "shuup_admin:tax_class", object, kind) or
derive_model_url(CustomerTaxGroup, "shuup_admin:customer_tax_group", object, kind)
)
开发者ID:NamiStudio,项目名称:shuup,代码行数:6,代码来源:__init__.py
示例14: get_model_url
def get_model_url(self, object, kind):
return derive_model_url(TaxRule, "shuup_admin:default_tax.tax_rule", object, kind)
开发者ID:ahmadzai,项目名称:shuup,代码行数:2,代码来源:__init__.py
示例15: get_model_url
def get_model_url(self, object, kind):
return derive_model_url(self.model, self.url_name_prefix, object, kind)
开发者ID:shawnadelic,项目名称:shuup,代码行数:2,代码来源:__init__.py
示例16: get_model_url
def get_model_url(self, object, kind):
return derive_model_url(Carousel, "shuup_admin:carousel", object, kind)
开发者ID:suutari,项目名称:shoop,代码行数:2,代码来源:__init__.py
示例17: get_model_url
def get_model_url(self, object, kind):
if not hasattr(object, "admin_url_suffix"):
return super(CampaignAdminModule, self).get_model_url(object, kind)
admin_url = "shuup_admin:%s" % object.admin_url_suffix
return derive_model_url(type(object), admin_url, object, kind)
开发者ID:suutari,项目名称:shoop,代码行数:5,代码来源:__init__.py
示例18: get_model_url
def get_model_url(self, object, kind):
return derive_model_url(Product, "shuup_admin:product", object, kind)
开发者ID:suutari,项目名称:shoop,代码行数:2,代码来源:__init__.py
示例19: get_model_url
def get_model_url(self, object, kind, shop=None):
return derive_model_url(Task, "shuup_admin:task", object, kind)
开发者ID:ruqaiya,项目名称:shuup,代码行数:2,代码来源:__init__.py
注:本文中的shuup.admin.utils.urls.derive_model_url函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论