diff options
author | 2019-04-10 13:03:07 +0100 | |
---|---|---|
committer | 2019-04-10 13:03:07 +0100 | |
commit | 57838a2e98f7e80117448562865b09733a1637a9 (patch) | |
tree | f226c3f32d79606f4ce0cc7463bf4cba8de35d5f /pydis_site/apps | |
parent | Merge pull request #198 from gdude2002/django+176/project-layout (diff) |
Initial work on some base templates
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 a01e019e..56525af8 100644 --- a/pydis_site/apps/home/urls.py +++ b/pydis_site/apps/home/urls.py @@ -5,6 +5,6 @@ from django.views.generic import TemplateView app_name = 'home' urlpatterns = [ - path('', TemplateView.as_view(template_name='home/index.html'), name='index'), + path('', TemplateView.as_view(template_name='home/index.html'), name='home.index'), path('admin/', admin.site.urls) ] |