예제 #1
0
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
예제 #2
0
class DummyAliasBundle(bundles.Bundle):
    dummy_edit = views.FormView()
    edit = bundles.URLAlias(alias_to = "dummy_edit")

    class Meta():
        model = DummyModel
        item_views = ('dummy_edit', 'delete')
예제 #3
0
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
예제 #4
0
class DummyRedirectorBundle(bundles.Bundle):
    edit = views.FormView(redirect_to_view='edit')

    class Meta():
        model = DummyModel
        item_views = ('edit', 'delete')