Mandel application framework
============================

This package is the main Django app which implements the Mandel application
framework.
It automatically finds and configures the Ocyan plugins in the ocyan.plugins
namespace.

Depency management is done using Poetry (https://poetry.eustace.io/).

Management commands
-------------------
This plugin contains some genric management commands useful for cleaning up
data after importing and such

1. `cleanup_richtext` Clean up all <font> and style= and things that mess up the styling from rich text fields.
2. `export` Export the database and all images
3. `fix_png_matte` change the background color of png images that where imported and turn out bad.
4. `fixcataloguemigrations` This command is nolonger useful
5. `flushall` Use this command to delete every single thing in the database, even the south migrations
6. `import_destructive` Destroy the database and replace with a dump from a tar.gz file. Also import media files
7. `secret` Generate a secret key with a management command.
8. `settings` Use this command to output django settings
9. `show_installed_apps` Use this command to view the INSTALLED_APPS segments, displaying how the app overrides are structured.
10. `updatemigrations` Check if there are apps that override something and have missing migrations. Use this before trying make_migrations to fetch upstream added migrations

Templatetags
------------

This plugin also contains some templatetags:
1. `ocyan_thumbnail` template tags used to render images as picture tags
2. `ocyan_main` contains `stripformatting` for removing unwanted html from richtext and `absolute_url` for rendering an url with the domain and http
3. `ocyanjson` contains templatetags for readin values from ocyan.json

Development
-----------
Use the kitchensink (https://git.mandelblog.com/mandel/kitchensink) project.

The Django admin is available by default on /django_admin.
