Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save does'nt work in detail view when BLOG_USE_PLACEHOLDER = False #685

Open
pupattan opened this issue Aug 3, 2021 · 2 comments
Open

Comments

@pupattan
Copy link

pupattan commented Aug 3, 2021

if I save a existend blog post in the detail view of the post, the change will not be saved to the database.

{% if post.app_config.use_placeholder %}
    <div class="blog-content">{% render_placeholder post.content %}</div>
{% else %}
    <div class="blog-content">{% render_model post "post_text" "post_text" "" "safe" %}</div>
{% endif %}

config:
BLOG_USE_PLACEHOLDER = False

  • the django administration interface => everything works fine
  • in the detail view of the frontend editor => save problem

I dont have any PARLER_LANGUAGES settings
Similar issue #123

@pupattan
Copy link
Author

pupattan commented Aug 3, 2021

When i debug i found that in placeholderpadmin.py in def edit_field() the form goes invalid expecting for posttitle looks like

 if not cancel_clicked and request.method == 'POST':
            form = form_class(instance=obj, data=request.POST)
            if form.is_valid():
                form.save()
                saved_successfully = True

form.errors in the above code prints the following. But i am editing the post_text only
<ul class="errorlist"><li>title<ul class="errorlist"><li>This field is required.</li></ul></li></ul>

@pupattan
Copy link
Author

pupattan commented Aug 3, 2021

Anything to change in PostAdminForm ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant