{{{
class Question(models.Model):
...
question_image = models.ImageField(default='')
class Exam(models.Model):
...
questions = models.ManyToManyField(Question)
}}}
Now, I am looking for a way to make it more sensible to select questions
in the Exam Admin
Here is what I think should be pretty manageable
1.
Have a link to open a separate question selection page in Exam change
Admin
[[Image(https://i.imgur.com/XCR1kMr.png)]]
2.
Reuse this list view from Question's Admin
[[Image(https://i.imgur.com/QaGz5VM.png)]]
Since it already has checkbox and the images are displayed too,
All i need is a Submit button and some JS after i have stripped it down to
fit my needs.
Can you please guide me on how i should properly reuse that question list
view?
--
Ticket URL: <https://code.djangoproject.com/ticket/28995>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* component: Uncategorized => contrib.admin
* ui_ux: 0 => 1
* type: Uncategorized => New feature
--
Ticket URL: <https://code.djangoproject.com/ticket/28995#comment:1>
* status: new => closed
* resolution: => wontfix
Comment:
[https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.raw_id_fields
ModelAdmin.raw_id_fields] allows using the list view to select items. I
don't think we should further complicate the standard select by adding the
"Open select dialog" button proposed in the screenshot. You can write a
custom widget for that if you want that, but this isn't the place to get
answers about how to implement it. See
TicketClosingReasons/UseSupportChannels.
--
Ticket URL: <https://code.djangoproject.com/ticket/28995#comment:2>