diff options
| author | 2019-04-10 16:13:54 +0200 | |
|---|---|---|
| committer | 2019-04-10 16:13:54 +0200 | |
| commit | 3544cf527534200163e569e06bc13cbe94a6b41d (patch) | |
| tree | 2b03c27f173d32cc5904b18bf1ea65c921d691d5 /pydis_site/apps | |
| parent | Merge pull request #198 from gdude2002/django+176/project-layout (diff) | |
| parent | No more vim modelines (diff) | |
Merge pull request #203 from gdude2002/django+base-templates
Adds base templates for use in the home and wiki apps.
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)  ]  |