Django Kaleidos Videos
Django Kaleidos Videos is a django application for add videos (from services like youtube or vimeo) to any model.
Suported video services
Youtube
Vimeo
Configuration
Configure the app in your setting INSTALLED_APPS:
INSTALLED_APPS = [ ... kvideos, ... ]
Configure, if you want, the default video size in your settings.py:
KVIDEOS_DEFAULT_SIZE = "640x480"
For easy access to the videos, add to your models a generic relation to kvideos.models.Video model, for example:
from kvideos.models import Video
from django.contrib.contenttypes.generic import GenericRelation
class MyModel(models.Model):
... # my fields
videos = GenericRelation(Video)
For integrate it with the admin panel, you can add a new inline to your models admin classes, for example:
from django.contrib.contenttypes.generic import GenericTabularInline
from kvideos.models import Video
class VideoInline(GenericTabularInline):
model = Video
class MyModelAdmin(admin.ModelAdmin):
model = models.MyModel
inlines = [MyOtherInlines, ..., VideoInline]
Usage
Now you can add videos to any of your models, and can show this on your web page througth the embed_video template tag, for example:
<div>
{% for video in myobject.videos.all %}
{% if forloop.first %}
{{ video.title }}
{% embed_video video 800x600 %} <!-- Big video first -->
{{ video.description }}
{% else %}
{{ video.title }}
{% embed_video video %} <!-- Default size videos -->
{% endif %}
{% endfor %}
</div>
Metadata
Release files for django-kvideos 0.0.1
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-kvideos-0.0.1.tar.gz | 4.7 kB | Without provenance | Details for django-kvideos-0.0.1.tar.gz |
Release files / django-kvideos-0.0.1.tar.gz
| Download URL | django-kvideos-0.0.1.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d72ed928ce771a80321b5fc640e2049aeb08ceb211ef9643a18a1f91aedb40e
|
|
BLAKE2b-256 checksum How to use checksums |
41bf1444f49da97bbed33a03c2cf6a348b7da379d9691ba7d717c606a3250a02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-kvideos 0.0.1
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.