Skip to content

Commit e50c63e

Browse files
authored
Merge pull request #17 from georgy-komarov/fix-hardcoded-url
Use reverse_lazy instead of hardcoded URL for image upload
2 parents 54b30ae + 48d42da commit e50c63e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

django_editorjs_fields/config.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from secrets import token_urlsafe
22

33
from django.conf import settings
4+
from django.urls import reverse_lazy
45

56
DEBUG = getattr(settings, "DEBUG", False)
67

@@ -44,7 +45,7 @@
4445
'Image': {
4546
'class': 'ImageTool',
4647
'inlineToolbar': True,
47-
"config": {"endpoints": {"byFile": "/editorjs/image_upload/"}},
48+
"config": {"endpoints": {"byFile": reverse_lazy('editorjs_image_upload')}},
4849
},
4950
'Header': {
5051
'class': 'Header',

0 commit comments

Comments
 (0)