Skip to content

Commit

Permalink
misc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
nilandev committed Jan 8, 2024
1 parent 4f75f33 commit aec923a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions bloggy/admin/course_admin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from datetime import timezone

from django.contrib import admin
from bloggy.admin import BloggyAdmin, BloggyAdminForm, seo_fieldsets, publication_fieldsets
from bloggy.models.course import Course
from bloggy.services.post_service import cleanse_html


class CourseForm(BloggyAdminForm):
Expand Down Expand Up @@ -45,5 +48,6 @@ class CourseAdmin(BloggyAdmin):
list_display_links = ['title']
form = CourseForm



def save_model(self, request, obj, form, change):
obj.description = cleanse_html(obj.description)
super().save_model(request, obj, form, change)
4 changes: 2 additions & 2 deletions bloggy/templates/pages/single/course.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ <h1 class="post-title display-2 fw-700 mt-0 mb-2">{{ course.title }}</h1>
{% for lesson in course.get_lessons %}
{% url 'lesson_single' course=course.slug slug=lesson.slug as current_url %}
<li class="list-group-item {% if request.get_full_path == current_url %}active{% endif %}">
<h3 class=""><a
href="{% url 'lesson_single' course=course.slug slug=lesson.slug %}"
<h3 class="">
<a href="{% url 'lesson_single' course=course.slug slug=lesson.slug %}"
class="text-decoration-none h3 text-dark p-0 m-0 w-500">{{ lesson.title }}</a>
</h3>
<p class="font-sm text-muted mb-3">{{ lesson.excerpt }}</p>
Expand Down
2 changes: 1 addition & 1 deletion bloggy/templates/pages/single/post-standard.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
{% include "partials/social_share.html" with object=post authorName=post.author.get_full_name_or_username %}
{% include 'partials/author_widget.html' with author=post.author %}

{% comment %}<section id="vueRoot" class="d-print-none my-5">
{% comment %} <section id="vueRoot" class="d-print-none my-5">
<comments post-id="{{ post.id }}" post-type="{{ post.post_type }}" current-user="{{ user }}"></comments>
</section>{% endcomment %}
</div>
Expand Down

0 comments on commit aec923a

Please sign in to comment.