forked from 00dani/lemoncurry
Install django-shorturls to generate simple shortpermalinks for entries :3
This commit is contained in:
parent
21786d6e6c
commit
7027c74035
6 changed files with 20 additions and 2 deletions
|
@ -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'
|
||||
|
|
|
@ -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 }}" />
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue