How to use the wagtailvideos.models.get_upload_to function in wagtailvideos

To help you get started, we’ve selected a few wagtailvideos examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github neon-jungle / wagtailvideos / wagtailvideos / migrations / 0003_auto_20160705_1646.py View on Github external
class Migration(migrations.Migration):

    dependencies = [
        ('wagtailvideos', '0002_auto_20160321_1610'),
    ]

    operations = [
        migrations.CreateModel(
            name='VideoTranscode',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('media_format', enumchoicefield.fields.EnumChoiceField(enum_class=wagtailvideos.models.MediaFormats, max_length=4)),
                ('processing', models.BooleanField(default=False)),
                ('file', models.FileField(null=True, upload_to=wagtailvideos.models.get_upload_to, verbose_name='file')),
                ('video', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='transcodes', to='wagtailvideos.Video')),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='videotranscode',
            unique_together=set([('video', 'media_format')]),
        ),
github neon-jungle / wagtailvideos / wagtailvideos / migrations / 0006_auto_20160707_1413.py View on Github external
from django.db import migrations, models

import wagtailvideos.models


class Migration(migrations.Migration):

    dependencies = [
        ('wagtailvideos', '0005_videotranscode_error_message'),
    ]

    operations = [
        migrations.AlterField(
            model_name='video',
            name='thumbnail',
            field=models.ImageField(blank=True, null=True, upload_to=wagtailvideos.models.get_upload_to),
        ),
github neon-jungle / wagtailvideos / wagtailvideos / migrations / 0001_initial.py View on Github external
initial = True

    dependencies = [
        ('wagtailcore', '0028_merge'),
        ('taggit', '0002_auto_20150616_2121'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Video',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='title')),
                ('file', models.ImageField(height_field='height', upload_to=wagtailvideos.models.get_upload_to, verbose_name='file', width_field='width')),
                ('created_at', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='created at')),
                ('file_size', models.PositiveIntegerField(editable=False, null=True)),
                ('collection', models.ForeignKey(default=wagtail.core.models.get_root_collection_id, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='wagtailcore.Collection', verbose_name='collection')),
                ('tags', taggit.managers.TaggableManager(blank=True, help_text=None, through='taggit.TaggedItem', to='taggit.Tag', verbose_name='tags')),
                ('uploaded_by_user', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='uploaded by user')),
            ],
            options={
                'abstract': False,
            },
            bases=(models.Model,),
        ),
github neon-jungle / wagtailvideos / wagtailvideos / migrations / 0002_auto_20160321_1610.py View on Github external
dependencies = [
        ('wagtailvideos', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='video',
            name='thumbnail',
            field=models.ImageField(default='', upload_to=''),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='video',
            name='file',
            field=models.FileField(upload_to=wagtailvideos.models.get_upload_to, verbose_name='file'),
        ),
github neon-jungle / wagtailvideos / wagtailvideos / migrations / 0004_auto_20160706_1153.py View on Github external
from django.db import migrations, models

import wagtailvideos.models


class Migration(migrations.Migration):

    dependencies = [
        ('wagtailvideos', '0003_auto_20160705_1646'),
    ]

    operations = [
        migrations.AlterField(
            model_name='videotranscode',
            name='file',
            field=models.FileField(blank=True, null=True, upload_to=wagtailvideos.models.get_upload_to, verbose_name='file'),
        ),