Changeset 6426


Ignore:
Timestamp:
Dec 10, 2008, 12:24:56 PM (16 years ago)
Author:
roland
Message:

added /plain-admin/ to use a admin which has full acces.

Location:
trunk/exodus
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/exodus/admin.py

    r6424 r6426  
    1 from django.contrib import admin
     1from django.contrib.admin.sites import AdminSite
    22from django.contrib import databrowse
    33from django import forms
     
    55from exodus.forms import NodeForm
    66from exodus.contrib import ReadOnlyAdminFields
     7
     8advanced_admin = AdminSite()
     9plain_admin = AdminSite()
    710
    811class PublicAPInline(admin.TabularInline):
     
    4346    inlines = [ NodeInline, ]
    4447
    45 admin.site.register(Antenna)
    46 admin.site.register(Location, LocationAdmin)
    47 admin.site.register(DnsServer)
    48 admin.site.register(Network)
    49 admin.site.register(Node, NodeAdmin)
    50 admin.site.register(Interface)
    51 admin.site.register(PublicAP)
    52 admin.site.register(DhcpStatic)
     48advanced_admin.register(Antenna)
     49advanced_admin.register(Location, LocationAdmin)
     50advanced_admin.register(DnsServer)
     51advanced_admin.register(Network)
     52advanced_admin.register(Node, NodeAdmin)
     53advanced_admin.register(Interface)
     54advanced_admin.register(PublicAP)
     55advanced_admin.register(DhcpStatic)
     56
     57plain_admin.register(Antenna)
     58plain_admin.register(Location, LocationAdmin)
     59plain_admin.register(DnsServer)
     60plain_admin.register(Network)
     61plain_admin.register(Node, NodeAdmin)
     62plain_admin.register(Interface)
     63plain_admin.register(PublicAP)
     64plain_admin.register(DhcpStatic)
    5365
    5466databrowse.site.register(Antenna)
  • trunk/exodus/urls.py

    r6424 r6426  
    33from django.conf.urls.defaults import *
    44from exodus.models import *
    5 from os import path as os_path
    65from django.conf import settings
    76from django.views.generic.simple import direct_to_template
    87from django.contrib import databrowse
    9 from django.contrib import admin
    10 admin.autodiscover()
     8from exodus.admin import advanced_admin, plain_admin
    119
    1210urlpatterns = patterns('',
     
    3028        (r'^databrowse/(.*)', databrowse.site.root),
    3129
    32     (r'^admin/(.*)', admin.site.root),
     30    (r'^admin/(.*)', advanced_admin.root),
     31    (r'^plain-admin/(.*)', plain_admin.root),
    3332)
    3433
Note: See TracChangeset for help on using the changeset viewer.