Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make miscellaneous improvements to the API developer experience #4387

Merged
merged 7 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/api/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@

class ApiConfig(AppConfig):
name = "api"
verbose_name = "API"
default_auto_field = "django.db.models.AutoField"
58 changes: 58 additions & 0 deletions api/api/migrations/0064_define_verbose_names.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Generated by Django 4.2.11 on 2024-05-26 11:05

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('api', '0063_merge_20240521_0843'),
]

operations = [
migrations.AlterField(
model_name='audio',
name='creator_url',
field=models.TextField(blank=True, help_text='A direct link to the media creator.', max_length=2000, null=True, verbose_name='creator URL'),
),
migrations.AlterField(
model_name='audio',
name='foreign_landing_url',
field=models.TextField(blank=True, help_text='The landing page of the work.', null=True, verbose_name='foreign landing URL'),
),
migrations.AlterField(
model_name='audio',
name='url',
field=models.TextField(blank=True, help_text='The actual URL to the media file.', max_length=1000, null=True, unique=True, verbose_name='URL'),
),
migrations.AlterField(
model_name='audioset',
name='creator_url',
field=models.TextField(blank=True, help_text='A direct link to the media creator.', max_length=2000, null=True, verbose_name='creator URL'),
),
migrations.AlterField(
model_name='audioset',
name='foreign_landing_url',
field=models.TextField(blank=True, help_text='The landing page of the work.', null=True, verbose_name='foreign landing URL'),
),
migrations.AlterField(
model_name='audioset',
name='url',
field=models.TextField(blank=True, help_text='The actual URL to the media file.', max_length=1000, null=True, unique=True, verbose_name='URL'),
),
migrations.AlterField(
model_name='image',
name='creator_url',
field=models.TextField(blank=True, help_text='A direct link to the media creator.', max_length=2000, null=True, verbose_name='creator URL'),
),
migrations.AlterField(
model_name='image',
name='foreign_landing_url',
field=models.TextField(blank=True, help_text='The landing page of the work.', null=True, verbose_name='foreign landing URL'),
),
migrations.AlterField(
model_name='image',
name='url',
field=models.TextField(blank=True, help_text='The actual URL to the media file.', max_length=1000, null=True, unique=True, verbose_name='URL'),
),
]
5 changes: 4 additions & 1 deletion api/api/models/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class MediaMixin(models.Model):
foreign_landing_url = models.TextField(
blank=True,
null=True,
verbose_name="foreign landing URL",
help_text="The landing page of the work.",
)

Expand All @@ -82,6 +83,7 @@ class MediaMixin(models.Model):
max_length=2000,
blank=True,
null=True,
verbose_name="creator URL",
help_text="A direct link to the media creator.",
)

Expand Down Expand Up @@ -123,9 +125,10 @@ class FileMixin(models.Model):
url = models.TextField(
unique=True,
max_length=1000,
help_text="The actual URL to the media file.",
blank=True,
null=True,
verbose_name="URL",
help_text="The actual URL to the media file.",
)
filesize = models.IntegerField(
blank=True,
Expand Down
2 changes: 1 addition & 1 deletion api/latest_migrations/api
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# If you have a merge conflict in this file, it means you need to run:
# manage.py makemigrations --merge
# in order to resolve the conflict between migrations.
0063_merge_20240521_0843
0064_define_verbose_names
2 changes: 2 additions & 0 deletions api/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
".", # default, API directory
"../packages/python/",
],
# Also reload Uvicorn when templates change.
reload_includes=["*.py", "*.html"],
dhruvkb marked this conversation as resolved.
Show resolved Hide resolved
log_level="debug",
access_log=False,
)
Loading