Commit f749c67a by cahrens

Bump version and minor cleanups.

parent 62ececa8
......@@ -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',
......
# -*- 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%9p40)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
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment