Renamed asset list url and added list link to form

This commit is contained in:
Dirk Jahnke 2022-03-17 07:26:30 +01:00
parent 92176158bd
commit db46b2494b
3 changed files with 6 additions and 3 deletions

View File

@ -21,7 +21,10 @@
</div>
-->
{{ form.as_p }}
<div><input type="submit" class="btn btn-primary" value="save"></div>
<div>
<input type="submit" class="btn btn-primary" value="Save">
<a class="btn btn-primary" href="{% url 'asset:list' %}">Asset List</a>
</div>
</form>
</div>

View File

@ -4,7 +4,7 @@ from asset.views import AssetCreateView, AssetDeleteView, AssetUpdateView, Asset
app_name = 'asset'
urlpatterns = [
path('', AssetListView.as_view(), name='index'),
path('', AssetListView.as_view(), name='list'),
path('add/', AssetCreateView.as_view(), name='add'),
path('<int:pk>/', AssetUpdateView.as_view(), name='asset-update'),
path('<int:pk>/', AssetUpdateView.as_view(), name='detail'),

View File

@ -6,7 +6,7 @@
<h2>This is HOME</h2>
<a href="{% url 'container:container_type_index' %}">Container Types</a><br>
<a href="{% url 'container:index' %}">Container</a><br>
<a href="{% url 'asset:index' %}">Assets</a><br>
<a href="{% url 'asset:list' %}">Assets</a><br>
{% endblock %}