Fixed domain detal viewing in search
This commit is contained in:
parent
123503b8dd
commit
6878cfebde
|
@ -30,6 +30,9 @@ class Nameserver(MntdObject):
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
|
def getAppName(self):
|
||||||
|
return "domains"
|
||||||
|
|
||||||
def getNoDeleteReasons(self):
|
def getNoDeleteReasons(self):
|
||||||
# nameservers can always be deleted
|
# nameservers can always be deleted
|
||||||
return []
|
return []
|
||||||
|
@ -52,6 +55,9 @@ class Domain(MntdObject):
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
|
def getAppName(self):
|
||||||
|
return "domains"
|
||||||
|
|
||||||
def getNoDeleteReasons(self):
|
def getNoDeleteReasons(self):
|
||||||
reasons = []
|
reasons = []
|
||||||
|
|
||||||
|
@ -85,6 +91,9 @@ class ReverseZone(WhoisObject):
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
return reverse("domains:reversezone-show", args=(self.pk,))
|
return reverse("domains:reversezone-show", args=(self.pk,))
|
||||||
|
|
||||||
|
def getAppName(self):
|
||||||
|
return "domains"
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "%s @ %s" % (self.prefix(), self.parentNet)
|
return "%s @ %s" % (self.prefix(), self.parentNet)
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
{% if object|userCanEdit:user %}
|
{% if object|userCanEdit:user %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Actions</td>
|
<td>Actions</td>
|
||||||
{% with request.resolver_match.namespaces.0|add:":"|add:object.getClassName|lower|add:"-edit" as editView %}
|
{% with object.getAppName|add:":"|add:object.getClassName|lower|add:"-edit" as editView %}
|
||||||
{% with request.resolver_match.namespaces.0|add:":"|add:object.getClassName|lower|add:"-delete" as deleteView %}
|
{% with object.getAppName|add:":"|add:object.getClassName|lower|add:"-delete" as deleteView %}
|
||||||
<td><a href="{% url editView object.getPK %}">Edit object<a/>, <a href="{% url deleteView object.getPK %}">Delete object</a></td>
|
<td><a href="{% url editView object.getPK %}">Edit object<a/>, <a href="{% url deleteView object.getPK %}">Delete object</a></td>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
|
|
|
@ -34,6 +34,9 @@ class WhoisObject(models.Model):
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.handle
|
return self.handle
|
||||||
|
|
||||||
|
def getAppName(self):
|
||||||
|
return "whoisdb"
|
||||||
|
|
||||||
def getClassName(self):
|
def getClassName(self):
|
||||||
return self._meta.object_name
|
return self._meta.object_name
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue