django-wiki / django-wiki

A wiki system with complex functionality for simple integration and a superb interface. Store your knowledge with style: Use django models.
https://demo.django-wiki.org
GNU General Public License v3.0
1.83k stars 570 forks source link

Allow numeric-only article slugs again? #878

Open citxx opened 6 years ago

citxx commented 6 years ago

I see, that the were explicitly forbidden in #558, because they were causing some errors, but is it possible to go around these errors without forbidding numeric-only slugs?

There are some quite legit use cases for this, like using a year number as a slug

benjaoming commented 6 years ago

It's perhaps possible that only the root slug isn't allowed to be a number.

citxx commented 6 years ago

Yes, looks like there should be no url conflicts for non-root article. But currently all the slugs are not allowed to be numbers.

teury commented 6 years ago

Now I have noticed it.

It can be corrected when editing these lines. https://github.com/django-wiki/django-wiki/blob/dd09cabc9419c86aa2d661ef04ac25b1b1dabea7/src/wiki/views/article.py#L68

There is no error in the administrator