2
0

use_custom_image_model.rst 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. Using a Custom Image Model in Wagtail CRX
  2. =========================================
  3. .. versionadded:: 0.19
  4. Added support for custom image models. You must be on Wagtail CRX version
  5. 0.19 or higher in order to follow this guide.
  6. Using a custom image model is a very similar process to using a custom user
  7. model in Django --- it is easy to do when starting a new project but extremely
  8. difficult to do mid-project. This guide will cover starting a **new** project
  9. using a custom image model. To switch to a custom image model mid-project,
  10. see :doc:`convert_image_model`.
  11. Before starting this guide, it is important that you are starting with a fresh
  12. empty database and have **never run wagtailcrx migrations!**
  13. .. include:: _custom_image1.rst
  14. .. include:: _custom_image2.rst
  15. .. include:: _custom_image3.rst
  16. Step 4: Migrate Wagtail CRX
  17. ---------------------------
  18. Now you may run **all** migrations which will properly wire everything up to
  19. use your custom image model.
  20. .. code-block:: console
  21. $ python manage.py migrate