示例#1
0
 def get_notifications(self, request):
     if is_telemetry_enabled() and is_in_grace_period() and not is_opt_out():
         yield Notification(
             _("Statistics will be periodically sent to Shoop.io after 24 hours. Click here for more information."),
             title=_("Telemetry"),
             kind="info",
             url="shoop_admin:telemetry"
         )
示例#2
0
文件: __init__.py 项目: sidaga/shoop
 def get_notifications(self, request):
     if is_telemetry_enabled() and is_in_grace_period(
     ) and not is_opt_out():
         yield Notification(_(
             "Statistics will be periodically sent to Shoop.io after 24 hours. Click here for more information."
         ),
                            title=_("Telemetry"),
                            kind="info",
                            url="shoop_admin:telemetry")
示例#3
0
 def get_context_data(self, **kwargs):
     context = super(TelemetryView, self).get_context_data(**kwargs)
     context.update({
         "opt_in": not telemetry.is_opt_out(),
         "is_grace": telemetry.is_in_grace_period(),
         "last_submission_time": telemetry.get_last_submission_time(),
         "submission_data": telemetry.get_telemetry_data(request=self.request, indent=2),
         "title": _("Telemetry")
     })
     return context
示例#4
0
 def get_context_data(self, **kwargs):
     context = super(TelemetryView, self).get_context_data(**kwargs)
     context.update({
         "opt_in":
         not telemetry.is_opt_out(),
         "is_grace":
         telemetry.is_in_grace_period(),
         "last_submission_time":
         telemetry.get_last_submission_time(),
         "submission_data":
         telemetry.get_telemetry_data(request=self.request, indent=2),
         "title":
         _("Telemetry")
     })
     return context