8000 Don't use multilingual URLs on the welcome template redirect by edevil · Pull Request #6239 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

Don't use multilingual URLs on the welcome template redirect #6239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 18, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Let Django build the URL.
  • Loading branch information
edevil committed Jan 16, 2018
commit 11fe3e24ecc247e9df7a8ba47fb74f461ea465b1
3 changes: 2 additions & 1 deletion cms/page_rendering.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from django.conf import settings
from django.core.urlresolvers import resolve, Resolver404
from django.core.urlresolvers import resolve, Resolver404, reverse
from django.http import Http404
from django.shortcuts import render
from django.template.response import TemplateResponse
Expand Down Expand Up @@ -75,5 +75,6 @@ def _render_welcome_page(request):
'cms_version': __version__,
'cms_edit_on': get_cms_setting('CMS_TOOLBAR_URL__EDIT_ON'),
'django_debug': settings.DEBUG,
'next_url': reverse('pages-root'),
}
return TemplateResponse(request, "cms/welcome.html", context)
2 changes: 1 addition & 1 deletion cms/templates/cms/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ <h2 class="cms-hidden">{% trans "Installation Notes" %}</h2>
}
});
{% else %}
window.location.href = '{% url "admin:login" %}?next=/?{{ cms_edit_on }}';
window.location.href = '{% url "admin:login" %}?next={{ next_url }}';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing the ?{{ cms_edit_on }}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, done.

{% endif %}
</script>
{% endlanguage %}
Expand Down
0