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


Python utils.validate_redirect_url函数代码示例

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


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

示例1: get_redirect_path

 def get_redirect_path(self, **kwargs): #pylint: disable=unused-argument
     context = {}
     redirect_path = validate_redirect_url(
         self.request.GET.get(REDIRECT_FIELD_NAME, None))
     if not redirect_path:
         redirect_path = validate_redirect_url(
             self.request.META.get('HTTP_REFERER', ''))
     if redirect_path:
         context.update({REDIRECT_FIELD_NAME: redirect_path})
     return context
开发者ID:irwinlove,项目名称:djaodjin-saas,代码行数:10,代码来源:billing.py

示例2: get_success_url

 def get_success_url(self):
     redirect_path = validate_redirect_url(
         self.request.GET.get(REDIRECT_FIELD_NAME, None))
     if redirect_path:
         return '%s?%s=%s' % (
             reverse('saas_organization_cart', args=(self.customer,)),
             REDIRECT_FIELD_NAME, redirect_path)
     return reverse('saas_organization_cart', args=(self.customer,))
开发者ID:irwinlove,项目名称:djaodjin-saas,代码行数:8,代码来源:billing.py

示例3: get_success_url

 def get_success_url(self):
     redirect_path = validate_redirect_url(
         self.request.GET.get(REDIRECT_FIELD_NAME, None))
     if redirect_path:
         return redirect_path
     messages.success(self.request,
                      "Your bank on file was sucessfully updated")
     return reverse('saas_transfer_info', kwargs=self.get_url_kwargs())
开发者ID:altuzar,项目名称:djaodjin-saas,代码行数:8,代码来源:billing.py

示例4: get_success_url

 def get_success_url(self):
     redirect_path = validate_redirect_url(
         self.request.GET.get(REDIRECT_FIELD_NAME, None))
     if redirect_path:
         return redirect_path
     if self.request.user.is_authenticated():
         return reverse('saas_cart')
     return reverse('saas_cart_plan_list')
开发者ID:lantip,项目名称:djaodjin-saas,代码行数:8,代码来源:billing.py

示例5: get_context_data

 def get_context_data(self, **kwargs):
     context = super(AgreementSignView, self).get_context_data(**kwargs)
     redirect_path = validate_redirect_url(
         self.request.GET.get(REDIRECT_FIELD_NAME, None))
     if redirect_path:
         context.update({REDIRECT_FIELD_NAME: redirect_path})
     context.update({
             'page': _read_agreement_file(self.kwargs.get('agreement'))})
     return context
开发者ID:StephaneRob,项目名称:djaodjin-saas,代码行数:9,代码来源:legal.py

示例6: get_success_url

 def get_success_url(self):
     redirect_path = validate_redirect_url(
         self.request.GET.get(REDIRECT_FIELD_NAME, None))
     if hasattr(self, 'charge') and self.charge:
         if redirect_path:
             return '%s?%s=%s' % (
                 reverse('saas_charge_receipt',
                     args=(self.charge.customer, self.charge.processor_id)),
                 REDIRECT_FIELD_NAME, redirect_path)
         return reverse('saas_charge_receipt',
                     args=(self.charge.customer, self.charge.processor_id))
     if redirect_path:
         return redirect_path
     if self.sole_provider:
         # XXX product_default_start is not defined in url patterns.
         return '/%(organization)s/app/%(subscriber)s/' % {
             'organization': self.sole_provider,
             'subscriber': self.customer}
     return reverse('saas_organization_profile', args=(self.customer,))
开发者ID:wshcdr,项目名称:djaodjin-saas,代码行数:19,代码来源:billing.py

示例7: get_success_url

 def get_success_url(self):
     redirect_path = validate_redirect_url(
         self.request.GET.get(REDIRECT_FIELD_NAME, None))
     if redirect_path:
         return redirect_path
     return reverse(self.redirect_url)
开发者ID:shadowbw,项目名称:djaodjin-saas,代码行数:6,代码来源:plans.py


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