Skip to content

Commit de7af19

Browse files
committed
Get toolbar to work in demo
1 parent f545e4c commit de7af19

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

demos/full/app/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
SECRET_KEY = "test"
2+
DEBUG = True
23
URLS_ROUTER = "app.urls.AppRouter"
34

45
INSTALLED_PACKAGES = [

demos/full/app/templates/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Document</title>
7+
{% tailwind_css %}
8+
</head>
9+
<body>
10+
Hey!
11+
12+
{% toolbar %}
13+
</body>
14+
</html>

demos/full/app/urls.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
from plain.admin.urls import AdminRouter
22
from plain.assets.urls import AssetsRouter
33
from plain.auth.views import LogoutView
4+
from plain.observer.urls import ObserverRouter
45
from plain.passwords.views import PasswordLoginView
56
from plain.urls import Router, include, path
6-
from plain.views import View
7+
from plain.views import TemplateView
78

89

910
class LoginView(PasswordLoginView):
1011
pass
1112

1213

13-
class IndexView(View):
14-
def get(self):
15-
return "Index!"
14+
class IndexView(TemplateView):
15+
template_name = "index.html"
1616

1717

1818
class AppRouter(Router):
1919
namespace = ""
2020
urls = [
2121
include("admin/", AdminRouter),
2222
include("assets/", AssetsRouter),
23+
include("observer/", ObserverRouter),
2324
path("login/", LoginView, name="login"),
2425
path("logout/", LogoutView, name="logout"),
2526
path("", IndexView, name="index"),

0 commit comments

Comments
 (0)