Couple of little fixes
This commit is contained in:
@@ -141,7 +141,7 @@ class CollectionListView(ListView):
|
||||
paginate_by = 20
|
||||
|
||||
def get_queryset(self):
|
||||
collections = models.Collection.objects.all()
|
||||
collections = models.Collection.objects.order_by('name')
|
||||
|
||||
if self.request.user.is_anonymous:
|
||||
return models.Collection.objects.none()
|
||||
|
||||
@@ -83,7 +83,7 @@ class SectionSerializer(serializers.ModelSerializer):
|
||||
|
||||
class DocumentSerializer(serializers.ModelSerializer):
|
||||
|
||||
upload = serializers.CharField()
|
||||
upload = serializers.URLField()
|
||||
sections = SectionSerializer(many=True)
|
||||
|
||||
#def to_internal_value(self, data):
|
||||
|
||||
Reference in New Issue
Block a user