-
Notifications
You must be signed in to change notification settings - Fork 918
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow the url() helper to get a path for a page that will only exist …
…in the CMS (#15180) * Support using the url() helper in a non-CMS page to get a path for a page that will only exist in the CMS Depends on the CMS page being on a planned/known path in the tree. See the updates to cms.rst for more * Fix italics in documentation
- Loading branch information
1 parent
bc4773b
commit 84357af
Showing
3 changed files
with
72 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
# This module contains named URL paths which only exist in the CMS. | ||
# | ||
# They are named so that they can be looked up via our url() jinja | ||
# helper, even though the actual page exists in the CMS only. | ||
# | ||
# These URLs will/must have matching routes set up in the CMS pages | ||
# else they will lead to a 404 from the CMS. | ||
# | ||
# Note that all URL routes defined here should point to the | ||
# dummy_view function, which never gets called because this | ||
# urlconf is only use with reverse(), never resolve() | ||
|
||
|
||
# from django.urls import path | ||
|
||
|
||
def dummy_view(*args, **kwargs): | ||
# This view will never get called | ||
pass | ||
|
||
|
||
urlpatterns = ( | ||
# pattern is: | ||
# path("url/path/here", dummy_view, name="route.name.here") | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters