-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Define `StreamArchiveURL` model and create migration * Register `StreamArchiveURL` admin and add inline to Stream admin * Add stream archive URLs as nested serializer on `StreamSerializer` * Set fk related name to `archive_urls` * Make archive urls nested serializer writable on `StreamSerializer` * Make `archive_urls` not required on serializer * Test partial update (PATCH) on Stream, to update `archive_urls` of a Stream Closes #20
- Loading branch information
Showing
5 changed files
with
102 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Generated by Django 3.1.13 on 2022-05-30 20:28 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('events', '0018_eventsupporturl'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='StreamArchiveURL', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('url', models.URLField()), | ||
('name', models.CharField(blank=True, max_length=255)), | ||
('stream', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='archive_urls', to='events.stream')), | ||
], | ||
options={ | ||
'unique_together': {('stream', 'url')}, | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters