Changeset 6411 for branches


Ignore:
Timestamp:
Dec 7, 2008, 9:46:03 PM (16 years ago)
Author:
roland
Message:

A check in with some addons, still code in progress.
Some niceties in admin.

Location:
branches/exodus-roland
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/exodus-roland/Makefile

    r6357 r6411  
    3030        @sqlite3 $(SQLDB) < debug.sql
    3131
     32dbdebug:
     33#Put debug.sql in database
     34        @sqlite3 $(SQLDB) < debug.sql
     35
     36dbclean:
     37# remove the database
     38        @rm -r $(SQLDB)
     39
    3240clean:
    3341#Remove all created data, development ground, but keep downloaded files
  • branches/exodus-roland/exodus/admin.py

    r6404 r6411  
    66from exodus.contrib import ReadOnlyAdminFields
    77
     8class PublicAPInline(admin.TabularInline):
     9    model = PublicAP
     10    extra = 1
     11
    812class InterfaceInline(admin.TabularInline):
    913    model = Interface
    10     extra = 1
     14    extra = 2
    1115    fieldsets = (
    1216        (None, {
     
    1519        }),
    1620    )
     21    #inlines = [ PublicAPInline, ]
    1722
    1823class NodeAdmin(ReadOnlyAdminFields, admin.ModelAdmin):
     
    2732        }),
    2833    )
     34    inlines = [InterfaceInline, ]
     35
     36class NodeInline(admin.TabularInline):
     37    model = Node
     38    extra = 2
    2939
    3040class LocationAdmin(admin.ModelAdmin):
    3141    search_fields = ['description']
     42    inlines = [ NodeInline, ]
    3243
    3344admin.site.register(Antenna)
     
    4152
    4253databrowse.site.register(Antenna)
    43 databrowse.site.register(Location)
     54databrowse.site.register(Location, LocationAdmin)
    4455databrowse.site.register(DnsServer)
    4556databrowse.site.register(Network)
  • branches/exodus-roland/exodus/models.py

    r6403 r6411  
    55from django import forms
    66
    7 # Create your models here.
    87
    98#No need to formalize it; CHOICES don't change much
     
    1413                        ('pl', 'planned'),
    1514                        )
    16 
     15       
    1716POLAR_CHOICES = (
    1817                        ('hr', 'horizontal'),
     
    7978    name = models.CharField(max_length=30, unique=True)
    8079    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')
    8282    masterip = models.IPAddressField(unique=True)
    8383    network = models.ForeignKey(Network,default=1)
     
    9494        node = models.ForeignKey(Node)
    9595        type = models.CharField(max_length=10, choices=INTERFACE_TYPE_CHOICES, \
    96             default=1)
     96            default='eth')
    9797        iface = models.CharField(max_length=10, verbose_name="interface", \
    9898            default='eth0')
  • branches/exodus-roland/exodus/tests.py

    r6371 r6411  
    180180        from wllogic import addInterlinkIP
    181181        self.fail('Test not implemented')
     182
     183class 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 =
    182190   
    183191def suite():
  • branches/exodus-roland/exodus/urls.py

    r6357 r6411  
    99from django.contrib import admin
    1010admin.autodiscover()
    11 
    12 #
    13 # experimental databrowse code
    1411
    1512urlpatterns = patterns('',
  • branches/exodus-roland/initial_data.json

    r6396 r6411  
    472472      "groups": [],
    473473      "user_permissions": [],
    474       "password": "sha1$b2535$dbc48961d155733361f2ad083032bbbd9b125188",
     474      "password": "sha1$4576b$fbd6265a7bac27c85f649446be57169c2627808d",
    475475      "email": "techniek@lijst.wirelessleiden.nl",
    476476      "date_joined": "2008-11-28 20:23:55"
Note: See TracChangeset for help on using the changeset viewer.