diff --git a/pinaxcon/settings.py b/pinaxcon/settings.py index cddf9f0f..b464592b 100644 --- a/pinaxcon/settings.py +++ b/pinaxcon/settings.py @@ -108,6 +108,7 @@ TEMPLATES = [ "account.context_processors.account", "pinax_theme_bootstrap.context_processors.theme", "symposion.reviews.context_processors.reviews", + "sekizai.context_processors.sekizai", ], }, }, @@ -140,7 +141,8 @@ INSTALLED_APPS = [ "django.contrib.sessions", "django.contrib.sites", "django.contrib.staticfiles", - + "django.contrib.humanize", + # theme "bootstrapform", "pinax_theme_bootstrap", @@ -200,6 +202,18 @@ INSTALLED_APPS = [ "jquery", "djangoformsetjs", + # wiki + "django_nyt", + "mptt", + "sekizai", + "sorl.thumbnail", + "wiki", + "wiki.plugins.attachments", + "wiki.plugins.notifications", + "wiki.plugins.images", + "wiki.plugins.macros", + + #testing "django_nose", ] @@ -298,6 +312,9 @@ TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' ADMIN_USERNAMES = [] +# Wiki settings +WIKI_CHECK_SLUG_URL_AVAILABLE = False + # Tell nose to measure coverage on the 'foo' and 'bar' apps NOSE_ARGS = [ '--with-coverage', diff --git a/pinaxcon/templates/site_base.html b/pinaxcon/templates/site_base.html index 5891f71f..db664d2d 100755 --- a/pinaxcon/templates/site_base.html +++ b/pinaxcon/templates/site_base.html @@ -22,7 +22,7 @@ {% block extra_style %} - + {% endblock %} {% endblock %} diff --git a/pinaxcon/templates/wiki/base.html b/pinaxcon/templates/wiki/base.html new file mode 100644 index 00000000..5eb070f1 --- /dev/null +++ b/pinaxcon/templates/wiki/base.html @@ -0,0 +1,36 @@ +{% extends "site_base_wagtail.html" %} +{% load sekizai_tags i18n wiki_tags static %} + +{% block head_title %} + {% block wiki_pagetitle %}{% endblock %} +{% endblock %} + +{% block styles %} + + + {{ block.super }} + +{% endblock styles %} + +{% block content %} +
+
+
+ {% block wiki_breadcrumbs %}{% endblock %} + {% block wiki_contents %}{% endblock %} +
+
+
+{% endblock %} + +{% block scripts_extra %} + {{ block.super }} + + + + +{% endblock %} diff --git a/pinaxcon/urls.py b/pinaxcon/urls.py index a675fef6..e366fc81 100644 --- a/pinaxcon/urls.py +++ b/pinaxcon/urls.py @@ -6,6 +6,9 @@ from django.views.generic import TemplateView from wagtail.wagtailadmin import urls as wagtailadmin_urls from wagtail.wagtailcore import urls as wagtail_urls +from wiki.urls import get_pattern as get_wiki_pattern +from django_nyt.urls import get_pattern as get_nyt_pattern + from django.contrib import admin import symposion.views @@ -36,6 +39,10 @@ urlpatterns = [ url(r'^tickets/', include('registrasion.urls')), url(r'^nested_admin/', include('nested_admin.urls')), + # Wiki + url(r'^notifications/', get_nyt_pattern()), + url(r'^wiki/', get_wiki_pattern()), + # Default catch-all for wagtail pages. url(r'^', include(wagtail_urls)), diff --git a/requirements.txt b/requirements.txt index db9a6bdb..4e77c20a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,6 +13,9 @@ wagtail==1.6.2 pylibmc==1.5.1 raven==5.27.0 +#Wiki +wiki==0.1.2 + # For testing django-nose==1.4.3 coverage==4.0.3 diff --git a/static/dist/css/wiki.css b/static/dist/css/wiki.css new file mode 100644 index 00000000..302de402 --- /dev/null +++ b/static/dist/css/wiki.css @@ -0,0 +1,76 @@ +#div_id_title .asteriskField{display:none} +#id_title {font-size: 20px; height: 30px; padding: 6px; width: 98%;} +#id_summary {width: 98%; padding: 6px;} + +h1#article-title {font-size: 2em; margin-top: -5px;} + +#article_edit_form label {max-width: 100px;} +#article_edit_form .controls {margin-left: 120px;} + +.form-horizontal label { font-size: 16px; font-weight: normal; color: #777;} + +.settings-form label {min-width: 250px; font-size: inherit; font-weight: normal;} +.settings-form .controls {margin-left: 270px;} +.settings-form select {} +.settings-form .form-actions { padding-left: 270px; } + +#attachment_form #id_description +{ width: 95% } + +#edit_sidebar .accordion {margin-bottom: 5px;} + +.wiki-article div.toc, +.wiki-article div.article-list { + margin: 10px 0; + background: #f9f9f9; + padding: 10px; + width: 300px; + border: 1px solid #CCC; +} + +.wiki-article a.linknotfound {color: #C87;} + +.wiki-article pre { + max-width: 700px; +} + +input[type=file] {float: none; width: auto;} +.asteriskField { font-size: 20px; margin-left: 5px;} + +.notification-list .since { + font-size: 80%; + color: #CCC; +} + +.directory-toolbar .filter-clear { margin-right: 10px; position: relative; top: 5px; } + +.accordion-heading h3 {margin: 0;} + +.breadcrumb .icon-bar { + display: block; + width: 18px; + height: 2px; + background-color: rgb(245, 245, 245); + border-radius: 1px 1px 1px 1px; + box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.25); + margin-top: 3px; +} +.breadcrumb .icon-bar:first-child{margin-top: 0;} + +#navbar_wiki_search input.search-query {width: 80px;} + +#article-menu +{ + border-bottom: 1px solid #EEE; +} + +#article-container +{ + margin-top: 20px; +} + +#wiki-footer +{ + padding: 30px 0; + clear: both; +}