- Timestamp:
- Dec 7, 2008, 9:46:03 PM (16 years ago)
- Location:
- branches/exodus-roland
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/exodus-roland/Makefile
r6357 r6411 30 30 @sqlite3 $(SQLDB) < debug.sql 31 31 32 dbdebug: 33 #Put debug.sql in database 34 @sqlite3 $(SQLDB) < debug.sql 35 36 dbclean: 37 # remove the database 38 @rm -r $(SQLDB) 39 32 40 clean: 33 41 #Remove all created data, development ground, but keep downloaded files -
branches/exodus-roland/exodus/admin.py
r6404 r6411 6 6 from exodus.contrib import ReadOnlyAdminFields 7 7 8 class PublicAPInline(admin.TabularInline): 9 model = PublicAP 10 extra = 1 11 8 12 class InterfaceInline(admin.TabularInline): 9 13 model = Interface 10 extra = 114 extra = 2 11 15 fieldsets = ( 12 16 (None, { … … 15 19 }), 16 20 ) 21 #inlines = [ PublicAPInline, ] 17 22 18 23 class NodeAdmin(ReadOnlyAdminFields, admin.ModelAdmin): … … 27 32 }), 28 33 ) 34 inlines = [InterfaceInline, ] 35 36 class NodeInline(admin.TabularInline): 37 model = Node 38 extra = 2 29 39 30 40 class LocationAdmin(admin.ModelAdmin): 31 41 search_fields = ['description'] 42 inlines = [ NodeInline, ] 32 43 33 44 admin.site.register(Antenna) … … 41 52 42 53 databrowse.site.register(Antenna) 43 databrowse.site.register(Location )54 databrowse.site.register(Location, LocationAdmin) 44 55 databrowse.site.register(DnsServer) 45 56 databrowse.site.register(Network) -
branches/exodus-roland/exodus/models.py
r6403 r6411 5 5 from django import forms 6 6 7 # Create your models here.8 7 9 8 #No need to formalize it; CHOICES don't change much … … 14 13 ('pl', 'planned'), 15 14 ) 16 15 17 16 POLAR_CHOICES = ( 18 17 ('hr', 'horizontal'), … … 79 78 name = models.CharField(max_length=30, unique=True) 80 79 location = models.ForeignKey(Location) 81 status = models.CharField(max_length=10, choices=STATUS_CHOICES, default=1) 80 status = models.CharField(max_length=10, choices=STATUS_CHOICES , \ 81 default='up') 82 82 masterip = models.IPAddressField(unique=True) 83 83 network = models.ForeignKey(Network,default=1) … … 94 94 node = models.ForeignKey(Node) 95 95 type = models.CharField(max_length=10, choices=INTERFACE_TYPE_CHOICES, \ 96 default= 1)96 default='eth') 97 97 iface = models.CharField(max_length=10, verbose_name="interface", \ 98 98 default='eth0') -
branches/exodus-roland/exodus/tests.py
r6371 r6411 180 180 from wllogic import addInterlinkIP 181 181 self.fail('Test not implemented') 182 183 class Manager(unittest.TestCase): 184 def test_interface_manager(self): 185 class link(object): 186 def __init__(self, type): 187 self.type = type 188 from exodus.manager import InterfaceManager 189 11a_link = 182 190 183 191 def suite(): -
branches/exodus-roland/exodus/urls.py
r6357 r6411 9 9 from django.contrib import admin 10 10 admin.autodiscover() 11 12 #13 # experimental databrowse code14 11 15 12 urlpatterns = patterns('', -
branches/exodus-roland/initial_data.json
r6396 r6411 472 472 "groups": [], 473 473 "user_permissions": [], 474 "password": "sha1$ b2535$dbc48961d155733361f2ad083032bbbd9b125188",474 "password": "sha1$4576b$fbd6265a7bac27c85f649446be57169c2627808d", 475 475 "email": "techniek@lijst.wirelessleiden.nl", 476 476 "date_joined": "2008-11-28 20:23:55"
Note:
See TracChangeset
for help on using the changeset viewer.