Examples

In this example, we’ll create a Youtube Snippet object and a component that we’ll use to render a Youtube Video

1. Create a snippets app: In your terminal use the django command for creating apps to scaffold a new django app by running

  1. Create a Youtube Snippet model to store the Youtube videos

3. Add your model to the admin: Assuming you added dj_palette.palette_admin to INSTALLED_APPS,

and have configured your project to use the Palette Admin dashboard, you’ll need to use palette_admin site to register your models.

  1. Make migrations

  1. Now create template file for your component in your snippets app i.e snippets/templates/snippets/components/cards.html