Code Monkey home page Code Monkey logo

django-wiki's Introduction

django-wiki

Docs Build status Coverage Status PyPi Downloads IRC

Django support

The below table explains which Django versions are supported.

Release Django Upgrade from
0.11.x 3.2, 4.0, 4.1, 4.2, 5.0 0.10
0.10.x 2.2, 3.0, 3.1, 3.2, 4.0, 4.1, 4.2 0.7
0.9.x 2.2, 3.0, 3.1, 3.2, 4.0 0.7
0.8.x 2.2, 3.0, 3.1, 3.2, 4.0 0.7
0.7.x 2.2, 3.0, 3.1, 3.2 0.5 or 0.6
0.6.x 2.1, 2.2, 3.0 0.5
0.5.x 2.1, 2.2 0.4
0.4.x 1.11, 2.0, 2.1 0.3
0.3.x 1.8, 1.9, 1.10, 1.11 0.2
0.2.x 1.8, 1.9, 1.10 0.1
0.1.x 1.5, 1.6, 1.7 0.0.24
0.0.24 1.4, 1.5, 1.6 1.7 (unstable) 0.0.?

For upgrade instructions, please refer to the Release Notes

Translations (Transifex)

Django-wiki is fully translated into 13 languages, apart from the default (English) and some additional languages underway.

But please help out in adding more languages! It's very easy and you don't even need to be a programmer.

Some languages...

  • ...just need a little push, as they are almost fully complete
  • ...got initiated and need a new instigator to carry on the ambitions
  • ...do not exist yet - but you can request them and become the coordinator

Visit the django-wiki project on Transifex

Demo

A demo running the latest main branch is available here:

https://demo.django-wiki.org

Sign up for an account to see the notification system, or you can log in with the existing account:

  • user: admin
  • password:admin

Community

Please use our IRC or mailing list (google group) for getting in touch on development and support. Please do not email developers asking for personal support.

Always a work in progr...

On a number of factors, this project has proven itself useful and stable.

  • There won't be changes that are expected to cause loss of data without a proper upgrade path.
  • The model API has been very stable and is only subject to smaller changes.
  • The plugin API seems pretty stable.
  • You can maintain the latest version of django-wiki through PyPi (package name: wiki), using SemVer versioning schema.

What should I customize? What can break?

You will need to learn a bit of Django to customize django-wiki.

The simplest is to override templates and create your own template tags. Do not make your own hard copy of this repository in order to fiddle with internal parts of the wiki, this strategy will lead you to lose out on future updates with highly improved features, plugins and security fixes.

You can also override the whole Bootstrap theming. At present, you're best off maintaining your own Bootstrap SCSS and hard-copying, then overriding django-wiki's rules.

All Python views are class-based. However for most cases overriding views and URLs shouldn't be the best place to start since most customization can be achieved through plugins, templates and SCSS.

Contributing

Contributions are welcome! ❤️

Please read our Developer Guide

Manifesto

Django needs a mature wiki system appealing to all kinds of needs, both big and small:

  • Be pluggable and light-weight. Don't integrate optional features in the core.
  • Be open. Make an extension API that allows the ecology of the wiki to grow in a structured way. Wikipedia consists of over 1100 extension projects written for MediaWiki. We should learn from this.
  • Be smart. This is the map of tables in MediaWiki - we'll understand the choices of other wiki projects and make our own. After-all, this is a Django project.
  • Be simple. The source code should almost explain itself.
  • Be structured. Markdown is a simple syntax for readability. Features should be implemented either through easy coding patterns in the content field, but rather stored in a structured way (in the database) and managed through a friendly interface. This gives control back to the website developer, and makes knowledge more usable. Just ask: Why has Wikipedia never changed? Answer: Because it's knowledge is stored in a complicated way, thus it becomes very static.

Docs

See the docs/ folder, or read them at:

https://django-wiki.readthedocs.io/en/latest/

If you wish to add something, please ask in the google group or raise an issue if you're in doubt about whether something might change.

Background

