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
f749c67a
Commit
f749c67a
authored
Jul 27, 2017
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bump version and minor cleanups.
parent
62ececa8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
51 deletions
+32
-51
setup.py
+2
-2
testproject/testproject/settings.py
+29
-48
wiki/plugins/attachments/templates/wiki/plugins/attachments/index.html
+1
-1
No files found.
setup.py
View file @
f749c67a
...
...
@@ -29,7 +29,7 @@ package_data = dict(
setup
(
name
=
"django-wiki"
,
version
=
"0.0.10
"
,
version
=
"0.0.11
"
,
author
=
"Benjamin Bach"
,
author_email
=
"benjamin@overtag.dk"
,
description
=
(
"A wiki system written for the Django framework."
),
...
...
@@ -39,7 +39,7 @@ setup(
long_description
=
read
(
'README.md'
),
zip_safe
=
False
,
install_requires
=
[
'Django>=1.
4
'
,
'Django>=1.
8
'
,
'markdown'
,
'django-sekizai'
,
'django-mptt'
,
...
...
testproject/testproject/settings.py
View file @
f749c67a
# -*- coding: utf-8 -*-
from
os
import
path
as
os_path
import
os
PROJECT_PATH
=
os_path
.
abspath
(
os_path
.
split
(
__file__
)[
0
])
DEBUG
=
True
...
...
@@ -49,7 +47,6 @@ MEDIA_URL = '/media/'
STATIC_ROOT
=
os_path
.
join
(
PROJECT_PATH
,
'static'
)
STATIC_URL
=
'/static/'
SECRET_KEY
=
'b^fv_)t39h
%9
p40)fnkfblo##jkr!$0)lkp6bpy!fi*f$4*92!'
MIDDLEWARE_CLASSES
=
(
...
...
@@ -68,12 +65,11 @@ ROOT_URLCONF = 'testproject.urls'
# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION
=
'testproject.wsgi.application'
# See https://docs.djangoproject.com/en/1.11/ref/templates/upgrading/
TEMPLATES
=
[
{
'BACKEND'
:
'django.template.backends.django.DjangoTemplates'
,
'DIRS'
:
[
os
.
path
.
join
(
PROJECT_PATH
,
'templates'
),
os
_
path
.
join
(
PROJECT_PATH
,
'templates'
),
],
'APP_DIRS'
:
True
,
'OPTIONS'
:
{
...
...
@@ -83,7 +79,7 @@ TEMPLATES = [
"django.template.context_processors.i18n"
,
"django.template.context_processors.media"
,
"django.template.context_processors.static"
,
"django.template.context_processors.request"
,
# TODO: is this needed?
"django.template.context_processors.request"
,
"django.template.context_processors.tz"
,
"django.contrib.messages.context_processors.messages"
,
"sekizai.context_processors.sekizai"
,
...
...
@@ -104,10 +100,10 @@ INSTALLED_APPS = [
'django.contrib.admin'
,
'django.contrib.admindocs'
,
'sekizai'
,
'django_notify'
,
# Note: this is not installed in version 0.2.x. But there is "django_nyt".
'django_notify'
,
'sorl.thumbnail'
,
'wiki'
,
'wiki.plugins.help'
,
# Note: in version 0.2.x, wiki.plugins.macro is added.
'wiki.plugins.help'
,
'wiki.plugins.links'
,
'wiki.plugins.images'
,
'wiki.plugins.attachments'
,
...
...
@@ -120,46 +116,31 @@ INSTALLED_APPS = [
# the site admins on every HTTP 500 error when DEBUG=False.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
#
LOGGING = {
#
'version': 1,
#
'disable_existing_loggers': False,
#
'filters': {
#
'require_debug_false': {
#
'()': 'django.utils.log.RequireDebugFalse'
#
}
#
},
#
'handlers': {
#
'mail_admins': {
#
'level': 'ERROR',
#
'filters': ['require_debug_false'],
#
'class': 'django.utils.log.AdminEmailHandler'
#
}
#
},
#
'loggers': {
#
'django.request': {
#
'handlers': ['mail_admins'],
#
'level': 'ERROR',
#
'propagate': True,
#
},
#
}
#
}
LOGGING
=
{
'version'
:
1
,
'disable_existing_loggers'
:
False
,
'filters'
:
{
'require_debug_false'
:
{
'()'
:
'django.utils.log.RequireDebugFalse'
}
},
'handlers'
:
{
'mail_admins'
:
{
'level'
:
'ERROR'
,
'filters'
:
[
'require_debug_false'
],
'class'
:
'django.utils.log.AdminEmailHandler'
}
},
'loggers'
:
{
'django.request'
:
{
'handlers'
:
[
'mail_admins'
],
'level'
:
'ERROR'
,
'propagate'
:
True
,
},
}
}
WIKI_ANONYMOUS_WRITE
=
True
# Password validation
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS
=
[
{
'NAME'
:
'django.contrib.auth.password_validation.UserAttributeSimilarityValidator'
,
},
{
'NAME'
:
'django.contrib.auth.password_validation.MinimumLengthValidator'
,
},
{
'NAME'
:
'django.contrib.auth.password_validation.CommonPasswordValidator'
,
},
{
'NAME'
:
'django.contrib.auth.password_validation.NumericPasswordValidator'
,
},
]
# We disable this in edx-platform lms/envs/common.py, so disabling for test project also.
WIKI_USE_BOOTSTRAP_SELECT_WIDGET
=
False
wiki/plugins/attachments/templates/wiki/plugins/attachments/index.html
View file @
f749c67a
...
...
@@ -31,7 +31,7 @@
<p>
{% if not attachment.current_revision.deleted %}
<a
href=
"{% url 'wiki:attachments_replace' path=urlpath.path article_id=article.id attachment_id=attachment.id %}"
class=
"btn"
>
{% trans "Replace" %}
</a>
{% if
attachment.article = article
%}
{% if
'attachment.article = article'
%}
<a
href=
"{% url 'wiki:attachments_delete' path=urlpath.path article_id=article.id attachment_id=attachment.id %}"
class=
"btn"
>
{% trans "Delete" %}
</a>
{% else %}
<a
href=
"{% url 'wiki:attachments_delete' path=urlpath.path article_id=article.id attachment_id=attachment.id %}"
class=
"btn"
>
{% trans "Detach" %}
</a>
...
...
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