Contact 聯絡
+Contact
{% endif %} diff --git a/app/templates/film.html b/app/templates/film.html old mode 100755 new mode 100644 index b048b5a..56f3b29 --- a/app/templates/film.html +++ b/app/templates/film.html @@ -1,25 +1,22 @@ {% extends "base.html" %} {% block head %} - + - - - - {% endblock head %} {% block body_class%}animated{% endblock %} {% block main %} +{% comment %} +{% endcomment %}Related Assemblies 相關選集
+Related Assemblies
{% for text in film.related_texts %}- {{ film.data.title | safe }} - {{ film.data.title_zh | safe }} -
-- {% for director in film.data.director %} - {{ director|safe }} - {% endfor %} -
+ + +Phantasmapolis
-Looking back to the future
-
未至之城
-回望未來
- -2021亞洲藝術雙年展
-2021.10.30 - 2022.3.6
- - -21 films on subjects from animism to zoology
- - -回望未來
- -
-31 sequences of commentary on clips within or across film
- - -回望未來
- -
-phantas.ma/polis is a ...
- - -回望未來
-
Phantasmapolis
-Looking back to the future
- -未至之城
-回望未來
- -
Asian Art Biennale 2021
-2021亞洲藝術雙年展
-2021.10.30 - 2022.3.6
+
njp.ma
+{{ films }} films on Asian futures, past and present
-{{ films }}部關於亞洲未來、過去與現在的影片
+
- -{{ texts }} video essays within or across films
-{{ texts}}篇影像隨筆與解析
+
- +{{ text.title | safe }}
-{{ text.byline|striptags }}
-{{ text.title | safe }}
-{{ text.byline|striptags }}
-{{ text.title | safe }}
+{{ text.byline|striptags }}
', 1) - elif key == 'sourcedescription': - if '
' in value: - f.data['bio'], f.data['bio_zh'] = value.split('
', 1) - else: - f.data['bio'] = f.data['bio_zh'] = value - elif key != 'id': + if key != 'url': f.data[{ }.get(key, key)] = value if c: f.public = True - f.slug = item['id'] + f.slug = escape_slug(item['title']) f.save() diff --git a/app/video/migrations/0001_initial.py b/app/video/migrations/0001_initial.py index 4a9db4e..8e1f0f2 100644 --- a/app/video/migrations/0001_initial.py +++ b/app/video/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.7 on 2021-09-28 12:09 +# Generated by Django 3.2.9 on 2021-11-12 09:35 from django.db import migrations, models @@ -11,20 +11,6 @@ class Migration(migrations.Migration): ] operations = [ - migrations.CreateModel( - name='Edit', - fields=[ - ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('created', models.DateTimeField(auto_now_add=True)), - ('modified', models.DateTimeField(auto_now=True)), - ('slug', models.SlugField()), - ('public', models.BooleanField(default=False)), - ('padma_id', models.CharField(max_length=1024)), - ('annotation_user', models.CharField(max_length=1024)), - ('vimeo_id', models.CharField(default=None, max_length=255, null=True)), - ('data', models.JSONField(default=dict)), - ], - ), migrations.CreateModel( name='Film', fields=[ @@ -33,9 +19,9 @@ class Migration(migrations.Migration): ('modified', models.DateTimeField(auto_now=True)), ('slug', models.SlugField()), ('public', models.BooleanField(default=False)), - ('padma_id', models.CharField(max_length=255)), - ('vimeo_id', models.CharField(default=None, max_length=255, null=True)), - ('data', models.JSONField(default=dict)), + ('position', models.IntegerField(default=0)), + ('pandora_url', models.CharField(max_length=1024)), + ('data', models.JSONField(blank=True, default=dict)), ], ), ] diff --git a/app/video/migrations/0002_auto_20210930_1527.py b/app/video/migrations/0002_auto_20210930_1527.py deleted file mode 100644 index 18e2ac9..0000000 --- a/app/video/migrations/0002_auto_20210930_1527.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 3.2.7 on 2021-09-30 15:27 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('video', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='edit', - name='data', - field=models.JSONField(blank=True, default=dict), - ), - migrations.AlterField( - model_name='film', - name='data', - field=models.JSONField(blank=True, default=dict), - ), - ] diff --git a/app/video/migrations/0003_film_position.py b/app/video/migrations/0003_film_position.py deleted file mode 100644 index 80c888e..0000000 --- a/app/video/migrations/0003_film_position.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.2.7 on 2021-10-11 12:47 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('video', '0002_auto_20210930_1527'), - ] - - operations = [ - migrations.AddField( - model_name='film', - name='position', - field=models.IntegerField(default=0), - ), - ] diff --git a/app/video/migrations/0004_alter_film_vimeo_id.py b/app/video/migrations/0004_alter_film_vimeo_id.py deleted file mode 100644 index 4a31b00..0000000 --- a/app/video/migrations/0004_alter_film_vimeo_id.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.2.7 on 2021-10-23 09:46 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('video', '0003_film_position'), - ] - - operations = [ - migrations.AlterField( - model_name='film', - name='vimeo_id', - field=models.CharField(blank=True, null=True, default=None, max_length=255), - ), - ] diff --git a/app/video/models.py b/app/video/models.py index eb14b58..322237c 100644 --- a/app/video/models.py +++ b/app/video/models.py @@ -20,8 +20,7 @@ class Film(models.Model): public = models.BooleanField(default=False) position = models.IntegerField(default=0) - padma_id = models.CharField(max_length=255) - vimeo_id = models.CharField(max_length=255, default=None, blank=True, null=True) + pandora_url = models.CharField(max_length=1024) data = models.JSONField(default=dict, blank=True) @@ -33,7 +32,9 @@ class Film(models.Model): def related_texts(self): from ..text.models import Text - return Text.objects.filter(Q(data__item=self.padma_id) | Q(data__related=self.padma_id)) + folder = self.data.get('title') + if folder: + return Text.objects.filter(Q(data__folder=folder) | Q(data__related=folder)) def duration(self): return ox.format_duration(self.data['duration'] * 1000, verbosity=1, milliseconds=False) @@ -68,23 +69,8 @@ class Film(models.Model): def json(self): data = {} - data['id'] = self.padma_id + data['url'] = self.pandora_url #data.update(self.data) return json.dumps(data) -class Edit(models.Model): - created = models.DateTimeField(auto_now_add=True) - modified = models.DateTimeField(auto_now=True) - - slug = models.SlugField() - public = models.BooleanField(default=False) - - padma_id = models.CharField(max_length=1024) - annotation_user = models.CharField(max_length=1024) - vimeo_id = models.CharField(max_length=255, default=None, null=True) - - data = models.JSONField(default=dict, blank=True) - - def __str__(self): - return self.data.get('title', self.slug)