fixed bug in entry.title_url
This commit is contained in:
@@ -50,7 +50,7 @@ def get_entries_count_by_topic(request):
|
|||||||
|
|
||||||
def get_last_created(request):
|
def get_last_created(request):
|
||||||
# gest the 10 last created posts
|
# gest the 10 last created posts
|
||||||
query = "SELECT strftime('%d/%m/%Y', created) AS create_date, id, title, author, status FROM entries WHERE topic_id <> '_admin'"
|
query = "SELECT strftime('%d/%m/%Y', created) AS create_date, id, title, author, status, title_url FROM entries WHERE topic_id <> '_admin'"
|
||||||
if request.authenticated_userid == None:
|
if request.authenticated_userid == None:
|
||||||
# if user is anonym, display only published posts
|
# if user is anonym, display only published posts
|
||||||
query = query + " AND status='publié'"
|
query = query + " AND status='publié'"
|
||||||
@@ -61,7 +61,7 @@ def get_last_created(request):
|
|||||||
|
|
||||||
def get_last_edited(request):
|
def get_last_edited(request):
|
||||||
# gest the last edited posts
|
# gest the last edited posts
|
||||||
query = "SELECT strftime('%d/%m/%Y', edited) AS edit_date, id, title, author, status FROM entries WHERE topic_id <> '_admin'"
|
query = "SELECT strftime('%d/%m/%Y', edited) AS edit_date, id, title, author, status, title_url FROM entries WHERE topic_id <> '_admin'"
|
||||||
if request.authenticated_userid == None:
|
if request.authenticated_userid == None:
|
||||||
# if user is anonym, display only published posts
|
# if user is anonym, display only published posts
|
||||||
query = query + " AND status='publié'"
|
query = query + " AND status='publié'"
|
||||||
|
|||||||
@@ -12,8 +12,9 @@
|
|||||||
<input type="text" class="form-control" name="criteria">
|
<input type="text" class="form-control" name="criteria">
|
||||||
<button class="btn btn-primary" type="submit" name="form.submitted">Rechercher</button>
|
<button class="btn btn-primary" type="submit" name="form.submitted">Rechercher</button>
|
||||||
</div>
|
</div>
|
||||||
|
<!--
|
||||||
<button class="btn btn-warning" type="submit" name="form.replace">Remplacer title_url</button>
|
<button class="btn btn-warning" type="submit" name="form.replace">Remplacer title_url</button>
|
||||||
|
-->
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|||||||
@@ -136,7 +136,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{{ entry.create_date }}</td>
|
<td>{{ entry.create_date }}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ request.route_url('blog', id=entry.id, slug='entry.title_url') }}">{{ entry.title }}</a>
|
<a href="{{ request.route_url('blog', id=entry.id, slug=entry.title_url) }}">{{ entry.title }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td>{{ entry.author }}</td>
|
<td>{{ entry.author }}</td>
|
||||||
{% if entry.status != 'publié' %}
|
{% if entry.status != 'publié' %}
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
<td>{{ entry.edit_date }}</td>
|
<td>{{ entry.edit_date }}</td>
|
||||||
<td>{{ entry.editor }}</td>
|
<td>{{ entry.editor }}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ request.route_url('blog', id=entry.id, slug='entry.title_url') }}">{{ entry.title }}</a>
|
<a href="{{ request.route_url('blog', id=entry.id, slug=entry.title_url) }}">{{ entry.title }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td>{{ entry.tag }}</td>
|
<td>{{ entry.tag }}</td>
|
||||||
{% if entry.status != 'publié' %}
|
{% if entry.status != 'publié' %}
|
||||||
|
|||||||
Reference in New Issue
Block a user