1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#
# Copyright (C) 2010 Wikkid Developers
#
# This software is licensed under the GNU Affero General Public License
# version 3 (see the file LICENSE).
"""View base class for editing text pages."""
from wikkid.view.base import BaseView
from wikkid.view.utils import expand_wiki_name
class BaseEditView(BaseView):
"""Base class for editing text."""
name = 'edit'
template = 'edit_page'
@property
def title(self):
return 'Editing "%s"' % expand_wiki_name(self.context.base_name)
@property
def save_url(self):
"""The link for the cancel button."""
return self.canonical_url(self.context, 'save')
@property
def cancel_url(self):
"""The link for the cancel button."""
return self.canonical_url(self.context)
|