Commit 1e02e391 authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos

Added peer plus techc into admin interface

parent 86da41f0
......@@ -5,10 +5,26 @@ from utils import proxy as PR
from flowspec.tasks import *
from django.contrib.auth.models import User
from django.contrib.auth.admin import UserAdmin
from accounts.models import UserProfile
from flowspy.accounts.models import UserProfile
from flowspy.peers.models import *
from flowspy.flowspec.forms import *
import datetime
from django.conf import settings
from django.forms import ModelForm
from django.contrib.admin.widgets import FilteredSelectMultiple
class PeerAdminForm(ModelForm):
FilteredSelectMultiple("PeerRange",True), required=False)
class Meta:
model= Peer
class PeerAdmin(admin.ModelAdmin):
form = PeerAdminForm
class PeerTechcAdmin(admin.ModelAdmin):
list_display = ('get_peer_name', 'emails')
class RouteAdmin(admin.ModelAdmin):
form = RouteForm
......@@ -71,6 +87,8 @@, PeerAdmin), PeerTechcAdmin), RouteAdmin), UserProfileAdmin)'delete_selected')
......@@ -50,5 +50,8 @@ class PeerTechc(models.Model):
def __unicode__(self):
return "%s %s" %(self.peer_id.peer_name, self.emails)
def get_peer_name(self):
return "%s" %self.peer_id.peer_name
class Meta:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment