- Timestamp:
- Dec 10, 2008, 1:58:56 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/exodus/models.py
r6428 r6429 2 2 # vi:et:ts=4 3 3 from django.db import models 4 from django.contrib import admin5 from django import forms6 7 4 8 5 #No need to formalize it; CHOICES don't change much … … 13 10 ('pl', 'planned'), 14 11 ) 15 12 16 13 POLAR_CHOICES = ( 17 14 ('hr', 'horizontal'), … … 64 61 65 62 class Network(models.Model): 66 name = models.CharField(max_length=50, unique=True)67 ipspacestart = models.IPAddressField()68 netmask = models.IntegerField()63 name = models.CharField(max_length=50, unique=True) 64 ipspacestart = models.IPAddressField() 65 netmask = models.IntegerField() 69 66 70 67 class Meta: 71 68 verbose_name = 'Network' 72 69 73 def __unicode__(self):74 return self.name70 def __unicode__(self): 71 return self.name 75 72 76 73 class Node(models.Model): … … 112 109 netmask = models.IntegerField(default=30) 113 110 polar = models.CharField(blank=True, max_length=10, choices=POLAR_CHOICES) 114 ssid = models.CharField(max_length= 30, blank=True, null=True)111 ssid = models.CharField(max_length=50, blank=True, null=True) 115 112 mode = models.CharField(max_length=10, choices=WIFI_MODE_CHOICES, blank=True) 116 113 channel = models.IntegerField(blank=True, null=True) … … 127 124 return "%s/%s" % (self.node, self.iface) 128 125 126 # 127 # XXX: Currently not used, require rethinking wether we _really_ still needs 128 # this feature as we going to use a new interlink IP naming model 129 129 class InterfaceAlias(models.Model): 130 130 iface = models.ForeignKey(Interface,related_name='child')
Note:
See TracChangeset
for help on using the changeset viewer.