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


Python models.unmemoized_get_config函数代码示例

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


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

示例1: context

def context(request, **kw):
    statuses = dict((k, unicode(v)) for k, v in amo.STATUS_CHOICES_API.items())
    ctx = dict(motd=unmemoized_get_config('mkt_reviewers_motd'),
               queue_counts=queue_counts(request),
               search_url=reverse('reviewers-search-api'),
               statuses=statuses, point_types=amo.REVIEWED_MARKETPLACE)
    ctx.update(kw)
    return ctx
开发者ID:petercpg,项目名称:zamboni,代码行数:8,代码来源:views.py

示例2: motd

def motd(request):
    message = unmemoized_get_config("mkt_developers_motd")
    form = MOTDForm(request.POST or None, initial={"motd": message})
    if request.method == "POST" and form and form.is_valid():
        set_config("mkt_developers_motd", form.cleaned_data["motd"])
        messages.success(request, _("Changes successfully saved."))
        return redirect(reverse("mkt.developers.motd"))
    return render(request, "developers/motd.html", {"form": form})
开发者ID:ngokevin,项目名称:zamboni,代码行数:8,代码来源:views.py

示例3: dashboard

def dashboard(request):
    addons, filter = addon_listing(request)
    addons = amo.utils.paginate(request, addons, per_page=10)
    data = dict(addons=addons, sorting=filter.field, filter=filter,
                sort_opts=filter.opts,
                motd=unmemoized_get_config('mkt_developers_motd')
    )
    return render(request, 'developers/apps/dashboard.html', data)
开发者ID:patilkr,项目名称:zamboni,代码行数:8,代码来源:views.py

示例4: dashboard

def dashboard(request):
    addons, sorting = addon_listing(request)
    addons = paginate(request, addons, per_page=10)
    data = {
        'addons': addons,
        'sorting': sorting,
        'motd': unmemoized_get_config('mkt_developers_motd')
    }
    return render(request, 'developers/apps/dashboard.html', data)
开发者ID:kumar303,项目名称:zamboni,代码行数:9,代码来源:views.py

示例5: motd

def motd(request):
    form = None
    motd = unmemoized_get_config('mkt_reviewers_motd')
    if acl.action_allowed(request, 'AppReviewerMOTD', 'Edit'):
        form = MOTDForm(request.POST or None, initial={'motd': motd})
    if form and request.method == 'POST' and form.is_valid():
        set_config(u'mkt_reviewers_motd', form.cleaned_data['motd'])
        messages.success(request, _('Changes successfully saved.'))
        return redirect(reverse('reviewers.apps.motd'))
    data = context(request, form=form)
    return render(request, 'reviewers/motd.html', data)
开发者ID:petercpg,项目名称:zamboni,代码行数:11,代码来源:views.py

示例6: dashboard

def dashboard(request):
    addons, sorting = addon_listing(request)
    addons = paginate(request, addons, per_page=10)
    data = {"addons": addons, "sorting": sorting, "motd": unmemoized_get_config("mkt_developers_motd")}
    return render(request, "developers/apps/dashboard.html", data)
开发者ID:pkdevboxy,项目名称:zamboni,代码行数:5,代码来源:views.py


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