Fixed #11: Upgraded to django 1.11
This commit is contained in:
parent
37ebde38ee
commit
4cb2f53db3
7 changed files with 17 additions and 18 deletions
|
|
@ -2,6 +2,8 @@ from rest_framework import routers
|
|||
from django.conf.urls import include, url
|
||||
from funkwhale_api.music import views
|
||||
from funkwhale_api.playlists import views as playlists_views
|
||||
from rest_framework_jwt import views as jwt_views
|
||||
|
||||
|
||||
router = routers.SimpleRouter()
|
||||
router.register(r'tags', views.TagViewSet, 'tags')
|
||||
|
|
@ -21,6 +23,6 @@ urlpatterns += [
|
|||
url(r'^radios/', include('funkwhale_api.radios.urls', namespace='radios')),
|
||||
url(r'^history/', include('funkwhale_api.history.urls', namespace='history')),
|
||||
url(r'^users/', include('funkwhale_api.users.api_urls', namespace='users')),
|
||||
url(r'^token/', 'rest_framework_jwt.views.obtain_jwt_token'),
|
||||
url(r'^token/refresh/', 'rest_framework_jwt.views.refresh_jwt_token'),
|
||||
url(r'^token/', jwt_views.obtain_jwt_token),
|
||||
url(r'^token/refresh/', jwt_views.refresh_jwt_token),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -121,13 +121,14 @@ class TrackViewSet(TagViewSetMixin, SearchMixin, viewsets.ReadOnlyModelViewSet):
|
|||
|
||||
|
||||
class TagViewSet(viewsets.ReadOnlyModelViewSet):
|
||||
queryset = Tag.objects.all()
|
||||
queryset = Tag.objects.all().order_by('name')
|
||||
serializer_class = serializers.TagSerializer
|
||||
permission_classes = [ConditionalAuthentication]
|
||||
|
||||
|
||||
class Search(views.APIView):
|
||||
max_results = 3
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
query = request.GET['query']
|
||||
results = {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# Bleeding edge Django
|
||||
django==1.8.7
|
||||
django==1.11
|
||||
|
||||
# Configuration
|
||||
django-environ==0.4.0
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
-r base.txt
|
||||
coverage==4.0.3
|
||||
django_coverage_plugin==1.1
|
||||
Sphinx
|
||||
Sphinx==1.6.2
|
||||
django-extensions==1.5.9
|
||||
Werkzeug==0.11.2
|
||||
django-test-plus==1.0.11
|
||||
factory_boy==2.6.0
|
||||
factory_boy>=2.8.1
|
||||
|
||||
# django-debug-toolbar that works with Django 1.5+
|
||||
django-debug-toolbar>=1.5,<1.6
|
||||
|
|
|
|||
|
|
@ -1,12 +1,7 @@
|
|||
# Test dependencies go here.
|
||||
-r base.txt
|
||||
-r local.txt
|
||||
|
||||
|
||||
|
||||
coverage==4.0.3
|
||||
django_coverage_plugin==1.1
|
||||
flake8==2.5.0
|
||||
django-test-plus==1.0.11
|
||||
factory_boy>=2.8.1
|
||||
model_mommy
|
||||
tox
|
||||
model-mommy==1.3.2
|
||||
tox==2.7.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue