from django.db import models


from helpers import models as helpermodels


# Create your models here.
class Networks(models.Model):
    POLICIES = (
            ('reject', 'Reject'),
            ('drop', 'Ignore'),
            ('accept', 'Accept'),
            )
    name = models.CharField(max_length=30)
    interface = models.CharField(max_length=10)
    ip_range = helpermodels.IPNetworkField()
    policy = models.CharField("default policy", choices=POLICIES, max_length=6)


from django.db import models


from helpers.models import IPNetworkField


# Create your models here.
class Network(models.Model):
    POLICIES = (
            ('reject', 'Reject'),
            ('drop', 'Ignore'),
            ('accept', 'Accept'),
            )
    name = models.CharField(max_length=30)
    interface = models.CharField(max_length=10)
    ip_range = IPNetworkField()
    policy = models.CharField("default policy", choices=POLICIES, max_length=6)


Fix Network model name; better import
Fix Network model name; better import

  from django.db import models
  
  
- from helpers import models as helpermodels
+ from helpers.models import IPNetworkField
  
  
  # Create your models here.
- class Networks(models.Model):
+ class Network(models.Model):
      POLICIES = (
              ('reject', 'Reject'),
              ('drop', 'Ignore'),
              ('accept', 'Accept'),
              )
      name = models.CharField(max_length=30)
      interface = models.CharField(max_length=10)
-     ip_range = helpermodels.IPNetworkField()
+     ip_range = IPNetworkField()
      policy = models.CharField("default policy", choices=POLICIES, max_length=6)
  
  
Fix Network model name; better import
## Code Before:
from django.db import models


from helpers import models as helpermodels


# Create your models here.
class Networks(models.Model):
    POLICIES = (
            ('reject', 'Reject'),
            ('drop', 'Ignore'),
            ('accept', 'Accept'),
            )
    name = models.CharField(max_length=30)
    interface = models.CharField(max_length=10)
    ip_range = helpermodels.IPNetworkField()
    policy = models.CharField("default policy", choices=POLICIES, max_length=6)


## Instruction:
Fix Network model name; better import
## Code After:
from django.db import models


from helpers.models import IPNetworkField


# Create your models here.
class Network(models.Model):
    POLICIES = (
            ('reject', 'Reject'),
            ('drop', 'Ignore'),
            ('accept', 'Accept'),
            )
    name = models.CharField(max_length=30)
    interface = models.CharField(max_length=10)
    ip_range = IPNetworkField()
    policy = models.CharField("default policy", choices=POLICIES, max_length=6)

