• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python models.create_notice_type函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: create_notice_types

def create_notice_types(app, created_models, verbosity, **kwargs):
    notification.create_notice_type(
        'event_added',
        _('Event Added'),
        _('An event has been added'))

    notification.create_notice_type(
        'event_edited',
        _('Event Edited'),
        _('An event has been edited'))

    notification.create_notice_type(
        'event_deleted',
        _('Event Deleted'),
        _('An event has been deleted'))

    notification.create_notice_type(
        'event_registration_confirmation',
        _('Event Registration Confirmation'),
        _('The email you receive confirming your registration'))

    notification.create_notice_type(
        'event_registration_cancelled',
        _('Event Registration Cancelled'),
        _('Notify administrators that someone has cancelled their event registration'))
开发者ID:BakethemPie,项目名称:tendenci,代码行数:25,代码来源:__init__.py


示例2: create_notice_types

 def create_notice_types(app, created_models, verbosity, **kwargs):
     notification.create_notice_type("friendship_requested", 
     _("Friendship Requested"), _("you have received a friend request"), 
     default=2)
     notification.create_notice_type("friendship_accepted", 
     _("Friendship Accepted"), _("your friend request was accepted"), 
     default=2)
开发者ID:jonykalavera,项目名称:django-simple-friends,代码行数:7,代码来源:management.py


示例3: test_create_notice_type_with_same

 def test_create_notice_type_with_same(self):
     notice_type = create_notice_type("task new", "new task added", "task")
     notice_type1 = create_notice_type("task new", "new task added11", "task")
     notice_types = NoticeType.objects.filter(label=notice_type.label)
     self.assertEqual(len(notice_types), 1)
     
     notice_type.delete()
开发者ID:cjie888,项目名称:django-ppmsg,代码行数:7,代码来源:tests.py


示例4: create_notice_types

 def create_notice_types(app, created_models, verbosity, **kwargs):        
     notification.create_notice_type("distribution_fresh_list", _("Fresh List notice"), _("Here are the fresh foods available this week"), default=2)
     notification.create_notice_type("distribution_pickup_list", _("Pickup List notice"), _("Here are the items to be picked up today"), default=2) 
     notification.create_notice_type("distribution_order_list", _("Order List notice"), _("Here are the orders to be delivered today"), default=2)  
     notification.create_notice_type("distribution_order_notice", _("Order Notice"), _("Here are the items ordered by this customer today"), default=2)
     notification.create_notice_type("distribution_short_change_notice",
                                     _("Short Change Notice"), _("Here are the short changes for this order"), default=2) 
开发者ID:bhaugen,项目名称:django-fad,代码行数:7,代码来源:management.py


示例5: sendMail_RegisterUser

def sendMail_RegisterUser(senderuser,
                          receiveruser,
                          activity,
                          conjuction,
                          nid,
                          url=None):

    nodeid = NID.objects.get(id=nid)
    sys = nodeid.ref
    if url == None:
        url = sys.get_view_object_url
    site = Site.objects.get_current()
    render = render_to_string(
        "/gstudio/notification/label.html", {
            'sender': senderuser,
            'activity': activity,
            'conjunction': conjuction,
            'object': sys.title,
            'url': url,
            'site': site
        })
    notification.create_notice_type(render, "Invitation Received",
                                    "you have received an invitation")
    notification.send(
        receiveruser, render, {"from_user": senderuser}, sender=senderuser)
    return
开发者ID:ruppeshnalwaya1993,项目名称:gitGnowsys,代码行数:26,代码来源:methods.py


