Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
1acbd07113
@ -53,13 +53,15 @@ class FileTests(TestCase):
|
||||
})
|
||||
|
||||
data = response.json()
|
||||
|
||||
self.assertIsInstance(data['id'], int)
|
||||
self.assertEqual(data['is_valid'], True)
|
||||
|
||||
response = self.client.post(reverse('files:delete', kwargs={
|
||||
'pk': data['id']
|
||||
}))
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
data = response.json()
|
||||
|
||||
self.assertEqual(data['success'], True)
|
||||
|
@ -18,7 +18,8 @@ class FileUploadView(LoginRequiredMixin, FormView):
|
||||
self.object.save()
|
||||
|
||||
return JsonResponse({
|
||||
'is_valid': True, 'url': self.object.file.url,
|
||||
'is_valid': True,
|
||||
'url': self.object.file.url,
|
||||
'name': self.object.file.name,
|
||||
'id': self.object.pk
|
||||
})
|
||||
|
@ -194,7 +194,10 @@ LOCALE_PATHS = [
|
||||
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
|
||||
|
||||
AWS_S3_ENDPOINT_URL = "https://ojuso-media.nyc3.digitaloceanspaces.com"
|
||||
AWS_STORAGE_BUCKET_NAME = "ojuso-media"
|
||||
if DEBUG:
|
||||
AWS_STORAGE_BUCKET_NAME = "debug-test"
|
||||
else:
|
||||
AWS_STORAGE_BUCKET_NAME = "ojuso-media"
|
||||
AWS_LOCATION = ""
|
||||
AWS_S3_REGION_NAME = "nyc3"
|
||||
AWS_S3_CUSTOM_DOMAIN = "ojuso-media.nyc3.digitaloceanspaces.com/ojuso-media"
|
||||
|
Loading…
Reference in New Issue
Block a user