Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(0)  |  Derive(0)  |  Import(3)

src/b/t/btb-HEAD/scanblog/subscriptions/views.py   btb(Download)
from django.shortcuts import render, get_object_or_404, redirect
 
from notification.models import Notice, NoticeType, NoticeSetting, NOTICE_MEDIA, get_notification_setting
from subscriptions.models import Subscription
from subscriptions.forms import MailingListInterestForm
    for notice_type in notice_types:
        settings_row = []
        for medium_id, medium_display in NOTICE_MEDIA:
            form_label = "%s_%s" % (notice_type.label, medium_id)
            setting = get_notification_setting(request.user, notice_type, medium_id)
        settings_table.append({"notice_type": notice_type, "cells": settings_row})
    notice_settings = {
        "column_headers": [medium_display for medium_id, medium_display in NOTICE_MEDIA],
        "rows": settings_table,
    }

src/d/j/django-notification-1.1.1/notification/views.py   django-notification(Download)
from django.contrib.auth.decorators import login_required
 
from notification.models import NoticeSetting, NoticeType, NOTICE_MEDIA
 
 
    for notice_type in notice_types:
        settings_row = []
        for medium_id, medium_display in NOTICE_MEDIA:
            form_label = "%s_%s" % (notice_type.label, medium_id)
            setting = NoticeSetting.for_user(request.user, notice_type, medium_id)
 
    settings = {
        "column_headers": [medium_display for medium_id, medium_display in NOTICE_MEDIA],
        "rows": settings_table,
    }

src/e/c/econsensus-HEAD/django/econsensus/publicweb/tests/factories.py   econsensus(Download)
 
from publicweb.models import Decision, Feedback
from notification.models import (ObservedItem, NoticeType, 
    NOTICE_MEDIA_DEFAULTS, NOTICE_MEDIA)
 
class NoticeTypeFactory(factory.DjangoModelFactory):
    FACTORY_FOR = NoticeType
    default = NOTICE_MEDIA_DEFAULTS[NOTICE_MEDIA[0][0]]
 
class ObservedItemFactory(factory.DjangoModelFactory):