Skip to content

Commit

Permalink
add info and faq views
Browse files Browse the repository at this point in the history
  • Loading branch information
luto committed Nov 2, 2024
1 parent 326c3a8 commit 6ccfe9e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/crowdprinter/templates/crowdprinter/faq.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% extends 'base.html' %}

{% block content %}
<div class="grid-x grid-margin-x">
<h1 class="cell">FAQ</h1>
</div>
{% endblock %}
7 changes: 7 additions & 0 deletions src/crowdprinter/templates/crowdprinter/info.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% extends 'base.html' %}

{% block content %}
<div class="grid-x grid-margin-x">
<h1 class="cell">Info</h1>
</div>
{% endblock %}
2 changes: 2 additions & 0 deletions src/crowdprinter/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
path("admin/", admin.site.urls),
path("accounts/", include("allauth.urls")),
path("", views.PrintJobListView.as_view()),
path("faq", views.FaqView.as_view()),
path("info", views.InfoView.as_view()),
path("myprints", views.MyPrintAttempts.as_view(), name="my_printattempts"),
path(
"create/text",
Expand Down
9 changes: 9 additions & 0 deletions src/crowdprinter/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from django.views.generic import CreateView
from django.views.generic import DetailView
from django.views.generic import ListView
from django.views.generic import TemplateView
from django.views.generic.base import View

import crowdprinter.models as models
Expand Down Expand Up @@ -291,3 +292,11 @@ def get_file_path(self, **kwargs):
return printjobfile.file_gcode.path
else:
raise Http404()


class InfoView(TemplateView):
template_name = "crowdprinter/info.html"


class FaqView(TemplateView):
template_name = "crowdprinter/faq.html"

0 comments on commit 6ccfe9e

Please sign in to comment.