Fix #109: List pending requests by default, added a status filter for requests
This commit is contained in:
parent
f2d20e1bf7
commit
42a2ffbf24
6 changed files with 44 additions and 7 deletions
|
|
@ -1,10 +1,18 @@
|
|||
import django_filters
|
||||
|
||||
from funkwhale_api.common import fields
|
||||
from . import models
|
||||
|
||||
|
||||
class ImportRequestFilter(django_filters.FilterSet):
|
||||
|
||||
q = fields.SearchFilter(search_fields=[
|
||||
'artist_name',
|
||||
'user__username',
|
||||
'albums',
|
||||
'comment',
|
||||
])
|
||||
|
||||
class Meta:
|
||||
model = models.ImportRequest
|
||||
fields = {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ STATUS_CHOICES = [
|
|||
('closed', 'closed'),
|
||||
]
|
||||
|
||||
|
||||
class ImportRequest(models.Model):
|
||||
creation_date = models.DateTimeField(default=timezone.now)
|
||||
imported_date = models.DateTimeField(null=True, blank=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue