syegulalp / mercury

Pure Python CMS and blogging solution using static HTML
http://mercury.genjipress.com
Other
18 stars 2 forks source link

Creating a new template with the same path as an existing one fails immediately, even if the new template is set to Do Not Publish #109

Closed syegulalp closed 8 years ago

syegulalp commented 8 years ago

This is partly a limitation of the schema we're currently using, since no two paths can be the same for any two templates system-wide, as a way to avoid namespace collisions.

syegulalp commented 8 years ago

One possible workaround for this would be to have dummy namespaces generated for templates set to Do Not Publish, although that would create some serious performance problems on sites with lots of pages.

syegulalp commented 8 years ago

I think the ideal solution is to leave this as-is for now, and just throw a more detailed warning whenever someone tries to create a template with an identical path. Perhaps throw the warning, and then modify the path so that it doesn't create a collision.