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

Commit

Permalink
Merge pull request #50 from sylvestre/set_to_public
Browse files Browse the repository at this point in the history
Bug 1122088 - Add a new action to set several releases to public
  • Loading branch information
jgmize committed Jan 21, 2015
2 parents 7ab8c22 + 4cde47b commit 47cbd51
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rna/admin.py
Expand Up @@ -39,7 +39,7 @@ class Meta:


class ReleaseAdmin(admin.ModelAdmin):
actions = ['copy_releases']
actions = ['copy_releases', 'set_to_public']
form = ReleaseAdminForm
list_display = ('version', 'product', 'channel', 'is_public',
'release_date', 'text', 'url')
Expand Down Expand Up @@ -96,6 +96,9 @@ def copy_releases(self, request, queryset):
else:
self.message_user(request, 'Copied %s Releases' % release_count)

def set_to_public(self, request, queryset):
""" Set one or several releases to public """
queryset.update(is_public=True)

admin.site.register(models.Note, NoteAdmin)
admin.site.register(models.Release, ReleaseAdmin)

0 comments on commit 47cbd51

Please sign in to comment.