-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from stuartmaxwell/dev
- Loading branch information
Showing
20 changed files
with
413 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Generated by Django 5.0.4 on 2024-04-29 05:34 | ||
|
||
import django.db.models.manager | ||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('djpress', '0006_alter_category_slug'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelManagers( | ||
name='content', | ||
managers=[ | ||
('post_objects', django.db.models.manager.Manager()), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{% extends '_base.html' %} | ||
{% load djpress_tags %} | ||
|
||
{% block title %}Home{% endblock %} | ||
|
||
{% block content %} | ||
|
||
{% if slug %} | ||
{% comment %} If there's a slug, we only display a single post. {% endcomment %} | ||
|
||
{% get_single_published_content slug as post %} | ||
|
||
{% include "djpress/snippets/content_detail.html" %} | ||
|
||
{% else %} | ||
{% comment %} If there's no slug, we loop through all published content. {% endcomment %} | ||
|
||
{% get_published_content as posts %} | ||
|
||
{% for post in posts %} | ||
|
||
{% include "djpress/snippets/content_summary.html" %} | ||
|
||
{% empty %} | ||
|
||
<p>No posts available.</p> | ||
|
||
{% endfor %} | ||
|
||
{% endif %} | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<h1>{{ post.title }}</h1> | ||
<p class="text-muted">Posted on {{ post.date }} by {{ post.author.first_name }}</p> | ||
<p> | ||
Categories: | ||
{% for category in post.categories.all %} | ||
<a href="{% url 'djpress:category_posts' category.slug %}" class="badge bg-primary">{{ category.name }}</a> | ||
{% endfor %} | ||
</p> | ||
<hr> | ||
<div class="content"> | ||
{{ post.content_markdown|safe }} | ||
</div> |
4 changes: 2 additions & 2 deletions
4
...plates/djpress/snippets/post_summary.html → ...tes/djpress/snippets/content_summary.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.