original_docstring: Get a recurrence object for the data passed in.
docstring: Get a recurrence object for the data passed in.
docstring_tokens: Get a recurrence object for the data passed in .
code: def value_from_datadict(self, data, files, name):
          """Get a recurrence object for the data passed in."""
          recurrence_kwargs = {}
          freq = data.get('{0}_freq'.format(name))
  
          if freq == -1 or freq == '-1':
              # This means there is no recurrence so don't pass any values on
              return Recurrence()
  
          # Get the ending value (count or until)
          ending = data.get('{0}_ending'.format(name))
  
          if ending == 'count':
              count = data.get('{0}_count'.format(name))
  
              if count != None:
                  recurrence_kwargs['count'] = count
          elif ending == 'until':
              until = data.get('{0}_until'.format(name))
  
              if until != None:
                  recurrence_kwargs['until'] = until
  
          # Get all single value items
          for key in ('dtstart', 'freq', 'interval', 'wkst'):
              key_value = data.get('{0}_{1}'.format(name, key))
  
              if key_value:
                  recurrence_kwargs[key] = key_value
  
          # Get all list items
          for key in ('byyearday', 'bymonth', 'bymonthday', 'byweekday',
                      'byweekno', 'byhour', 'byminute', 'bysecond', 'byeaster',
                      'bysetpos'):
              key_value = data.getlist('{0}_{1}'.format(name, key))
  
              if key_value and key_value != ['']:
                  recurrence_kwargs[key] = key_value
  
          return Recurrence(**recurrence_kwargs)
code_tokens: def value_from_datadict ( self , data , files , name ) : recurrence_kwargs = { } freq = data . get ( '{0}_freq' . format ( name ) ) if freq == - 1 or freq == '-1' : return Recurrence ( ) ending = data . get ( '{0}_ending' . format ( name ) ) if ending == 'count' : count = data . get ( '{0}_count' . format ( name ) ) if count != None : recurrence_kwargs [ 'count' ] = count elif ending == 'until' : until = data . get ( '{0}_until' . format ( name ) ) if until != None : recurrence_kwargs [ 'until' ] = until for key in ( 'dtstart' , 'freq' , 'interval' , 'wkst' ) : key_value = data . get ( '{0}_{1}' . format ( name , key ) ) if key_value : recurrence_kwargs [ key ] = key_value for key in ( 'byyearday' , 'bymonth' , 'bymonthday' , 'byweekday' , 'byweekno' , 'byhour' , 'byminute' , 'bysecond' , 'byeaster' , 'bysetpos' ) : key_value = data . getlist ( '{0}_{1}' . format ( name , key ) ) if key_value and key_value != [ '' ] : recurrence_kwargs [ key ] = key_value return Recurrence ( ** recurrence_kwargs )
short_docstring: Get a recurrence object for the data passed in.
short_docstring_tokens: Get a recurrence object for the data passed in .
comment: """Get a recurrence object for the data passed in."""$SEP$# This means there is no recurrence so don't pass any values on$SEP$# Get the ending value (count or until)$SEP$# Get all single value items$SEP$# Get all list items