Changeset 6434
- Timestamp:
- Dec 10, 2008, 7:10:22 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile
r6431 r6434 55 55 @./bin/test 56 56 57 genesis: 58 # import data from exodus 59 @./bin/django runscript genesis_to_exodus 60 57 61 new: clean debug-init debug 58 62 #Fresh start, with new datebase which include debugging code -
trunk/exodus/admin.py
r6431 r6434 4 4 from django import forms 5 5 from exodus.models import * 6 from exodus.forms import NodeForm 6 from exodus.forms import NodeForm, InterfaceForm 7 7 from exodus.contrib import ReadOnlyAdminFields 8 8 … … 16 16 class InterfaceInline(admin.TabularInline): 17 17 model = Interface 18 form = InterfaceForm 18 19 extra = 2 19 20 fieldsets = ( … … 41 42 class NodeInline(admin.TabularInline): 42 43 model = Node 44 form = NodeForm 43 45 extra = 2 46 fieldsets = ('name', 'status', 'location', 'network') 44 47 45 48 class LocationAdmin(admin.ModelAdmin): -
trunk/exodus/forms.py
r6433 r6434 1 1 from django import forms 2 from exodus.models import Node 2 from exodus.models import Node, Interface 3 3 from exodus.wllogic import free_master_ip, free_interlink_ip, add_interlink_ip 4 4 from exodus.contrib import ReadOnlyWidget … … 10 10 11 11 def clean_masterip(self): 12 import pdb; pdb.set_trace() ;13 12 new_network = self.cleaned_data.get('network') 14 13 #XXX: racing conditions with free_master_ip and save()? … … 24 23 #XXX: Need to update ipconfigurations for depending interfaces 25 24 masterip = free_master_ip(new_network) 26 raise forms.ValidationError("Foutmelding van Rick en Roland")27 25 return masterip 28 26 29 #def save(self, commit): 30 # # want to override this, but can't figure out how. 31 # super(NodeForm, self).save() 27 28 class InterfaceForm(forms.ModelForm): 29 class Meta: 30 model = Interface
Note:
See TracChangeset
for help on using the changeset viewer.