Admin Tool: Ensure Ability to Delete Individual Collages from Gallery

RESOLVED FIXED

Status

Websites
webifyme.org
--
major
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: Tiffany Dickson, Assigned: Stewart McKinney)

Tracking

Details

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build Identifier: 

Within the admin tool (documented in issue 654857) the ability to delete individual collages if user requests should be included.  

Deletion of the collage should only be from display in the public gallery and not deletion of the collage in total from the site.


Reproducible: Always
(Reporter)

Updated

7 years ago
Depends on: 654857
(Reporter)

Updated

7 years ago
Severity: normal → major
(Reporter)

Updated

7 years ago
Summary: Admin Tool: Ensure Ability to Delete Individual Collages → Admin Tool: Ensure Ability to Delete Individual Collages from Gallery

Updated

7 years ago
Assignee: nobody → jbresnik

Updated

7 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true

Updated

7 years ago
Assignee: jbresnik → smckinney
Status: NEW → ASSIGNED
(Assignee)

Comment 1

7 years ago
Added in commit, SHA: f1d08c0f0e2424b539f52b34a4fbee42ffb21d22

DIFF:

diff --git a/ff4/templates_orig/admin/base_site.html b/ff4/templates_orig/admin/base_site.html
index 3f00db4..10c2dd3 100644
--- a/ff4/templates_orig/admin/base_site.html
+++ b/ff4/templates_orig/admin/base_site.html
@@ -1,10 +1,10 @@
 {% extends "admin/base.html" %}
 {% load i18n %}
 
-{% block title %}{{ title }} | {% trans 'Webify :: Collage Browser' %}{% endblock %}
+{% block title %}{% trans 'Webify :: Collage Browser' %}{% endblock %}
 
 {% block branding %}
-<h1 id="site-name">{% trans 'Django administration' %}</h1>
+<h1 id="site-name">{% trans  'Webify :: Collage Browser' %}</h1>
 {% endblock %}
 
 {% block nav-global %}{% endblock %}
diff --git a/ff4/things/admin.py b/ff4/things/admin.py
new file mode 100644
index 0000000..1b3eb76
--- /dev/null
+++ b/ff4/things/admin.py
@@ -0,0 +1,23 @@
+from things.models import QuizQuestion, QuizAnswer, Image, QuizAnswerByImage, Collage
+from django.contrib import admin
+import pdb;
+
+def make_featured(modeladmil, request, queryset):
+    queryset.update(featured=1)
+
+make_featured.short_description = "Make selected collages featured"
+
+def unfeature(modeladmil, request, queryset):
+    queryset.update(featured=0)
+
+unfeature.short_description = "Make selected collages unfeatured"
+
+class CollageAdmin(admin.ModelAdmin):
+    fields = ['filename','username','featured','in_gallery','background_img']
+    list_display = ('filename','username','featured','in_gallery','background_img')
+    actions = [make_featured,unfeature]
+
+
+
+admin.site.register(Collage,CollageAdmin)
(Assignee)

Comment 2

7 years ago
For the record, that import pdb statement was removed in commit SHA:
dbdca7df73592ab83d19cebdc47989e8c5cd55a2

Comment 4

7 years ago
Setting to FIXED for Stew
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.