Commit 0c492222 by benjaoming

Merge branches 'master' and 'haystack' of github.com:benjaoming/django-wiki into haystack

parents 2c1e7c10 b9d969df
include COPYING include COPYING
include README.md include README.md
include setup.cfg
include requirements.txt include requirements.txt
include model_chart_wiki.pdf include model_chart_wiki.pdf
recursive-include wiki *.html *.txt *.png *.js *.css *.gif *.less *.mo *.po recursive-include wiki *.html *.txt *.png *.js *.css *.gif *.less *.mo *.po
......
...@@ -9,7 +9,7 @@ Highlights: ...@@ -9,7 +9,7 @@ Highlights:
- Fix missing translation activation in django-notify's email notifications (manage command) - credits TomLottermann - Fix missing translation activation in django-notify's email notifications (manage command) - credits TomLottermann
- Add Russian on django-wiki and django-notify - credits crazyzubr - Add Russian on django-wiki and django-notify - credits crazyzubr
- Support for AUTH_USER_MODEL settings (seriously, don't use it though, unless you really want trouble in most third party django apps). Please note, that this is only going to help you if you are starting new projects. If you are changing the setting and introducing a new model in a running project, you have to do all database migrations manuall. Django-wiki and its South migrations will silently ignore your changes. - Support for AUTH_USER_MODEL settings (seriously, don't use it though, unless you really want trouble in most third party django apps). **Please note** this is only going to help you if you are starting new projects. If you are changing the setting and introducing a new model in a running project, you have to do all database migrations manually. Django-wiki and its South migrations will silently ignore your changes.
- Add settings for logging to files instead of stdout in django-notify daemon mode - credits: crazyzubr - Add settings for logging to files instead of stdout in django-notify daemon mode - credits: crazyzubr
- Built-in account handling now properly asserts that usernames are not already taken when signing up. - Built-in account handling now properly asserts that usernames are not already taken when signing up.
...@@ -19,7 +19,7 @@ Security fix included in 0.0.19. [View commit log >](https://github.com/benjaomi ...@@ -19,7 +19,7 @@ Security fix included in 0.0.19. [View commit log >](https://github.com/benjaomi
***News: March 26, 2013*** ***News: March 26, 2013***
Thanks to TomLottermann for German translation and daltonmatos for Brazilian translations! French are also reported in the works. 0.0.18 is released with that plus Django 1.5 compatibility, and [a bunch of other things and fixes](https://groups.google.com/forum/#!topic/django-wiki/V-bZou8aTaI). Thanks to TomLottermann for German translation and daltonmatos for Brazilian translations! French is also reported in the works. 0.0.18 is released with that plus Django 1.5 compatibility, and [a bunch of other things and fixes](https://groups.google.com/forum/#!topic/django-wiki/V-bZou8aTaI).
***News: February 21, 2013*** ***News: February 21, 2013***
......
...@@ -250,6 +250,8 @@ class CreateForm(forms.Form, SpamProtectionMixin): ...@@ -250,6 +250,8 @@ class CreateForm(forms.Form, SpamProtectionMixin):
slug = self.cleaned_data['slug'] slug = self.cleaned_data['slug']
if slug.startswith("_"): if slug.startswith("_"):
raise forms.ValidationError(_(u'A slug may not begin with an underscore.')) raise forms.ValidationError(_(u'A slug may not begin with an underscore.'))
if slug == 'admin':
raise forms.ValidationError(_(u"'admin' is not a permitted slug name."))
if settings.URL_CASE_SENSITIVE: if settings.URL_CASE_SENSITIVE:
already_existing_slug = models.URLPath.objects.filter(slug=slug, parent=self.urlpath_parent) already_existing_slug = models.URLPath.objects.filter(slug=slug, parent=self.urlpath_parent)
......
...@@ -79,7 +79,7 @@ class WikiPath(markdown.inlinepatterns.Pattern): ...@@ -79,7 +79,7 @@ class WikiPath(markdown.inlinepatterns.Pattern):
urlpath = None urlpath = None
path = path_from_link path = path_from_link
try: try:
urlpath = models.URLPath.get_by_path(path_from_link) urlpath = models.URLPath.get_by_path(article_title)
path = urlpath.get_absolute_url() path = urlpath.get_absolute_url()
except models.URLPath.DoesNotExist: except models.URLPath.DoesNotExist:
pass pass
......
...@@ -79,7 +79,7 @@ class WikiPath(markdown.inlinepatterns.Pattern): ...@@ -79,7 +79,7 @@ class WikiPath(markdown.inlinepatterns.Pattern):
urlpath = None urlpath = None
path = path_from_link path = path_from_link
try: try:
urlpath = models.URLPath.get_by_path(path_from_link) urlpath = models.URLPath.get_by_path(article_title)
path = urlpath.get_absolute_url() path = urlpath.get_absolute_url()
except models.URLPath.DoesNotExist: except models.URLPath.DoesNotExist:
pass pass
......
...@@ -35,6 +35,6 @@ ...@@ -35,6 +35,6 @@
{% endblock %} {% endblock %}
{% block footer_prepend %} {% block wiki_footer_prepend %}
<p style="margin-bottom: 10px;"><em>{% trans "This article was last modified:" %} {{ article.current_revision.modified }}</em></p> <p style="margin-bottom: 10px;"><em>{% trans "This article was last modified:" %} {{ article.current_revision.modified }}</em></p>
{% endblock %} {% endblock %}
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