Skip to content

Commit

Permalink
Merge pull request #8 from N5GEH/7-Hackathon_1
Browse files Browse the repository at this point in the history
Hackathon_1
  • Loading branch information
djs0109 authored Jul 15, 2022
2 parents 64902af + e4ba278 commit 3a1f5c0
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% block title %}Example Dialog{% endblock %}

{% block content %}
<button type="button" class="btn btn-primary" hx-get="{% url 'dialog_example_add' %}" hx-target="#dg_general">
<button type="button" class="btn btn-primary" hx-get="{% url 'examples:dialog_example_add' %}" hx-target="#dg_general">
Add
</button>
{% endblock %}
1 change: 1 addition & 0 deletions app/Entirety/examples/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from examples.views import Dialog, DialogForm

app_name = "examples"
urlpatterns = [
path("dialog/", Dialog.as_view(), name="dialog_example"),
path("dialog/add/", DialogForm.as_view(), name="dialog_example_add"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import json

from django.shortcuts import render, HttpResponse
from django.views.generic import View

from examples.forms import ExampleForm


Expand All @@ -11,7 +9,7 @@ def get(self, request):
form = ExampleForm()
return render(
request,
"dialog_form.html",
"examples/dialog_form.html",
{
"form": form,
},
Expand All @@ -35,3 +33,9 @@ def post(self, request):
"form": form,
},
)


class Dialog(View):
def get(self, request):
context = {}
return render(request, "examples/dialog.html", context)
2 changes: 0 additions & 2 deletions app/Entirety/examples/views/__init__.py

This file was deleted.

8 changes: 0 additions & 8 deletions app/Entirety/examples/views/dialog.py

This file was deleted.

2 changes: 1 addition & 1 deletion app/Entirety/templates/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
</li>
{% endif %}
<li class="nav-item border-bottom d-inline-flex">
<a href="{% url "dialog_example" %}" class="nav-link btn-sidebar py-md-2"
<a href="{% url "examples:dialog_example" %}" class="nav-link btn-sidebar py-md-2"
data-bs-toggle="tooltip" data-bs-placement="right" data-bs-custom-class="d-md-none"
title="Examples">
<i class="bi bi-body-text"></i>
Expand Down

0 comments on commit 3a1f5c0

Please sign in to comment.