django_any/forms.py
def ipaddress_field_data(field, **kwargs):
    """
    Return random value for IPAddressField
    
    >>> result = any_form_field(forms.IPAddressField())
    >>> type(result)
    <type 'str'>
    >>> from django.core.validators import ipv4_re
    >>> import re
    >>> re.match(ipv4_re, result) is not None
    True
    """
    choices = kwargs.get('choices')
    if choices:
        return random.choice(choices)
    else:
        nums = [str(xunit.any_int(min_value=0, max_value=255)) for _ in xrange(0, 4)]
        return ".".join(nums)
def ipaddress_field_data(field, **kwargs):
    """
    Return random value for IPAddressField
    
    >>> result = any_form_field(forms.IPAddressField())
    >>> type(result)
    <type 'str'>
    >>> from django.core.validators import ipv4_re
    >>> import re
    >>> re.match(ipv4_re, result) is not None
    True
    """
    choices = kwargs.get('choices')
    if choices:
        return random.choice(choices)
    else:
        nums = [str(xunit.any_int(min_value=0, max_value=255)) for _ in xrange(0, 4)]
        return ".".join(nums)
def ipaddress_field_data ( field , * * kwargs ) : choices = kwargs . get ( 'choices' ) if choices : return random . choice ( choices ) else : nums = [ str ( xunit . any_int ( min_value = 0 , max_value = 255 ) ) for _ in xrange ( 0 , 4 ) ] return "." . join ( nums )
Return random value for IPAddressField
    
    >>> result = any_form_field(forms.IPAddressField())
    >>> type(result)
    <type 'str'>
    >>> from django.core.validators import ipv4_re
    >>> import re
    >>> re.match(ipv4_re, result) is not None
    True
Return random value for IPAddressField >>> result = any_form_field ( forms . IPAddressField () ) >>> type ( result ) <type str > >>> from django . core . validators import ipv4_re >>> import re >>> re . match ( ipv4_re result ) is not None True