Skip to content
This repository has been archived by the owner on Oct 29, 2019. It is now read-only.

Commit

Permalink
Merge pull request #380 from aldryn/issue/remove-add-related-article-…
Browse files Browse the repository at this point in the history
…from-article-change-form

Article admin change form: remove possibility to add related article.
  • Loading branch information
Kirill Kniazev committed Apr 15, 2016
2 parents 1ea2cd9 + 9308de1 commit 9d9fb00
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions aldryn_newsblog/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ def __init__(self, *args, **kwargs):
# Don't allow app_configs to be added here. The correct way to add an
# apphook-config is to create an apphook on a cms Page.
self.fields['app_config'].widget.can_add_related = False
# Don't allow related articles to be added here.
# doesn't makes much sense to add articles from another article other
# than save and add another.
self.fields['related'].widget.can_add_related = False


class ArticleAdmin(
Expand Down

0 comments on commit 9d9fb00

Please sign in to comment.