BO 1.35 webhook
This commit is contained in:
parent
eb0ffc1171
commit
636d505564
@ -1,7 +1,7 @@
|
||||
import os
|
||||
from firebase_admin import initialize_app
|
||||
|
||||
BACKOFFICE_VERSION = "1.34"
|
||||
BACKOFFICE_VERSION = "1.35"
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
@ -1,7 +1,7 @@
|
||||
import os
|
||||
from firebase_admin import initialize_app
|
||||
|
||||
BACKOFFICE_VERSION = "1.34"
|
||||
BACKOFFICE_VERSION = "1.35"
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
@ -1,7 +1,7 @@
|
||||
import os
|
||||
from firebase_admin import initialize_app
|
||||
|
||||
BACKOFFICE_VERSION = "1.34"
|
||||
BACKOFFICE_VERSION = "1.35"
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
@ -20,11 +20,13 @@ from django.conf import settings #
|
||||
from django.conf.urls.static import static # n
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
from aitrainer_backoffice.views import webhook
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path(r'ckeditor', include('ckeditor_uploader.urls')),
|
||||
path('webhook', webhook),
|
||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
||||
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||
|
@ -0,0 +1,8 @@
|
||||
from django.http import HttpResponse
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
|
||||
@csrf_exempt
|
||||
def webhook(request):
|
||||
if request.method == 'POST':
|
||||
print("Data received from Webhook is: ", request.body)
|
||||
return HttpResponse("Webhook received!")
|
Loading…
Reference in New Issue
Block a user