Install django-shorturls to generate simple shortpermalinks for entries :3

This commit is contained in:
Danielle McLean 2017-10-29 12:56:30 +11:00
parent 21786d6e6c
commit 7027c74035
Signed by untrusted user: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
6 changed files with 20 additions and 2 deletions

View file

@ -78,6 +78,7 @@ INSTALLED_APPS = [
'django_otp.plugins.otp_totp',
'favicon',
'meta',
'shorturls',
'lemoncurry',
'entries',
@ -209,6 +210,12 @@ SITE_ID = 1
# https://pythonhosted.org/django-agent-trust/
AGENT_COOKIE_SECURE = True
# django-shorturls
# https://pypi.python.org/pypi/django-shorturls
SHORTEN_MODELS = {
'e': 'entries.entry',
}
# django-meta
# https://django-meta.readthedocs.io/en/latest/settings.html
META_SITE_PROTOCOL = 'https'

View file

@ -6,6 +6,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<link rel="canonical" href="{{ uri }}" />
{% block head %}{% endblock %}
<link rel="hub" href="{% get_push_hub %}" />
<link rel="self" href="{{ uri }}" />

View file

@ -39,6 +39,7 @@ urlpatterns = [
url('^.well-known/', include('wellknowns.urls')),
url('^admin/', otp_admin_site.urls),
url('^auth/', include('lemonauth.urls')),
url('^s/', include('shorturls.urls')),
url(r'^sitemap\.xml$', sitemap.index, maps),
url(r'^sitemaps/(?P<section>.+)\.xml$', sitemap.sitemap, maps,