Make callbacks go on a new page
This commit is contained in:
parent
361b7b96f0
commit
541894d927
|
@ -42,11 +42,7 @@
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<a href="{% url 'callbacks' type='page' hook_id=item.id %}"><button
|
||||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
|
||||||
hx-get="{% url 'callbacks' type='modal' hook_id=item.id %}"
|
|
||||||
hx-trigger="click"
|
|
||||||
hx-target="#hooks-table"
|
|
||||||
class="button is-success">
|
class="button is-success">
|
||||||
<span class="icon-text">
|
<span class="icon-text">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
|
@ -54,6 +50,7 @@
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -13,7 +13,6 @@ def get_callbacks(hook=None, user=None):
|
||||||
callbacks = Callback.objects.filter(hook__user=user)
|
callbacks = Callback.objects.filter(hook__user=user)
|
||||||
elif hook:
|
elif hook:
|
||||||
callbacks = Callback.objects.filter(hook=hook)
|
callbacks = Callback.objects.filter(hook=hook)
|
||||||
print("CALLBACKS", callbacks)
|
|
||||||
return callbacks
|
return callbacks
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,10 @@ class HookAPI(APIView):
|
||||||
parser_classes = [JSONParser]
|
parser_classes = [JSONParser]
|
||||||
|
|
||||||
def post(self, request, hook_name):
|
def post(self, request, hook_name):
|
||||||
|
try:
|
||||||
hook = Hook.objects.get(name=hook_name)
|
hook = Hook.objects.get(name=hook_name)
|
||||||
print("DATA FREOM POST", request.data)
|
except Hook.DoesNotExist:
|
||||||
|
return HttpResponseBadRequest("Hook does not exist.")
|
||||||
callback = Callback.objects.create(
|
callback = Callback.objects.create(
|
||||||
hook=hook,
|
hook=hook,
|
||||||
data=request.data,
|
data=request.data,
|
||||||
|
|
|
@ -7,7 +7,7 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ${PORTAINER_GIT_DIR}:/code
|
- ${PORTAINER_GIT_DIR}:/code
|
||||||
# - ${PORTAINER_GIT_DIR}/docker/prod/uwsgi.ini:/conf/uwsgi.ini
|
# - ${PORTAINER_GIT_DIR}/docker/prod/uwsgi.ini:/conf/uwsgi.ini
|
||||||
- ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
|
# - ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
|
||||||
- ${APP_DATABASE_FILE}:/code/db.sqlite3
|
- ${APP_DATABASE_FILE}:/code/db.sqlite3
|
||||||
#ports:
|
#ports:
|
||||||
# - "8000:8000" # uwsgi socket
|
# - "8000:8000" # uwsgi socket
|
||||||
|
|
Loading…
Reference in New Issue