示例6: create_notice_types

 def create_notice_types(app, created_models, verbosity, **kwargs):
     notices = (
         ("badge_edited", _("Badge edited"),
             _("one of your badges has been edited")),
         ("badge_awarded", _("Badge awarded"),
             _("one of your badges has been awarded to someone")),
         ("award_received", _("Award received"),
             _("you have been awarded a badge")),
         #("award_accepted", _("Badge award accepted"),
         #    _("someone has accepted an award for one of your badges")),
         #("award_declined", _("Badge award declined"),
         #    _("someone has declined an award for one of your badges")),
         # TODO: Notification on progress?
         ("nomination_submitted", _("Nomination submitted"),
             _("someone has submitted a nomination for one of your badges")),
         ("nomination_approved", _("Nomination approved"),
             _("a nomination you submitted for an award has been approved")),
         ("nomination_rejected", _("Nomination rejected"),
             _("a nomination you submitted for an award has been rejected")),
         ("nomination_received", _("Nomination received"),
             _("a nomination to award you a badge was approved")),
         ("nomination_accepted", _("Nomination accepted"),
             _("a nomination you submitted for an award has been accepted")),
     )
     for notice in notices:
         notification.create_notice_type(*notice)
开发者ID:NoriVicJr,项目名称:django-badger,代码行数:26,代码来源:__init__.py


示例7: create_notice_types

    def create_notice_types(app, created_models, verbosity, **kwargs):
        notices = (
            ("welcome", _("Welcome"),
                _(u"welcome to Mozilla Badges")),

            ("badge_edited", _(u"Badge edited"),
                _(u"one of your badges has been edited")),
            ("badge_awarded", _(u"Badge awarded"),
                _(u"one of your badges has been awarded")),

            ("team_badge_management", _(u"Team badge created"),
                _(u"a new badge has been added to a team you manage")),
            ("team_follower_badge_created", _(u"Team badge created"),
                _(u"a team you follow has created a new badge")),

            ("award_received", _(u"Award received"),
                _(u"you have been awarded a badge")),
            ("award_accepted", _(u"Badge award accepted"),
                _(u"someone has accepted an award for one of your badges")),
            ("award_declined", _(u"Badge award declined"),
                _(u"someone has declined an award for one of your badges")),

            ("nomination_submitted", _(u"Nomination submitted"),
                _(u"someone has submitted a nomination for one of your badges")),
            ("nomination_approved", _(u"Nomination approved"),
                _(u"a nomination you submitted for an award has been approved")),
            ("nomination_rejected", _(u"Nomination rejected"),
                _(u"a nomination you submitted for an award has been rejected")),
            ("nomination_received", _(u"Nomination received"),
                _(u"a nomination to award you a badge was approved")),
            ("nomination_accepted", _(u"Nomination accepted"),
                _(u"a nomination you submitted for an award has been accepted")),
        )
        for notice in notices:
            notification.create_notice_type(*notice)
开发者ID:christensenep,项目名称:mozilla-badges,代码行数:35,代码来源:__init__.py


示例8: handle_noargs

 def handle_noargs(self, **options):
     self.stdout.write("Adofex-specific notice types\n")
     for n in NOTICE_TYPES:
         self.stdout.write("Creating %s\n" % n["label"])
         notification.create_notice_type(n["label"], n["display"],
                                         n["description"], n["default"])
     self.stdout.write("Default set of notice types initialized successfully.\n")
开发者ID:AntoineTurmel,项目名称:adofex,代码行数:7,代码来源:mzcreatenoticetypes.py


示例9: create_notice_types

 def create_notice_types(self):
     if "notification" in settings.INSTALLED_APPS:
         from notification import models as notification
         notification.create_notice_type("wall_new_comment_your_post", _("New Comment on Wall Post You Created"), _("someone has commented on your wall post"))
         notification.create_notice_type("wall_new_comment_your_comment", _("New Comment on Wall Post You Commented On"), _("someone has commented on a wall post you commented on"))
     else:
         print "Skipping creation of NoticeTypes as notification app not found"
开发者ID:mloudon,项目名称:bikematch,代码行数:7,代码来源:addNotificationTypes.py


