Modify asset model

pull/530/head
ibuler 2016-09-05 22:57:43 +08:00
parent 7241f7509f
commit 2f5b7ad654
3 changed files with 4 additions and 2 deletions

View File

@ -128,7 +128,7 @@ class Asset(models.Model):
comment = models.CharField(max_length=128, null=True, blank=True, verbose_name=_('Comment'))
def __unicode__(self):
return self.ip
return '%(ip)s:%(port)d' % {'ip': self.ip, 'port': self.port}
def initial(self):
pass

View File

@ -1,5 +1,6 @@
{% extends 'base.html' %}
{% load static %}
{% load i18n %}
{% load bootstrap %}
{% block custom_head_css_js %}
<link href="{% static "css/plugins/select2/select2.min.css" %}" rel="stylesheet">
@ -12,7 +13,7 @@
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>填写用户组信息</h5>
<h5>{% trans 'Create user group' %}</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>

View File

@ -1,4 +1,5 @@
{% extends '_list_base.html' %}
{% load i18n %}
{% load common_tags %}
{% block content_left_head %}
<a href="{% url 'users:usergroup-add' %}" class="btn btn-sm btn-primary "> 添加用户组 </a>