Browse Source
Enhance Hadis and Transmitters Admin Interfaces with Thumbnail Support
Enhance Hadis and Transmitters Admin Interfaces with Thumbnail Support
- Updated HadisCollectionAdmin and TransmittersAdmin to include a custom display header with thumbnail images. - Modified list_display to show the new display_header method for better visual representation. - Added thumbnail field to HadisCollection and Transmitters models, replacing FilerImageField with ImageField for improved image handling. - Created a migration to alter the thumbnail fields in the database schema.master
5 changed files with 79 additions and 21 deletions
-
25apps/hadis/admin/hadis.py
-
24apps/hadis/admin/transmitter.py
-
32apps/hadis/migrations/0004_alter_hadiscollection_thumbnail_and_more.py
-
10apps/hadis/models/hadis.py
-
9apps/hadis/models/transmitter.py
@ -0,0 +1,32 @@ |
|||||
|
# Generated by Django 4.2.27 on 2026-01-24 10:32 |
||||
|
|
||||
|
from django.db import migrations, models |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
dependencies = [ |
||||
|
("hadis", "0003_booksubjectarea_booktype_hadisstatus_description_and_more"), |
||||
|
] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.AlterField( |
||||
|
model_name="hadiscollection", |
||||
|
name="thumbnail", |
||||
|
field=models.ImageField( |
||||
|
blank=True, |
||||
|
help_text="image allowed", |
||||
|
null=True, |
||||
|
upload_to="hadis/collection_thumbnails/", |
||||
|
), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name="transmitters", |
||||
|
name="thumbnail", |
||||
|
field=models.ImageField( |
||||
|
blank=True, |
||||
|
help_text="image allowed", |
||||
|
null=True, |
||||
|
upload_to="hadis/transmitter_thumbnails/", |
||||
|
), |
||||
|
), |
||||
|
] |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue