Skip to content

Commit

Permalink
feat: add template sample to test app
Browse files Browse the repository at this point in the history
As an example, because there is no theme configured here and this will
have no impact in the app. **However**, another change to the project
`README` is incoming after this change is merged to include a screenshot
with an example of the template provided working with
`django-surface-theme`.
  • Loading branch information
gsilvapt committed Apr 10, 2023
1 parent 8ddad53 commit 82f7296
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 1 addition & 7 deletions testapp/testapp/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/

Expand All @@ -27,7 +26,6 @@

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = [
Expand Down Expand Up @@ -56,7 +54,7 @@
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [BASE_DIR / 'testapp' / 'templates'],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
Expand All @@ -71,7 +69,6 @@

WSGI_APPLICATION = 'testapp.wsgi.application'


# Database
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases

Expand All @@ -82,7 +79,6 @@
}
}


# Password validation
# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators

Expand All @@ -101,7 +97,6 @@
},
]


# Internationalization
# https://docs.djangoproject.com/en/3.2/topics/i18n/

Expand All @@ -115,7 +110,6 @@

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.2/howto/static-files/

Expand Down
5 changes: 5 additions & 0 deletions testapp/testapp/templates/includes/navigation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% block menu_options %}
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{% url 'admin:auth_user_change' request.user.pk %}">Profile</a>
<a class="dropdown-item" href="{% url 'admin:apitokens_mytoken_changelist' %}">API Tokens</a>
{% endblock %}

0 comments on commit 82f7296

Please sign in to comment.