So I’m within the course of of making a backend for my web site and I’ve an issue. It executes such code in POST technique:
class SettingsLogs(MethodView):
async def publish(self, server_id: int):
token = session.get("token")
if not token:
return redirect(self.register_url)
ipc_server = ipc.Shopper(secret_key="doggo")
standing = request.kind.get('logs-checkbox') # this usually works
if not standing:
return "take a look at"
channel_id = request.kind.get('channels')
joins = request.kind.get('joins_checkbox')
print(joins) # that is the issue
i’ve downside with joins = request.kind.get('joins_checkbox')
It all the time returns None to me regardless of if the checkbox is enabled or not. Curiously above performs one thing comparable on one other checkbox and that one works usually. Html code under:
html the place the issue is
<div class="check-box">
{% if settings_joins == true %}
<enter kind="checkbox" identify="joins_checkbox" checked>
{% else %}
<enter kind="checkbox" identify="joins_checkbox">
{% endif %}
<p class="checkbox-title">Wyłącz / Włącz</p>
</div>
html through which every thing works usually
<div class="check-box">
{% if standing == true %}
<enter kind="checkbox" identify="logs-checkbox" checked>
{% else %}
<enter kind="checkbox" identify="logs-checkbox">
{% endif %}
<p class="checkbox-title">Wyłącz / Włącz</p>
</div>
I attempted altering the identify attribute however it does not change something. Pls assist xD