Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-wiki
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
django-wiki
Commits
20041bd7
Commit
20041bd7
authored
Sep 10, 2014
by
pknowles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated setting name ALLOW_OVERLAPPING_THIRD_PARTY_URL to CHECK_SLUG_URL_AVAILABLE
parent
9eae449e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
wiki/conf/settings.py
+2
-2
wiki/forms.py
+1
-1
No files found.
wiki/conf/settings.py
View file @
20041bd7
...
@@ -26,9 +26,9 @@ MARKDOWN_KWARGS.update(getattr( django_settings, 'WIKI_MARKDOWN_KWARGS', {} ))
...
@@ -26,9 +26,9 @@ MARKDOWN_KWARGS.update(getattr( django_settings, 'WIKI_MARKDOWN_KWARGS', {} ))
# and all their content.
# and all their content.
LOST_AND_FOUND_SLUG
=
getattr
(
django_settings
,
'WIKI_LOST_AND_FOUND_SLUG'
,
'lost-and-found'
)
LOST_AND_FOUND_SLUG
=
getattr
(
django_settings
,
'WIKI_LOST_AND_FOUND_SLUG'
,
'lost-and-found'
)
# When
Fals
e, this blocks new slugs that resolve to non-wiki views, stopping
# When
Tru
e, this blocks new slugs that resolve to non-wiki views, stopping
# users creating articles that conflict with overlapping URLs from other apps.
# users creating articles that conflict with overlapping URLs from other apps.
ALLOW_OVERLAPPING_THIRD_PARTY_URL
=
getattr
(
django_settings
,
'WIKI_ALLOW_OVERLAPPING_THIRD_PARTY_URL'
,
Fals
e
)
CHECK_SLUG_URL_AVAILABLE
=
getattr
(
django_settings
,
'WIKI_CHECK_SLUG_URL_AVAILABLE'
,
Tru
e
)
# Do we want to log IPs?
# Do we want to log IPs?
LOG_IPS_ANONYMOUS
=
getattr
(
django_settings
,
'WIKI_LOG_IPS_ANONYMOUS'
,
True
)
LOG_IPS_ANONYMOUS
=
getattr
(
django_settings
,
'WIKI_LOG_IPS_ANONYMOUS'
,
True
)
...
...
wiki/forms.py
View file @
20041bd7
...
@@ -272,7 +272,7 @@ class CreateForm(forms.Form, SpamProtectionMixin):
...
@@ -272,7 +272,7 @@ class CreateForm(forms.Form, SpamProtectionMixin):
else
:
else
:
raise
forms
.
ValidationError
(
_
(
'A slug named "
%
s" already exists.'
)
%
already_urlpath
.
slug
)
raise
forms
.
ValidationError
(
_
(
'A slug named "
%
s" already exists.'
)
%
already_urlpath
.
slug
)
if
not
settings
.
ALLOW_OVERLAPPING_THIRD_PARTY_URL
:
if
settings
.
CHECK_SLUG_URL_AVAILABLE
:
try
:
try
:
# Fail validation if URL resolves to non-wiki app
# Fail validation if URL resolves to non-wiki app
match
=
resolve
(
self
.
urlpath_parent
.
path
+
'/'
+
slug
+
'/'
)
match
=
resolve
(
self
.
urlpath_parent
.
path
+
'/'
+
slug
+
'/'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment