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