示例10: create_notice_types

 def create_notice_types(app, created_models, verbosity, **kwargs):
     notification.create_notice_type("friends_invite", _("Invitation Received"), _("you have received an invitation"))
     notification.create_notice_type("friends_accept", _("Acceptance Received"), _("an invitation you sent has been accepted"))
     notification.create_notice_type("comment_receive", _("Comment Received"), _("you have received a comment"))
     notification.create_notice_type("mentioned", _("Mentioned"), _("You have been mentioned"))
     #so far, people can add friends without being approved
     notification.create_notice_type("friends_add", _("Friend Added"), _("Someone added you as a friend")) 
开发者ID:flyingoverthetop,项目名称:osl_notebook,代码行数:7,代码来源:manage.py


示例11: create_notice_type

 def create_notice_type(self):
     """Create (or update) a notice type for discussion instance."""
     create_notice_type(
             label=self.notification_label,
             display=self.notification_display,
             description="A new post has been added .",
             slug=self._meta.app_label,
             default=0)
开发者ID:MechanisM,项目名称:django-discussion,代码行数:8,代码来源:models.py


示例12: create_notice_types

def create_notice_types(app, created_models, verbosity, **kwargs):
    notification.create_notice_type("presskitview_band_comment", _("band comment on presskit"), _("A band has commented a presskit view request"))
    notification.create_notice_type("presskitview_venue_comment", _("venue comment on presskit"), _("A venue has commented a presskit view request"))

    notification.create_notice_type("presskitview_accepted_by_venue", _("venue accepted to setup a gig"), _("A venue has accepted to set up a gig"))
    notification.create_notice_type("presskitview_refused_by_venue", _("venue refused to setup a gig"), _("A venue has refused to set up a gig"))

    notification.create_notice_type("presskitview_new", _("band proposed to set up gig to a venue"), _("A band has proposed to set up a gig"))
开发者ID:SpreadBand,项目名称:SpreadBand,代码行数:8,代码来源:__init__.py


示例13: handle

    def handle(self, *args, **options):
        notification.create_notice_type("create_meeting_slot", _("Meeting slot created"), _("your new slot is ready"))
        notification.create_notice_type("reserved_meeting_slot", _("Meeting has been accepted"), _("your meeting has accepted"))
        notification.create_notice_type("cancel_meeting", _("Meeting cancelled"), _("your meeting has been cancelled"))
        notification.create_notice_type("pre_meeting_reminder", _("Your upcoming meeting"), _("your meetings starts in 24 hours"))
        notification.create_notice_type("post_meeting_feedback_request", _("Let us know"), _("how did your meeting go?"))

        self.stdout.write('--> Created notice types')
开发者ID:Code4PuertoRico,项目名称:horas,代码行数:8,代码来源:create_notice_types.py


示例14: create_notice_types

 def create_notice_types(app, created_models, verbosity, **kwargs):
     notification.create_notice_type('usergroups_application',
                                     _("Application Received"),
                                     _("someone has applied to join a "
                                       "group"))
     notification.create_notice_type('usergroups_application_approved',
                                     _("Application Approved"),
                                     _("someone has approved an "
                                       "application to join a group"))
开发者ID:lyoniionly,项目名称:django-usergroups,代码行数:9,代码来源:management.py


示例15: create_notice_types

 def create_notice_types(app, created_models, verbosity, **kwargs):
     notification.create_notice_type(
         "new_reply", _("New reply"),
         _("new reply to a post you're following"),
     )
     notification.create_notice_type(
         "new_post", _("New post"),
         _("new letter from an author or subject you're following"),
     )
开发者ID:yourcelf,项目名称:btb,代码行数:9,代码来源:models.py


示例16: send

def send(receivers, type, info):
    try:
        notification.send(receivers, type, info)
    except ObjectDoesNotExist:
        notify_type = notification_types[type]
        if notify_type:
            notification.create_notice_type(type, _(notify_type[0]), _(notify_type[1]))
            notification.send(receivers, type, info)
        else:
            logger.error("can't create notification type: %s" % type)
开发者ID:shawiz,项目名称:idlebook,代码行数:10,代码来源:notifications.py


示例17: create_activity_types

