I'm trying to integrate this project into mine, but I can't get it to work. I've spent a few hours reading the documentation and I'm at a loss. I can only get html to show up on my pages. This is from my admin:
My files:
home.py:
<imports>
from galleryfield.fields import GalleryField
class Home(BaseModel):
images = GalleryField(blank=True, null=True)
<other fields>
admin.py:
<imports>
class HomeAdminForm(GalleryFormMediaMixin, forms.ModelForm):
class Meta:
model = Home
exclude = ()
class HomeAdmin(GISModelAdmin): //doesn't work with normal admin either
form = HomeAdminForm
admin.site.register(Home, HomeAdmin)
admin.site.register(BuiltInGalleryImage)
settings.py
MEDIA_URL = "media/"
MEDIA_ROOT = BASE_DIR / "media/"
DJANGO_GALLERY_FIELD_CONFIG = {
# You may change the value to 4 or 5 to see the results
"bootstrap_version": 5, //doesn't work with 3, 4, or 5
}
My home form is also not working, it displays more or less the same as my admin:
class HomeForm(forms.ModelForm):
class Meta:
model = Home
fields = [
"images",
<...>
]
widgets = {
"images": GalleryWidget, //I've tried with and without
}
Hi!
I'm trying to integrate this project into mine, but I can't get it to work. I've spent a few hours reading the documentation and I'm at a loss. I can only get html to show up on my pages. This is from my admin:
My files:
home.py:
admin.py:
settings.py
My home form is also not working, it displays more or less the same as my admin:
In my html I just added:
My html header contains, in this order:
I'll also note that pip freeze contains
django-galleryfield==2.2.0
Would appreciate any help, I've