fixing slugs

This commit is contained in:
evilchili
2024-02-02 15:40:45 -08:00
parent 9cdf28502a
commit 32d9c42847
10 changed files with 99 additions and 58 deletions
+3 -3
View File
@@ -1,9 +1,9 @@
<!doctype html>
<html lang="en">
<head>
<title>{{ config['project_name'] }}{% block title %}{% endblock %}</title>
<meta name="og:provider_name" content="{{ config['project_name'] }}">
<link rel='stylesheet' href="{{config['static_url']}}/styles.css" />
<title>{{ c['config']['project_name'] }}{% block title %}{% endblock %}</title>
<meta name="og:provider_name" content="{{ c['config']['project_name'] }}">
<link rel='stylesheet' href="{{c['config']['static_url']}}/styles.css" />
{% block headers %}{% endblock %}
</head>
<body>
+9 -11
View File
@@ -3,19 +3,19 @@
{% block content %}
{{ build_list(all_records) }}
{{ build_list(c) }}
<div style='float:left;'>
<h1>{{ record.name }}</h1>
<h1>{{ c['record'].name }}</h1>
<form name="character_sheet" method="post" novalidate class="form">
{{ form.csrf_token }}
{{ c['form'].csrf_token }}
{% if 'process' in form.errors %}
Error: {{ form.errors['process'] |join(',') }}
{% if 'process' in c['form'].errors %}
Error: {{ c['form'].errors['process'] |join(',') }}
{% endif %}
<ul>
{% for field in form %}
{% for field in c['form'] %}
<li>{{ field.label }}: {{ field }} {{ field.errors|join(',') }}</li>
{% endfor %}
</ul>
@@ -27,9 +27,7 @@
{% block debug %}
<div style='clear:both;display:block;'>
<h2>Debug</h2>
<h3>Record</h3>
<pre>{{ record }}</pre>
<h3>Config</h3>
<pre>{{ config }}</pre>
</div>
<pre>
{{ c }}
</pre>
{% endblock %}
+4 -4
View File
@@ -1,9 +1,9 @@
{% macro build_list(records) %}
{% macro build_list(c) %}
<div style='float:left; min-height: 90%; margin-right:5em;'>
<ul>
<li><a href="/sheet/">Create a Character</a></li>
{% for rec in records %}
<li><a href="/sheet/{{rec['slug']}}/{{rec['name']}}">{{ rec['name'] }}</a></li>
<li><a href="{{c['routes']['sheet']}}">Create a Character</a></li>
{% for rec in c['all_records'] %}
<li><a href="{{c['routes']['sheet']}}/{{rec['uri']}}">{{ rec['uri'] }}</a></li>
{% endfor %}
</ul>
</div>