You can extend imagestore by customizing Image and Album classes
as well as forms for their creation. Basic abstract classes that
require to extend exists in
After you create your classes, tell imagestore to use them by setting next settings:
You should set model-related settings to
app_label.model_name string. For example:
IMAGESTORE_IMAGE_MODEL = 'mystoreapp.MyImage' IMAGESTORE_ALBUM_MODEL = 'mystoreapp.MyAlbum'
You should set form-related settings as string with python path to required class. For example:
IMAGESTORE_IMAGE_FORM = 'mystoreapp.forms.MyImageForm' IMAGESTORE_ALBUM_FORM = 'mystoreapp.forms.MyAlbumForm'
Internally imagestore uses django-swappable-models reusable app. So you can read ther docs to know how to use it correctly.
- It is required to add app_label to your Image and Album models.
- Migrations with swappable models tested only with django migrations. Use it with south with caution.
Migrating from old versions (before 2.9.0)¶
- Before imagestore v.2.9.0 you have to set model-related settings to full python path to model class.
Now it should be in
- As now imagestore uses
django-swappable-modelsapp for swapping
Imagemodels you should use swapper’s methods for importing or referencing to imagestore models. For more info look at django-swappable-models docs