docs: def preview(self, request):
          """
          Return a occurrences in JSON format up until the configured limit.
          """
          recurrence_rule = request.POST.get('recurrence_rule')
          limit = int(request.POST.get('limit', 10))
          try:
              rruleset = rrule.rrulestr(
                  recurrence_rule, dtstart=djtz.now(), forceset=True)
          except ValueError as e:
              data = {
                  'error': six.text_type(e),
              }
          else:
              data = {
                  'occurrences': rruleset[:limit]
              }
          return JsonResponse(data)