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

Documentation for installing JavaScript package #8

Open
kaedroho opened this issue Nov 28, 2021 · 3 comments
Open

Documentation for installing JavaScript package #8

kaedroho opened this issue Nov 28, 2021 · 3 comments

Comments

@kaedroho
Copy link

The tutorial seems to assume that you already have the JS library installed since it references window.telepath but it doesn't provide any instructions on how to use the package on the frontend.

@gasman
Copy link
Contributor

gasman commented Nov 28, 2021

The JS library is bundled in the Python package and included on the page as part of the {{ media }} declaration, if I'm not mistaken.

@kaedroho
Copy link
Author

Oh, I see! I'm just building it into a React project so I've added the telepath-unpack library directly to our frontend, I assume this isn't a supported use case at the moment? (happy to help make it supported)

@gasman
Copy link
Contributor

gasman commented Nov 30, 2021

It's semi-supported, in the sense of "you can do this, but you'll have to figure out the details based on the reference docs". A how-to page on that subject would be welcome!

I guess a typical non-Django-served app will have all the relevant .js files containing the telepath definitions as part of a fixed webpack bundle (assuming it doesn't need to be extensible in the way the Wagtail admin is), so it won't make use of the mechanism where Django passes a media declaration.

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

No branches or pull requests

2 participants