Django-wiki is a rewrite of django-simplewiki, a project from 2009 that aimed to be a base system for a wiki. It proposed that the user should customize the wiki by overwriting templates, but soon learned that the only customization that really took place was that people forked the entire project. We don't want that for django-wiki, we want it to be modular and extendable.

As of now, Django has existed for too long without a proper wiki application. The dream of django-wiki is to become a contestant alongside Mediawiki, so that Django developers can stick to the Django platform even when facing tough challenges such as implementing a wiki.

Q&A

  • Why is the module named just wiki ? Because when we tried pip install wiki, it returned "No distributions at all found for wiki", so we had to make up for that! ...oh, and django-wiki was occupied.
  • What markup language will you use? Markdown. The markup renderer is not a pluggable part but has been internalized into core parts. Discussion should go here: #76
  • Why not use django-reversion? It's a great project, but if the wiki has to grow ambitious, someone will have to optimize its behavior, and using a third-party application for something as crucial as the revision system is a no-go in this regard.
  • Any support for multiple wikis? Yes, in an sense you can just imagine that you always have multiple wikis, because you always have hierarchies and full control of their permissions. See this discussion: #63

Docker tl;dr

There is a docker container available here: https://github.com/riotkit-org/docker-django-wiki

Acknowledgements

Original source of inspiration back in 2009 was django-cms, and since then Wagtail has also done a tremendous amount of work to promote Django models as a fundamental structure and enabler for application design.

django-wiki's People

Contributors

alkalit avatar atombrella avatar azaghal avatar benjaoming avatar bridger avatar chrisv2 avatar crazyzubr avatar dencold avatar dependabot[bot] avatar duvholt avatar floemker avatar fredmajor avatar hynekcer avatar inflrscns avatar iqbalabd avatar jchristgit avatar jenda1 avatar jluttine avatar mortal avatar orcephrye avatar oscarmcm avatar rsalmaso avatar russell-jones avatar slyperdrix avatar spookylukey avatar superandrew avatar teury avatar the-glu avatar tomlottermann avatar yedpodtrzitko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-wiki's Issues

search previews display unformatted content

This is lovely work btw – very overdue to have good django wiki, and this looks very promising.

One small, low-priority issue here, and I'm not sure what the correct behaviour would actually be: When searching a site which is using markdown formatting, the search previews display the markup tags (## heading, [^footnote] etc)

Actually formatting the text might not be desirable, but I think stripping tags and displaying plaintext might be nicer.

Limiting Access to Settings

I would like to grant a user access to edit a page without giving that user the ability to edit the page's permissions. Perhaps there should be another permission flag for editing permissions?

AttributeError at /comments/post/

I added django comments framework and comment form into wiki/article.html

after posting comment, i had this error:

AttributeError at /comments/post/

'function' object has no attribute 'startswith'

Request Method: POST
Request URL: http://127.0.0.1:8000/comments/post/
Django Version: 1.4
Exception Type: AttributeError
Exception Value:

'function' object has no attribute 'startswith'

Exception Location: /home/vladka/PycharmProjects/wiki/wikidharma/wiki/models/init.py in reverse, line 66
Python Executable: /home/vladka/PycharmProjects/wiki/env/bin/python
Python Version: 2.7.3
Server time: Срд, 22 Авг 2012 01:13:31 -0500

...
/home/vladka/PycharmProjects/wiki/wikidharma/wiki/models/init.py in reverse

if args[0].startswith('wiki:'): ...

Variable Value
args = ( function confirmed at 0x2a47c80 ,)
kwargs = {}

i guess you need to change init.py to something like this:

if type(args[0]) == str and args[0].startswith('wiki:'):

Deleting and restoring article has side effects

Right now, deleting an article marks all child articles as deleted. To restore the article all children must be undeleted, whether or not they were deleted before their parent was deleted then restored.

For example:

foo/
   bar-normal
   bar-deleted

bar-normal and bar-deleted are children of foo. bar-deleted starts out as deleted. If we delete foo, it will mark bar-normal as deleted. If we restore foo, it will mark both bar-normal and bar-deleted as undeleted! This means a deletion is not safely reversible.

Another bad side effect case is when one article has two urlpaths - pets/dog and animals/dog. If pets/ is deleted, dog will be too which makes it disappear from animals/.

I would like to propose an alternate deleting scheme. Instead of recursively deleting children, only the target article is deleted. When a urlpath is resolved, it checks that all parent articles have not been deleted. In the previous example where pets/ is deleted, accessing pets/dog would show up as deleted but accessing animals/dog would work fine.

This suggests that asking if an article is deleted should work at the urlpath level. A method is_deleted() could return a tuple (result_bool, first_deleted_ancestor), where first_deleted_ancestor is useful because it is the article a user must restore to view their target article.

Planning use of select_related

Related objects often accessed:

  • article.select_related() <- since all articles include a call to current_revision
  • urlpath.get_ancestors().select_related() <- since most views also include a breadcrumb list
  • On the History page: revisions.select_related <- since all revisions point to previous_revision

More ideas!

This is a big performance boost, since it will avoid many on-the-fly SQL queries.

feature request: page templates

One of my favorite features from MediaWiki is Templates. I'd love to see something similar in django-wiki. Templates are so useful for standardizing the way you create certain types of documents.

The basic usage model as I used it was to create a template page for each type of document that I want people to create. Then when people create new pages, there's a very clear set of choices for how they might lay out their content. It's also fantastic as an aid when learning the wiki syntax because it can give you a lot of examples using whatever conventions are common on the site.

In MediaWiki, selecting a template on a new or existing page will overwrite whatever is in the page currently. I don't know if that's good or bad -- once you know how it behaves, you adapt accordingly. That features isn't important to me, but the ability to lay out standard document styles and then to let people see them on page creation is.

Merging with special revisions

Right now, the changes pages allows a user to merge the current article with a deleted revision. This works fine because the deleted revision has a copy of the full text before it was deleted. It is kind of odd though. Should it be allowed?

Replace contains with iexact for title in SearchView

In views/article SearchView - line 467 there's

articles = models.Article.objects.filter(Q(current_revision__title__contains=self.query) |
Q(current_revision__content__contains=self.query))

in my opinion there should be
articles = models.Article.objects.filter(Q(current_revision__title__iexact=self.query) |
Q(current_revision__content__contains=self.query))

So articles with slugs containing capitalized first letter will be findable :)

Multilingual Support

Hi,
Just wanted to know if multilingual is planned or not? Sure I could do something like /mywiki/fr/XXX but that would be better to support a language namespace out of the box I think.

Thanks,

Guillaume

TemplateSyntaxError: You must enable the 'sekizai.context_processors.sekizai'...

I got this error when trying to access the wiki for the first time.

TemplateSyntaxError at /wiki/_accounts/login/
You must enable the 'sekizai.context_processors.sekizai' template context processor or use 'sekizai.context.SekizaiContext' to render your templates.

This is fixed adding sekizai.context_processors.sekizai to TEMPLATE_CONTEXT_PROCESSORS:

TEMPLATE_CONTEXT_PROCESSORS = (
    (...)
    "sekizai.context_processors.sekizai",
)

Maybe this should be added to the README?

Add article from admin error

IntegrityError at /admin/wiki/article/add/
ORA-01400: cannot insert NULL into ("ISV"."WIKI_ARTICLEREVISION"."REVISION_NUMBER")

Embedding an article without attaching it to an URLPath

Hi,

First of all, thanks for this effort, this is just awesome to see such a good wiki being developed :)

I'm trying to embed an article into a page of my website, but I'd like the article not to be binded to an URLPath, since it's more linked to my already exiistng page. Is this use case possible at the moment ?

As a temporary fix, I've created a namespace for these pages (say tags/XXX) where I store them, but that should be optional in my case.

Thanks,

Guillaume

Search feature

Are there any chances that django-wiki will get a search included out-of-the-box? Would be awesome. Love the Project so far.

Support for citations via bibtex/csl

It would be amazing if django-wiki had integrated support for academic citations. One of the biggest frustrations for me with mediawiki is the mess that citations get in, and the fact that there's no way of adding citations in a structured format (for example to facilitate browsing by author in separate views from the wiki).

My current project is a research wiki which aims to collate the latest findings in a particular field for both students and researchers, and I think it would be great if citations were dealt with in a similar way to attachments, but with an extension to the markdown syntax (based on pandoc's?) which allows you to create in-text citations from the citekey. What I want ultimately is to be able to add citations in wiki pages, but pull them out for a 'latest publications' listing elsewhere.

CLS is definitely seems the way to go, and citeproc.py does a lot of what would be needed in terms of processing bibtex. Django-publications may also be interesting as a starting point for a storage model.

Unsaved changes are lost when uploading images

First of all, I have to say that this is a fantastic much-needed project! You guys are doing a great job and I'm looking forward to watching this project keep blooming.

Steps to reproduce:

  1. Click edit article
  2. Make some changes
  3. Realise you want to add image
  4. Click on images, Select a file, select add image
    Result:
    The image is uploaded, but it reloads the pages and all of your other changes are lost.

Expectation:
Ideally when the page reloads it will still show what you had written up to that point. Alternatively having at least a warning before submitting the form would be useful (as is already on the Todo list)

And now for something completely different:
(I hope it isn't too bad ettiquete to add other things in this same posting).
Have you considered using google's diff-match-patch library? At a cursory glance, I prefer its diffs and patches
I'd like to experiment with using TinyMCE for markup/editing, when do you think the code will be stable enough to play around with this?

javascript would be better if linked from after the footer

At the moment it's impossible to put javascript dependencies (e.g. jquery, bootstrap) after the page content because the article doesn't display if you do. I haven't checked why this is, but page loads are much faster if the js links come after the content (css should come first though).

AttributeError at / 'EmptyQuerySet' object has no attribute 'select_related_common'

after today update i had this error.

AttributeError at /
'EmptyQuerySet' object has no attribute 'select_related_common'

Here is traceback:

/home/vladka/PycharmProjects/wiki/wikidharma/wiki/decorators.py in wrapper
if urlpath.is_deleted(): # This also checks all ancestors ...
▶ Local vars

/home/vladka/PycharmProjects/wiki/wikidharma/wiki/models/urlpath.py in is_deleted
return self.first_deleted_ancestor() is not None ...
▼ Local vars
self URLPath: (root)

/home/vladka/PycharmProjects/wiki/wikidharma/wiki/models/urlpath.py in first_deleted_ancestor
def is_deleted(self):
"""
Returns True if this article or any of its ancestors have been deleted
"""
return self.first_deleted_ancestor() is not None

def first_deleted_ancestor(self):
    for ancestor in self.cached_ancestors + [self]: ...
        if ancestor.article.current_revision.deleted == True:
            return ancestor
    return None

@transaction.commit_manually
def delete_subtree(self):

▼ Local vars
self URLPath: (root)

/home/vladka/PycharmProjects/wiki/wikidharma/wiki/models/urlpath.py in cached_ancestors
add_selecte_related on one of these ancestors will not occur an additional
sql query, as they were retrieved with a select_related.

    If the cached ancestors were not set explicitly, they will be retrieved from
    the database.
    """
    if not hasattr(self, "_cached_ancestors"):
        self._cached_ancestors = list(self.get_ancestors().select_related_common() ) ...
    #self._cached_ancestors = []
    return self._cached_ancestors

@cached_ancestors.setter
def cached_ancestors(self, ancestors):

▼ Local vars
self URLPath: (root)

What are you thinking about writing unittest ?
maybe i will make it ...

Limiting Anonymous Access

With the "groups" and "others" permissions, it is difficult to limit access to anonymous users. For example, I have a page that I want administrators to be able to edit, regular users can only view, and anonymous users cannot have any access.

I see three different approaches to fixing this problem. In increasing complexity:

  1. Configure site-wide permissions for anonymous users. (The same for every article.)
  2. Add another group of permissions to every article "anonymous_read", "anonymous_write".
  3. Allow more than set of (group, read_policy, write_policy) to articles.

I think 3 would add a lot of complexity. 1 would suite my needs personally, but I don't know if it would be flexible enough for everyone. 2 seems like a winner.

makemessages problem

processing language ru

Error: errors happened while running xgettext on views.py
./apps/wiki/views.py:135:: warning: 'msgid' format string with unnamed arguments cannot be properly localized:
                                   The translator cannot reorder the arguments.
                                   Please consider using a format string with named arguments,
                                   and a mapping instead of a tuple for the arguments.```

Deleting articles should respect parent's can_edit

I am not sure, but I believe that for a user to delete an article, the user should have write access to the parent of that article.

In the edX setup we will have the root article and several course pages.

/
  6.002x/
    FAQ/
  3.091x/
    crystals/

The root article is not editable by students. 6.002x and 3.091x are editable, but it would be nice if a student couldn't delete those pages.

Also, in general deleting an article is useful when someone accidentally creates an article and needs to get rid of it. Creating an article relies on the edit permissions of the parent. Deleting should probably do the same.

It might be tricky (or impossible) to find a parent for a given article though. Can't some articles have two parents?

Comments?

Files with non anscii names cannot be downloaded

UnicodeEncodeError at /teksty-na-sajt/tehnicheskie/vneshnie-i-vnutrennie-faktory-obespecheniya-kaches/_plugin/attachments/download/1/
'ascii' codec can't encode characters in position 21-26: ordinal not in range(128), HTTP response headers must be in US-ASCII format
Request Method: GET
Request URL: http://wiki.loc/teksty-na-sajt/tehnicheskie/vneshnie-i-vnutrennie-faktory-obespecheniya-kaches/_plugin/attachments/download/1/
Django Version: 1.4.1
Exception Type: UnicodeEncodeError
Exception Value:
'ascii' codec can't encode characters in position 21-26: ordinal not in range(128), HTTP response headers must be in US-ASCII format
Exception Location: /usr/home/vladka/wiki.loc/env/lib/python2.7/site-packages/django/http/init.py in _convert_to_ascii, line 594
Python Executable: /usr/home/vladka/wiki.loc/env/bin/python
Python Version: 2.7.2
Python Path:
['/usr/home/vladka/wiki.loc/wikidharma',
'/usr/home/vladka/wiki.loc/env/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg',
'/usr/home/vladka/wiki.loc/env/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg',
'/usr/home/vladka/wiki.loc/env/lib/python27.zip',
'/usr/home/vladka/wiki.loc/env/lib/python2.7',
'/usr/home/vladka/wiki.loc/env/lib/python2.7/plat-freebsd8',
'/usr/home/vladka/wiki.loc/env/lib/python2.7/lib-tk',
'/usr/home/vladka/wiki.loc/env/lib/python2.7/lib-old',
'/usr/home/vladka/wiki.loc/env/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7',
'/usr/local/lib/python2.7/plat-freebsd8',
'/usr/local/lib/python2.7/lib-tk',
'/usr/home/vladka/wiki.loc/env/lib/python2.7/site-packages',
'/usr/home/vladka/wiki.loc/env/lib/python2.7/site-packages/PIL']
Server time: Sat, 15 Sep 2012 08:26:42 -0500

/usr/home/vladka/wiki.loc/wikidharma/wiki/core/http.py in send_file
response["Content-Disposition"] = "attachment; filename=%s" % filename ...
▶ Local vars
/usr/home/vladka/wiki.loc/env/lib/python2.7/site-packages/django/http/init.py in setitem
header, value = self._convert_to_ascii(header, value) ...
▶ Local vars
/usr/home/vladka/wiki.loc/env/lib/python2.7/site-packages/django/http/init.py in _convert_to_ascii
value = value.encode('us-ascii')

'EmptyQuerySet' object has no attribute 'can_read'

When creating root I get:

AttributeError at /wiki

'EmptyQuerySet' object has no attribute 'can_read'

Exception Value:

'EmptyQuerySet' object has no attribute 'can_read'

Exception Location: /home/easy2/domains/lekarzeweb.pl/lekarzeweb_dev/doctorsweb/../lib/wiki/models/article.py in get_children, line 101

../lib/wiki/models/article.py in get_children

                yield descendant



    def get_children(self, max_num=None, user_can_read=None, **kwargs):

        """NB! This generator is expensive, so use it with care!!"""

        cnt = 0

        for obj in self.articleforobject_set.filter(is_mptt=True):

            if user_can_read:

                objects = obj.content_object.get_children().filter(**kwargs).can_read(user_can_read)

...

            else:

                objects = obj.content_object.get_children().filter(**kwargs)

            for child in objects.order_by('articles__article__current_revision__title'):

                cnt += 1

                if max_num and cnt > max_num: return

                yield child

suggestion: keyboard shortcuts for editing/saving articles

It would be neat if there were key shortcuts for editing/saving. Mousetrap (https://github.com/ccampbell/mousetrap) is a really nice (and light) library for capturing key events cross platform. Adding it would be as simple as:

<script src="{{ STATIC_URL }}js/mousetrap.min.js"></script>

And then in a script block in the article template:

$("#id_content").addClass('mousetrap'); // this enables capture of key events in a text area (not the default)
Mousetrap.bind(['ctrl+s'], function(e) { 
          document.getElementById('article_edit_form').target=''; document.getElementById('article_edit_form').action='/_edit/'; 
      });


  Mousetrap.bind(['ctrl+e'], function(e) {
      window.location.href = "{% url 'wiki:edit' article_id=article.id path=urlpath.path %}";
  });

At the same time, it might be worth cleaning up the javascript link generation to use {% url %} and also query, given it's already a dependency.

suggestion: get rid of LOGIN_REDIRECT_URL

How would you guys feel about changing the pattern for logging in/editing pages. At present it feels weird to be on an article but not logged in, then login and be redirected to some other page, then navigate back to start editing.

A more normal flow would be to click 'edit', then be redirected to a login page, and then if successful back to the edit page. In fact, this is what happens if you manually edit the url (adding '_edit') when logged out.

So my suggestion is to always show the 'edit' button on articles (perhaps alongside view source if you think it's important) and use LOGIN_REDIRECT_URL as a fallback for when the user clicks a login link.

syncdb on Oracle - ORA-00910: specified length too long for its datatype

./manage.py syncdb
/usr/local/lib/python2.6/site-packages/South-0.7.5-py2.6.egg/south/db/oracle.py:25: UserWarning: ! WARNING: South's Oracle support is still alpha. Be wary of possible bugs.
warnings.warn("! WARNING: South's Oracle support is still alpha. "
Syncing...
Creating tables ...
Creating table wiki_article
Creating table wiki_articleforobject
Creating table wiki_articlerevision
Traceback (most recent call last):
File "./manage.py", line 10, in
...
django.db.utils.DatabaseError: ORA-00910: specified length too long for its datatype

Database Oracle 11g, NLS_NCHAR_CHARACTERSET AL16UTF16
Problem in column UserMessage: "USER_MESSAGE" NVARCHAR2(2056).
Oracle Docs: The maximum column size allowed is 4000 characters when the national character set is UTF8 and 2000 when it is AL16UTF16.

DatabaseError: tablespace "notify" does not exist

I got the following error then tried to run syncdb:

django.db.utils.DatabaseError: tablespace "notify" does not exist

I think the notifications should use the default tablespace, since the setup of a extra tablespace adds unnecesary complexity

wiki.plugins.images - ORA-00910: specified length too long for its datatype

manage.py migrate wiki.plugins.images

Error on SQL DML:

CREATE TABLE "IMAGES_IMAGE" ("REVISIONPLUGIN_PTR_ID" NUMBER(11) NOT NULL PRIMARY KEY, "IMAGE" NVARCHAR2(100) DEFAULT '' NULL , "CAPTION" NVARCHAR2(2056) DEFAULT '' NULL );

Caption NVARCHAR2 must be equal or less 2000 byte length for Oracle NLS_CHARACTERSET = AL32UTF8

ArticleForObject not always creating with new article

if add article with very big slug (for example 200 symbols), and add this article - everything seems looks fine, but you can't see this article in breadcrumbs list and some other places.

Problem that if you added article with huge slug, new record in articleforobject table wasn't created for this article

Better install instructions on README

When installing django-wiki on an existing application, you must:

  • Add at least mptt, sekizai, and django.contrib.humanize to settings.INSTALLED_APPS
  • run syncdb
  • setup urls.

To setup urls, I've added:

url(r'^wiki/', include('wiki.urls', namespace='wiki')),

Maybe this should be reflected on the README

TransactionManagementError at XXX/_plugin/attachments/

I'm getting this error when trying to add an attachment to a page:

Transaction managed block ended with pending COMMIT/ROLLBACK

The traceback is below. I can see you are doing something off with manual commits of transactions... I've never actually used django's transactions before though.

Environment:

Request Method: POST
Request URL: http://127.0.0.1:8000/Practice/_plugin/attachments/

Django Version: 1.4
Python Version: 2.7.2
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.redirects',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.sitemaps',
'django.contrib.staticfiles',
'django.contrib.markup',
'django.contrib.humanize',
'storages',
'cms',
'mptt',
'menus',
'sekizai',
'cms.plugins.picture',
'cms.plugins.link',
'cms.plugins.file',
'cms.plugins.snippet',
'cms.plugins.teaser',
'cmsplugin_markup',
'registration',
'south',
'publications',
'research',
'categories',
'categories.editor',
'compressor',
'wiki',
'wiki.plugins.attachments',
'wiki.plugins.links',
'wiki.plugins.help',
'wiki.plugins.notifications',
'wikicitations',
'django_notify',
'overextends')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'cms.middleware.page.CurrentPageMiddleware',
'cms.middleware.user.CurrentUserMiddleware',
'cms.middleware.toolbar.ToolbarMiddleware')

Traceback:
File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1.                     response = callback(request, _callback_args, *_callback_kwargs)
    
    File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/views/generic/base.py" in view
  2.         return self.dispatch(request, _args, *_kwargs)
    
    File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapper
  3.         return bound_func(_args, *_kwargs)
    
    File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/wiki/decorators.py" in wrapper
  4.     return func(request, article, _args, *_kwargs)
    
    File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/utils/decorators.py" in bound_func
  5.             return func(self, _args2, *_kwargs2)
    
    File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/wiki/plugins/attachments/views.py" in dispatch
  6.     return super(AttachmentView, self).dispatch(request, article, _args, *_kwargs)
    
    File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/wiki/views/mixins.py" in dispatch
  7.     return super(ArticleMixin, self).dispatch(request, _args, *_kwargs)
    
    File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
  8.     return handler(request, _args, *_kwargs)
    
    File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/views/generic/edit.py" in post
  9.         return self.form_valid(form)
    
    File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/db/transaction.py" in inner
  10.             return func(_args, *_kwargs)
    
    File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/db/transaction.py" in exit
  11.     self.exiting(exc_value, self.using)
    
    File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/db/transaction.py" in exiting
  12.     leave_transaction_management(using=using)
    
    File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/db/transaction.py" in leave_transaction_management
  13. connection.leave_transaction_management()
    
    File "/Users/ben/django/placebo/v/lib/python2.7/site-packages/django/db/backends/init.py" in leave_transaction_management
  14.         raise TransactionManagementError("Transaction managed block ended with "
    

Exception Type: TransactionManagementError at /Practice/_plugin/attachments/
Exception Value: Transaction managed block ended with pending COMMIT/ROLLBACK

WIKI_ACCOUNT_HANDLING = False causes reverse lookup error

I was trying to turn off signups for a wiki which is going to be public view by invitation only to edit.

I tried setting WIKI_ACCOUNT_HANDLING = False, and then including
(r'^accounts/login/$', 'django.contrib.auth.views.login'),

in my urls.py, but I still get a reverse error because of this line in base.html

{% url 'wiki:login' %}

Can I suggest a setting to allow moderation of user signups? Or using writing a backend for django-registration to allow for pluggable registration backends?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.