def create_activity_types(app, created_models, verbosity, **kwargs):

    if notification:
        notification.create_notice_type("new_follower", _("New Follower"), _("somebody is following you now"), default=2)

    try:
        ActivityTypes.objects.get_or_create(name="started_following", batch_time_minutes=30, is_batchable=True)
        ActivityTypes.objects.get_or_create(name="likes", is_batchable=False)
    except:
        pass
开发者ID:Mondego,项目名称:pyreco,代码行数:10,代码来源:allPythonContent.py


示例18: notifyactivity

def notifyactivity(request, activ, sys_id, userid):
    print "activity =", activ
    sys = ""
    box = ""
    if activ == "edited_thread":
        print "edited thread"
        ss = System.objects.filter(id=sys_id)
        if ss:
            sys = System.objects.get(id=sys_id)
            box = sys.system_set.all()[0]
            sysurl = str(sys.get_view_url)

    else:
        print "edited deleted", sys_id
        ss = Gbobject.objects.filter(id=sys_id)
        if ss:
            print "inside ss"
            ss = Gbobject.objects.get(id=int(sys_id))
            if activ == "edited_twist":
                sys = ss.getthread_of_twist
                sysurl = "gstudio/" + str(show_nodesystem(sys.id))
                box = get_threadbox_of_twist(int(sys_id))

            elif activ == "deleted_response" or "added_response":
                print "ss=", ss
                systhd = ss.getthread_of_response
                sys = systhd
                if systhd:
                    box = systhd.system_set.all()[0]
                    sysurl = str(systhd.get_view_url)
                    sys_id = str(sys.id)

            print box, "box"
    if sys:
        site = Site.objects.get_current()
        render = render_to_string(
            "/gstudio/notification/label.html",
            {
                "sender": request.user,
                "activity": activ,
                "conjunction": "\
-",
                "object": sys.title,
                "url": sysurl,
                "site": site,
            },
        )
        if box:
            for bx in box.member_set.all():
                notification.create_notice_type(render, "Invitation Received", "you have received an invitation")
                notification.send([bx], render, {"from_user": request.user})
    if activ == "edited_thread" or activ == "deleted_response" or activ == "added_response":
        return HttpResponseRedirect("/gstudio/group/gnowsys-grp/" + sys_id)
    elif activ == "edited_twist":
        return HttpResponseRedirect("/gstudio/" + sysurl)
开发者ID:sayiho,项目名称:gnowsys-studio,代码行数:55,代码来源:group.py


示例19: forwards

 def forwards(self, orm):
     "Write your forwards methods here."
     from django.conf import settings
     from django.utils.translation import ugettext_noop as _
     
     if "notification" in settings.INSTALLED_APPS:
         from notification import models as notification
     
         notification.create_notice_type("forum_subscription_reply", _("Subscription Reply"), _("new answer in topic that you subscribed"))
     else:
         print "Skipping creation of NoticeTypes as notification app not found"
开发者ID:jinktv,项目名称:pybbm,代码行数:11,代码来源:0028_notifications.py


示例20: create_notice_types

    def create_notice_types(app, created_models, verbosity, **kwargs):
        # Notifications of stuff I'm doing
        notification.create_notice_type("comment_posted", _("Comment Posted"), _("you have posted a comment"), default=1)
        notification.create_notice_type("comment_replied", _("Comment Replied"), _("you have replied to a comment"), default=1)
        
        # Notifications of stuff that concerns me directly
        notification.create_notice_type("comment_reply_received", _("Reply To Comment Received"), _("you have received a reply to a comment"), default=2)

        # Notifications of stuff from my friends/users I'm following
        notification.create_notice_type("comment_friend_posted", _("Friend Posted Comment"), _("a friend has posted a comment"))
        notification.create_notice_type("comment_friend_replied", _("Friend Replied To Comment"), _("a friend has replied to a comment"))
开发者ID:justquick,项目名称:django-mptt-comments,代码行数:11,代码来源:management.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python models.observe函数代码示例发布时间:2022-05-27
下一篇:
Python utils.url_path_join函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap