Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proof of Concept: Enhanced native plugin mechanism #639

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cc-a
Copy link
Contributor

@cc-a cc-a commented Nov 20, 2024

This PR accompanies #636 and demonstrates a pattern for extending the existing plugin system to prevent the need to edit core coldfront files. The core idea is that by searching for files in the plugins directory and using entry points for pip installed packages it's possible to automate the discovery and loading of settings and urlpatterns.

To try it out:

Some thoughts:

  • Under the hood this is doing a lot of what djp makes easier to do.
  • I've jumped through certain hoops to make sure the existing plugins still work so some complexity .
  • Things could be made simpler again by dropping support for loading third party plugins from the plugins directory and having developers pip install -e them if necessary.

@cc-a cc-a changed the title Implement native plugin mechanism Proof of Concept: Enhanced native plugin mechanism Nov 20, 2024
@aebruno
Copy link
Member

aebruno commented Dec 10, 2024

I'm probably missing something but this didn't work for me. coldfront showplugins gives me an error:

$ coldfront showplugins
Unknown command: 'showplugins'
Type 'coldfront help' for usage.

@cc-a
Copy link
Contributor Author

cc-a commented Dec 11, 2024

Hey @aebruno. Apologies, showplugins is a djp command. I must have copy pasted it over from #636. I've edited the instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants