django_any/forms.py
def slug_field_data(field, **kwargs):
    """
    Return random value for SlugField
    
    >>> result = any_form_field(forms.SlugField())
    >>> type(result)
    <type 'str'>
    >>> from django.core.validators import slug_re
    >>> import re
    >>> re.match(slug_re, result) is not None
    True
    """
    min_length = kwargs.get('min_length', 1)
    max_length = kwargs.get('max_length', field.max_length or 20)    
    
    from string import ascii_letters, digits
    letters = ascii_letters + digits + '_-' 
    return xunit.any_string(letters = letters, min_length = min_length, max_length = max_length)
def slug_field_data(field, **kwargs):
    """
    Return random value for SlugField
    
    >>> result = any_form_field(forms.SlugField())
    >>> type(result)
    <type 'str'>
    >>> from django.core.validators import slug_re
    >>> import re
    >>> re.match(slug_re, result) is not None
    True
    """
    min_length = kwargs.get('min_length', 1)
    max_length = kwargs.get('max_length', field.max_length or 20)    
    
    from string import ascii_letters, digits
    letters = ascii_letters + digits + '_-' 
    return xunit.any_string(letters = letters, min_length = min_length, max_length = max_length)
def slug_field_data ( field , * * kwargs ) : min_length = kwargs . get ( 'min_length' , 1 ) max_length = kwargs . get ( 'max_length' , field . max_length or 20 ) from string import ascii_letters , digits letters = ascii_letters + digits + '_-' return xunit . any_string ( letters = letters , min_length = min_length , max_length = max_length )
Return random value for SlugField
    
    >>> result = any_form_field(forms.SlugField())
    >>> type(result)
    <type 'str'>
    >>> from django.core.validators import slug_re
    >>> import re
    >>> re.match(slug_re, result) is not None
    True
Return random value for SlugField >>> result = any_form_field ( forms . SlugField () ) >>> type ( result ) <type str > >>> from django . core . validators import slug_re >>> import re >>> re . match ( slug_re result ) is not None True