Tumult Hype with import to Django Python

Build in Tumult all Static Files with animations and build interactive input secured forms within PyCharm for Django Python.

Believe all Hype code output must go to single static file for Django and Python within a virtual machine.

Thoughts

That does seem like the right way to go since Tumult Hype's export loads all information from static files. Is this a suggestion for others or were you hitting an issue with Django?

I believe there are two issues:

  1. PyCharm and Tumult need to investigate an automated linkage between the two frameworks,

  2. In lieu of #1., provide detailed and specific guidance in both user manuals, on how to integrate the two frameworks.

Hype's content is just HTML, and so generally should be considered static content like anything else.

If you want to include a Hype animation into a template file, and it will not have any changes based on server-side data, then you can copy the three lines of code into your HTML and change the *_hype_generated_script.js path to the static path, like:

<div id="index_hype_container" class="HYPE_document" style="margin:auto;position:relative;width:600px;height:400px;overflow:hidden;">
		<script type="text/javascript" charset="utf-8" src="/static/path/to/filename.hyperesources/filename_hype_generated_script.js?39967"></script>
	</div>

You'll note that this is pretty minimal code since Hype's actual HTML code is quite small. It calls that JavaScript which client-side will create a DOM and run animations.

Thus if your Hype animation will change based on data from your server-side code, the way to typically incorporate this would be to either use a template or ajax call to produce JavaScript objects, which can then be interpreted by JavaScript code inside the Hype animation. This setup is usually done in the On Scene Load or On Prepare For Display event.