-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
1 change: 0 additions & 1 deletion
1
...}}/templates/{{cookiecutter.plugin_name}}/{{cookiecutter.model_class_name | lower }}.html
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
...tes/{{cookiecutter.plugin_name}}/{{cookiecutter.model_class_name | lower }}_retrieve.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{% raw %} | ||
{% extends 'generic/object_retrieve.html' %} | ||
{% load helpers %} | ||
|
||
{% block content_left_page %} | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<strong>{% endraw %}{{ cookiecutter.model_class_name }}{% raw %}</strong> | ||
</div> | ||
<table class="table table-hover panel-body attr-table"> | ||
<tr> | ||
<td>Name</td> | ||
<td> | ||
<a href="{{ object.get_absolute_url }}">{{ object.name }}</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Description</td> | ||
<td> | ||
{{ object.description|placeholder }} | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
{% endblock %} | ||
{% endraw %} |
1 change: 0 additions & 1 deletion
1
nautobot-app-ssot/{{ cookiecutter.project_slug }}/{{cookiecutter.plugin_name}}/views.py
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
nautobot-app-ssot/{{ cookiecutter.project_slug }}/{{cookiecutter.plugin_name}}/views.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"""Views for FloorPlan.""" | ||
from nautobot.apps.viewsets import NautobotUIViewSet | ||
|
||
from {{ cookiecutter.plugin_name }} import filters, forms, models, tables | ||
from {{ cookiecutter.plugin_name }}.api import serializers | ||
|
||
|
||
class {{ cookiecutter.model_class_name}}UIViewSet(NautobotUIViewSet): | ||
"""ViewSet for {{ cookiecutter.model_class_name}} views.""" | ||
|
||
bulk_update_form_class = forms.{{ cookiecutter.model_class_name}}BulkEditForm | ||
filterset_class = filters.{{ cookiecutter.model_class_name}}FilterSet | ||
filterset_form_class = forms.{{ cookiecutter.model_class_name}}FilterForm | ||
form_class = forms.{{ cookiecutter.model_class_name}}Form | ||
lookup_field = "pk" | ||
queryset = models.{{ cookiecutter.model_class_name}}.objects.all() | ||
serializer_class = serializers.{{ cookiecutter.model_class_name}}Serializer | ||
table_class = tables.{{ cookiecutter.model_class_name}}Table |