class BlogEditBundle(bundles.VersionedObjectOnlyBundle): navigation = ( ('main', 'Post Data'), ('comments', 'Comments'), ('seo', 'Page SEO'), ('delete', 'Delete'), ('publish', 'Publish'), ('unpublish', 'Unpublish') ) main = views.FormView(redirect_to_view=None, formsets={"Images": postimages_formset}, fieldsets=DEFAULT_FIELDS) delete = PostDeleteView() edit = bundles.PARENT comments = CommentBundle.as_subbundle(name='comments', title="Comments", ) seo = views.FormView(redirect_to_view=None, cancel_view=None, fieldsets=( ("SEO", { 'fields': ('keywords', 'description',) }), )) class Meta: model = Post
class DummyAliasBundle(bundles.Bundle): dummy_edit = views.FormView() edit = bundles.URLAlias(alias_to = "dummy_edit") class Meta(): model = DummyModel item_views = ('dummy_edit', 'delete')
class AuthorBundle(bundles.Bundle): navigation = bundles.PARENT edit = views.FormView(form_class=EditAuthorForm) main = views.ListView(filter_form = forms.search_form('name', 'bio',)) class Meta: model = Author
class DummyRedirectorBundle(bundles.Bundle): edit = views.FormView(redirect_to_view='edit') class Meta(): model = DummyModel item_views = ('edit', 'delete')