Commit 019f5766 by Bach Dániel

vm: fix instance url

parent 97277697
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</div> </div>
<div class="list-group" id="vm-list-view"> <div class="list-group" id="vm-list-view">
{% for i in instances %} {% for i in instances %}
<a href="{% url i %}" class="list-group-item"> <a href="{{ i.get_absolute_url }}" class="list-group-item">
<i class="icon-play-sign"></i> {{ i.name }} <div class="pull-right"><i class="icon-star text-primary" title="Mark as favorite."></i></div> <i class="icon-play-sign"></i> {{ i.name }} <div class="pull-right"><i class="icon-star text-primary" title="Mark as favorite."></i></div>
</a> </a>
{% endfor %} {% endfor %}
......
...@@ -301,8 +301,7 @@ class Instance(BaseResourceConfigModel, TimeStampedModel): ...@@ -301,8 +301,7 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
@models.permalink @models.permalink
def get_absolute_url(self): def get_absolute_url(self):
# TODO is this obsolete? return ('dashboard.views.detail', None, {'id': self.id})
return ('one.views.vm_show', None, {'iid': self.id})
@property @property
def vm_name(self): def vm_name(self):
......
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 sign in to comment