Skip to content

Custom plugin persist to database #3523

Answered by wolflu05
wolflu05 asked this question in Q&A
Discussion options

You must be logged in to vote

I think I found the AppMixin which is suitable for custom models. I took a look at @matmair 's plugins (ShopifyIntegrationPlugin and inventree-zapier). One tricky part is the NAME must be equal to the folder in which the main module lives and not the filename, otherwise we get an missing AppConfig mixin error from Django.

But I still have one question left

How do migrations work? I created a folder migrations like its in the ShopifyPlugin, but if I invoke migrate the migrations won't be applied. You can take a look at my current files at my repo.

EDIT

see #3549 for reference

Replies: 1 comment 6 replies

Comment options

wolflu05
Aug 12, 2022
Collaborator Author

You must be logged in to vote
6 replies
@wolflu05
Comment options

wolflu05 Aug 13, 2022
Collaborator Author

@matmair
Comment options

@matmair
Comment options

@wolflu05
Comment options

wolflu05 Aug 13, 2022
Collaborator Author

@wolflu05
Comment options

wolflu05 Aug 14, 2022
Collaborator Author

Answer selected by wolflu05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants