diff --git a/tailbone/views/master.py b/tailbone/views/master.py index 65b71224..9f7112cd 100644 --- a/tailbone/views/master.py +++ b/tailbone/views/master.py @@ -647,15 +647,12 @@ class MasterView(View): if self.creating: kwargs.setdefault('cancel_url', self.get_index_url()) else: - kwargs.setdefault('cancel_url', self.get_cancel_url(instance)) + kwargs.setdefault('cancel_url', self.get_action_url('view', instance)) factory = kwargs.pop('factory', forms.AlchemyForm) form = factory(self.request, fieldset, **kwargs) form.readonly = self.viewing return form - def get_cancel_url(self, instance): - return self.get_action_url('view', instance) - def save_form(self, form): form.save() diff --git a/tailbone/views/settings.py b/tailbone/views/settings.py index c40e734d..f02f5e3c 100644 --- a/tailbone/views/settings.py +++ b/tailbone/views/settings.py @@ -36,7 +36,6 @@ class SettingsView(MasterView): Master view for the settings model. """ model_class = model.Setting - viewable = False def configure_grid(self, g): g.filters['name'].default_active = True @@ -49,19 +48,6 @@ class SettingsView(MasterView): ], readonly=True) - def get_grid_actions(self): - # TODO: bit of a hack, but gets the job done - return self.get_more_actions(), [] - - def get_cancel_url(self, setting): - return self.get_index_url() - - def redirect_after_create(self, setting): - return self.redirect(self.get_index_url()) - - def redirect_after_edit(self, setting): - return self.redirect(self.get_index_url()) - def configure_fieldset(self, fs): fs.configure( include=[