Skip to content

Commit

Permalink
Merge branch 'develop-4' of github.com:fsbraun/djangocms-blog into de…
Browse files Browse the repository at this point in the history
…velop-4
  • Loading branch information
fsbraun committed Nov 11, 2024
2 parents bbf503b + 4efe3ba commit 26c96aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions djangocms_blog/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def queryset(self, request, queryset):
class ModelAppHookConfig:
app_config_selection_title = _("Select app config")
app_config_selection_desc = _("Select the app config for the new object")
app_config_initial_fields = ("app_config",)
app_config_values = {}

def _app_config_select(self, request, obj):
Expand Down Expand Up @@ -181,7 +182,7 @@ def get_fieldsets(self, request, obj=None):
(
_(self.app_config_selection_title),
{
"fields": ("app_config",),
"fields": self.app_config_initial_fields,
"description": _(self.app_config_selection_desc),
},
),
Expand Down Expand Up @@ -308,7 +309,7 @@ def get_form_x(self, request, obj=None, **kwargs):

class InitialForm(form):
class Meta(form.Meta):
fields = ("app_config",)
fields = self.app_config_initial_fields

form = InitialForm
form = self._set_config_defaults(request, form, obj)
Expand Down Expand Up @@ -365,6 +366,7 @@ class PostAdmin(
GrouperModelAdmin,
):
# form = PostAdminForm
app_config_initial_fields = ("app_config", "content__language")
extra_grouping_fields = ("language",)
inlines = []
list_display = ("title", "author", "app_config", "state_indicator", "admin_list_actions")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% load i18n %}{% spaceless %}
<div class="plugin plugin-blog">
<div class="blog-latest-entries">
{% for post_content in postcontent_list %}
{% include "djangocms_blog/includes/blog_item.html" with post_content=post_content image="true" TRUNCWORDS_COUNT=TRUNCWORDS_COUNT %}
{% for postcontent in postcontent_list %}
{% include "djangocms_blog/includes/blog_item.html" with postcontent=postcontent image="true" TRUNCWORDS_COUNT=TRUNCWORDS_COUNT %}
{% empty %}
<p class="blog-empty">{% trans "No article found." %}</p>
{% endfor %}
Expand Down

0 comments on commit 26c96aa

Please sign in to comment.