Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

        def line_to_string(value, **kwargs):
    """
    A simple wrapper to write one CSV line
    """

    fh = six.StringIO()
    csv.writer(fh, **kwargs).writerow(value)
    return fh.getvalue()
        


src/d/j/django-prbac-0.0.2/django_prbac/forms.py   django-prbac(Download)
            return super(StringListInput, self).render(name, value)
        else:
            rendered_value = django_prbac.csv.line_to_string(list(value))
            return super(StringListInput, self).render(name, rendered_value)
 
            return super(StringSetInput, self).render(name, value)
        else:
            rendered_value = django_prbac.csv.line_to_string(sorted(list(value)))
            return super(StringSetInput, self).render(name, rendered_value)
 

src/d/j/django-prbac-0.0.2/django_prbac/admin.py   django-prbac(Download)
    def parameters__csv(self, instance):
        return django_prbac.csv.line_to_string(sorted(list(instance.parameters)))
    parameters__csv.short_description = 'Parameters'
    parameters__csv.admin_order_field = 'parameters'