Skip to content

Commit

Permalink
Fix deprecations: Round 1 (#643)
Browse files Browse the repository at this point in the history
* Remove an unneccesary include

* Declare the app name for namespaced-include

* Drop django.contrib.webdesign

* Correctly hook into template settings
  • Loading branch information
pradyunsg committed Mar 23, 2020
1 parent 87c3172 commit 2d9e8bc
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 25 deletions.
4 changes: 2 additions & 2 deletions junction/profiles/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

from . import views

app_name = "junction.profiles"

urlpatterns = [
url(r'^$', views.dashboard, name='dashboard'),
url(r'^edit/$', views.profile, name='profile'),


]
1 change: 0 additions & 1 deletion junction/templates/pages/home_page.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{% extends 'base.html' %}

{% load django_markdown %}
{% load webdesign %}
{% load static from staticfiles %}

{% block head_title %}Welcome to {{ SITE_INFO.site_name }}{% endblock %}
Expand Down
3 changes: 1 addition & 2 deletions junction/templates/static-content/blog-archive.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{% extends 'base.html' %}

{% load webdesign %}

{% block head_title %}{{ block.super }}{% endblock %}

Expand All @@ -10,4 +9,4 @@ <h1>Blog Archive</h1>

{% block content %}
{% lorem 3 p %}
{% endblock %}
{% endblock %}
3 changes: 1 addition & 2 deletions junction/templates/static-content/coc.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{% extends 'base.html' %}

{% load webdesign %}

{% block head_title %}{{ block.super }}{% endblock %}

Expand All @@ -10,4 +9,4 @@ <h1>Code of Conduct</h1>

{% block content %}
{% lorem 3 p %}
{% endblock %}
{% endblock %}
3 changes: 1 addition & 2 deletions junction/templates/static-content/faq.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{% extends 'base.html' %}

{% load webdesign %}

{% block head_title %}{{ block.super }}{% endblock %}

Expand All @@ -10,4 +9,4 @@ <h1>Frequently Asked Questions</h1>

{% block content %}
{% lorem 3 p %}
{% endblock %}
{% endblock %}
3 changes: 1 addition & 2 deletions junction/templates/static-content/schedule.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{% extends 'base.html' %}

{% load webdesign %}

{% block head_title %}{{ block.super }}{% endblock %}

Expand All @@ -10,4 +9,4 @@ <h1>Schedule</h1>

{% block content %}
{% lorem 3 p %}
{% endblock %}
{% endblock %}
3 changes: 1 addition & 2 deletions junction/templates/static-content/speakers.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{% extends 'base.html' %}

{% load webdesign %}

{% block head_title %}{{ block.super }}{% endblock %}

Expand All @@ -10,4 +9,4 @@ <h1>Speakers</h1>

{% block content %}
{% lorem 3 p %}
{% endblock %}
{% endblock %}
3 changes: 1 addition & 2 deletions junction/templates/static-content/sponsors.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{% extends 'base.html' %}

{% load webdesign %}

{% block head_title %}{{ block.super }}{% endblock %}

Expand All @@ -10,4 +9,4 @@ <h1>Sponsors</h1>

{% block content %}
{% lorem 3 p %}
{% endblock %}
{% endblock %}
3 changes: 1 addition & 2 deletions junction/templates/static-content/venue.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{% extends 'base.html' %}

{% load webdesign %}

{% block head_title %}{{ block.super }}{% endblock %}

Expand All @@ -10,4 +9,4 @@ <h1>Venue</h1>

{% block content %}
{% lorem 3 p %}
{% endblock %}
{% endblock %}
2 changes: 1 addition & 1 deletion junction/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
url(r'^$', HomePageView.as_view(), name="page-home"),

# Django Admin
url(r'^nimda/', include(admin.site.urls)),
url(r'^nimda/', admin.site.urls),

# Third Party Stuff
url(r'^accounts/', include('allauth.urls')),
Expand Down
1 change: 0 additions & 1 deletion settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
'django.contrib.webdesign',
)

THIRD_PARTY_APPS = (
Expand Down
6 changes: 3 additions & 3 deletions settings/dev.py.sample
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import os
from .common import * # noqa

DEBUG = True
TEMPLATE_DEBUG = DEBUG
TEMPLATES[0]['OPTIONS']['debug'] = DEBUG

DATABASES = {
'default': {
Expand All @@ -17,9 +17,9 @@ DATABASES = {

ACCOUNT_DEFAULT_HTTP_PROTOCOL = 'http'

TEMPLATE_CONTEXT_PROCESSORS += (
TEMPLATES[0]['OPTIONS']['context_processors'].extend([
"django.core.context_processors.debug",
)
])

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

Expand Down
6 changes: 3 additions & 3 deletions settings/test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from .common import * # noqa

DEBUG = True
TEMPLATE_DEBUG = DEBUG
TEMPLATES[0]['OPTIONS']['debug'] = DEBUG

DATABASES = {
'default': {
Expand All @@ -15,9 +15,9 @@
}
}

TEMPLATE_CONTEXT_PROCESSORS += (
TEMPLATES[0]['OPTIONS']['context_processors'].extend([
"django.core.context_processors.debug",
)
])

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

Expand Down

0 comments on commit 2d9e8bc

Please sign in to comment.