Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Merge branch 'main' into set_name
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvkb authored Jul 8, 2021
2 parents a3080da + dbe75fa commit 90cab8f
Show file tree
Hide file tree
Showing 7 changed files with 242 additions and 243 deletions.
214 changes: 101 additions & 113 deletions analytics/Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion openverse-api/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ wsgi-basic-auth = "*"
grequests = "*"
requests-oauthlib = "*"
aws-requests-auth = "*"
Django = "==2.2.24"
Django = "==3.2.5"
Pillow = "*"
django-cors-headers = "*"
django-uuslug = "*"
Expand Down
252 changes: 131 additions & 121 deletions openverse-api/Pipfile.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion openverse-api/catalog/api/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@


class ApiConfig(AppConfig):
name = 'api'
name = 'catalog.api'
default_auto_field = 'django.db.models.AutoField'
4 changes: 2 additions & 2 deletions openverse-api/catalog/api/models/audio.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.contrib.postgres.fields import JSONField, ArrayField
from django.contrib.postgres.fields import ArrayField
from django.db import models
from uuslug import uuslug

Expand Down Expand Up @@ -103,7 +103,7 @@ class Audio(AbstractMedia):
help_text='Number in hertz, eg. 44100.',
)

alt_files = JSONField(
alt_files = models.JSONField(
blank=True,
null=True,
help_text='JSON describing alternative files for this audio.',
Expand Down
8 changes: 4 additions & 4 deletions openverse-api/catalog/api/models/media.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.contrib.postgres.fields import JSONField, ArrayField
from django.contrib.postgres.fields import ArrayField
from django.db import models
from django.utils.html import format_html

Expand Down Expand Up @@ -27,7 +27,7 @@ class AbstractMedia(IdentifierMixin, MediaMixin, FileMixin, OpenLedgerModel):
information common to all media types indexed by Openverse.
"""

watermarked = models.NullBooleanField(blank=True, null=True)
watermarked = models.BooleanField(blank=True, null=True)

license = models.CharField(max_length=50)
license_version = models.CharField(max_length=25, blank=True, null=True)
Expand Down Expand Up @@ -56,14 +56,14 @@ class AbstractMedia(IdentifierMixin, MediaMixin, FileMixin, OpenLedgerModel):

view_count = models.IntegerField(default=0)

tags = JSONField(blank=True, null=True)
tags = models.JSONField(blank=True, null=True)
tags_list = ArrayField(
models.CharField(max_length=255),
blank=True,
null=True
)

meta_data = JSONField(blank=True, null=True)
meta_data = models.JSONField(blank=True, null=True)

@property
def license_url(self):
Expand Down
2 changes: 1 addition & 1 deletion openverse-api/catalog/api/serializers/link_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def save(self):
last_url = str(
ShortenedLink
.objects
.latest(field_name='created_on')
.latest('created_on')
.shortened_path
)
except ShortenedLink.DoesNotExist:
Expand Down

0 comments on commit 90cab8f

Please sign in to comment.