Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6049513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:35:07+00:00 2026-05-23T07:35:07+00:00

I have models with custom save methods. def save(self, force_insert=False, force_update=False): self.body_html = markdown(self.body)

  • 0

I have models with custom save methods.

def save(self, force_insert=False, force_update=False):
    self.body_html = markdown(self.body)
    super(News, self).save(force_insert, force_update)

I can add news nae bother and everything is fine until I decide to alter the data in an existing object.
I make the change and hit save and am told that

“The news “The best news” was changed successfully.”

However, it most certainly was not and the data stays the same as it was before the changes.

What am I forgetting or doing wrong?
Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:35:08+00:00Added an answer on May 23, 2026 at 7:35 am

    I think this is to do with this:

    def save_model(self, request, obj, form, change):
        instance = form.save(commit=False)
        if not hasattr(instance, "poster"):
            instance.poster = request.user
            instance.save()
            form.save_m2m()
            return instance
    

    in the admin.py.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have these two methods in my signeduser model: def build_invitation self.create_invitation end def
I have a few models that need to have custom find conditions placed on
Can I have a custom service providing the storage of the models I use
I have the following models but I cannot get the custom method reorder_action_items to
I have a custom form... I'd like to auto save the author (authenticated user)
Using for example class model(models.Model) .... def my_custom_method(self, *args, **kwargs): #do something When I
I have a model with $useTable = false and a custom $schema defined. I
I have this custom primary key in a model: class Personal(models.Model): name = models.CharField(max_length=20,primary_key=True)
I am newbie at Django. I have model with a custom method. In view
In my application I have a custom model binder that I set to the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.