Add templates & static files
This commit is contained in:
parent
1bcf7ceba3
commit
043449cf4f
8 changed files with 55 additions and 8 deletions
9
gallery/templates/gallery/main.html
Normal file
9
gallery/templates/gallery/main.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
<!-- Title -->
|
||||
{% block title %} Galleria {% endblock %}
|
||||
|
||||
<!-- Content -->
|
||||
{% block content %}
|
||||
Hello World!
|
||||
{% endblock %}
|
|
@ -5,5 +5,6 @@ from . import views
|
|||
app_name = 'gallery'
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.index, name="index"),
|
||||
]
|
||||
path('', views.Main.as_view(), name='main_url'),
|
||||
|
||||
]
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
from django.http import HttpResponse
|
||||
from django.shortcuts import render
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
# Create your views here.
|
||||
|
||||
|
||||
|
||||
def index(request):
|
||||
return HttpResponse("Hello, world.")
|
||||
class Main(TemplateView):
|
||||
template_name = "gallery/main.html"
|
Loading…
Add table
Add a link
Reference in a new issue