diff options
Diffstat (limited to 'pydis_site/apps')
-rw-r--r-- | pydis_site/apps/home/templatetags/__init__.py | 0 | ||||
-rw-r--r-- | pydis_site/apps/home/templatetags/extra_filters.py | 8 | ||||
-rw-r--r-- | pydis_site/apps/home/urls.py | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/pydis_site/apps/home/templatetags/__init__.py b/pydis_site/apps/home/templatetags/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/pydis_site/apps/home/templatetags/__init__.py diff --git a/pydis_site/apps/home/templatetags/extra_filters.py b/pydis_site/apps/home/templatetags/extra_filters.py new file mode 100644 index 00000000..edffe9ac --- /dev/null +++ b/pydis_site/apps/home/templatetags/extra_filters.py @@ -0,0 +1,8 @@ +from django import template + +register = template.Library() + + +def starts_with(value: str, arg: str): + return value.startswith(arg) diff --git a/pydis_site/apps/home/urls.py b/pydis_site/apps/home/urls.py index 4ed95651..dacf0a3a 100644 --- a/pydis_site/apps/home/urls.py +++ b/pydis_site/apps/home/urls.py @@ -7,5 +7,5 @@ app_name = 'home' urlpatterns = [ path('admin/', admin.site.urls), path('wiki/', include('wiki.urls')), - path('', TemplateView.as_view(template_name='home/index.html'), name='index'), + path('', TemplateView.as_view(template_name='home/index.html'), name='home.index'), ] |