code: def varchar(self, field=None):
          
          assert field is not None, "The field parameter must be passed to the 'varchar' method."
          max_length = field.max_length
  
          def source():
              length = random.choice(range(1, max_length + 1))
              return "".join(random.choice(general_chars) for i in xrange(length))
          return self.get_allowed_value(source, field)
docs: Returns a chunk of text, of maximum length 'max_length'