Mediamosa plugin for django-tinymce
This django application will add a mediamosa plugin to your tinymce editor.
Installing
Install django-mediamosa-tinymce using pip.
Configure django-mediamosa first. In settings.py of your project:
MEDIAMOSA_URL = 'http://api-mediamosa.example.com'
MEDIAMOSA_USERNAME = 'mediamosa-user'
MEDIAMOSA_PASSWORD = 'mediamosa-password'
Add mediamosa_tinymce to INSTALLED_APPS in settings.py for your project:
INSTALLED_APPS = (
...
'mediamosa_tinymce',
...
)
Update your TinyMce configuration so it will load the new plugin and shows a mediamosa button:
TINYMCE_DEFAULT_CONFIG = {
...
'plugins': "table,spellchecker,paste,searchreplace,mediamosa",
...
'theme_advanced_buttons3_add': 'mediamosa'
}
Add the mediamosa_tinymce.urls to urls.py for your project:
urlpatterns = patterns('',
...
url(r'^mediamosa/tinymce', include('mediamosa_tinymce.urls')),
...
)
Run the django collectstatic command to copy the mediamosa plugin for tinymce to your statics directory.
python ./manage.py collectstatic
Usage
Enabling Mediamosa plugin
In order for the tinymce mediamosa to call the correct url’s, you need to set the ModelAdmin’s change_form template file:
class MyModelAdmin(admin.ModelAdmin):
...
change_form_template = 'admin/mediamosa_tinymce_change_form.html'
...
This will load the correct url’s to query in the plugin’s javascript.
Playing an inserted mediafile
When you now output the model attribute containing the mediamosa entry you just inserted, you can initialize it by adding the following code to your template.
<script type="text/javascript">
var mediamosaPlayerURI = "{% url mediafile-play %}";
</script>
<script type="text/javascript" src="{{ STATIC_URL }}js/mediamosa-player.js"></script>
This will initialize the URI the ajax call should connect to and launch the code that will replace the still with the actual video.
Metadata
Release files for django-mediamosa-tinymce 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-mediamosa-tinymce-0.1.3.tar.gz | 12.9 kB | Without provenance | Details for django-mediamosa-tinymce-0.1.3.tar.gz |
Release files / django-mediamosa-tinymce-0.1.3.tar.gz
| Download URL | django-mediamosa-tinymce-0.1.3.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf9bce3a8d03bd3dde7442417217a07eaf42505cdc779524d7a8ad51cd97c87f
|
|
BLAKE2b-256 checksum How to use checksums |
c927623184ad9b5b772a929c40449b47a6519bd90a83bdf8c1ee94c31af16aff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-mediamosa-tinymce 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.