Changes between Version 3 and Version 6 of Ticket #26378


Ignore:
Timestamp:
Mar 21, 2016, 1:07:50 PM (9 years ago)
Author:
Tim Graham
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #26378

    • Property Owner changed from nobody to Amine Yaiche
    • Property Triage Stage UnreviewedAccepted
    • Property Status newassigned
    • Property Has patch set
  • Ticket #26378 – Description

    v3 v6  
    55# Django==1.8.6
    66from django.db import models
     7
    78class TestIPNoUnpack(models.Model):
    89    ip = models.GenericIPAddressField(null=False, protocol='both', unpack_ipv4=False)
     
    1516
    1617> python manage.py shell
    17 Python 2.7.6 (default, Sep  9 2014, 15:04:36)
    18 Type "copyright", "credits" or "license" for more information.
    19 
    20 IPython 4.0.1 -- An enhanced Interactive Python.
    21 ?         -> Introduction and overview of IPython's features.
    22 %quickref -> Quick reference.
    23 help      -> Python's own help system.
    24 object?   -> Details about 'object', use 'object??' for extra details.
    2518
    2619In [1]: from my.app.models import TestIPNoUnpack, TestIPUnpack
     
    3629
    3730In [6]: testipnounpack.clean_fields()
    38 ---------------------------------------------------------------------------
    39 ValidationError                           Traceback (most recent call last)
    40 <ipython-input-6-9a763f56e907> in <module>()
    41 ----> 1 testipnounpack.clean_fields()
    42 
    43 .../lib/python2.7/site-packages/django/db/models/base.pyc in clean_fields(self, exclude)
    44    1194
    45    1195         if errors:
    46 -> 1196             raise ValidationError(errors)
    47    1197
    48    1198     @classmethod
    4931
    5032ValidationError: {'ip': [u'Enter a valid IPv4 or IPv6 address.']}
     
    5335
    5436In [8]: testipnounpack2.clean_fields()
    55 ---------------------------------------------------------------------------
    56 ValidationError                           Traceback (most recent call last)
    57 <ipython-input-8-e228d0855286> in <module>()
    58 ----> 1 testipnounpack2.clean_fields()
    59 
    60 .../lib/python2.7/site-packages/django/db/models/base.pyc in clean_fields(self, exclude)
    61    1194
    62    1195         if errors:
    63 -> 1196             raise ValidationError(errors)
    64    1197
    65    1198     @classmethod
    6637
    6738ValidationError: {'ip': [u'Enter a valid IPv4 or IPv6 address.']}
Back to Top