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

  • SEARCH
  • Home
  • 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 8224771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:11:08+00:00 2026-06-07T15:11:08+00:00

UPDATE: ADDED A BOUNTY. PLEASE PROVIDE AN EXAMPLE AND I WILL ACCEPT THE BEST

  • 0

UPDATE: ADDED A BOUNTY. PLEASE PROVIDE AN EXAMPLE AND I WILL ACCEPT THE BEST ANSWER

UPDATE 2: Explicit example now included

Carrying on from the same project, where I asked about bulk_create in a separate thread.
I was wondering if there is a way to essentially “bulk_save” – insert if non-existent or simply update if it already exists.

For example:

class Person(models.Model):
    first_name = models.CharField(max_length=30)
    last_name = models.CharField(max_length=30)
    height = models.DecimalField(blank=True, null=True)
    weight = models.DecimalField(blank=True, null=True)

I have a list of dictionaries with key-value pairs for these fields. I would like to filter by name, and then update the height and/or weight as these my players are still growing and conditioning. If there is no easy way to “bulk_save”, a bulk update would also be helpful.

Reference: June 8, 2012 – “get_or_create()” patch at django project

Bulk_update reference

  • 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-06-07T15:11:09+00:00Added an answer on June 7, 2026 at 3:11 pm

    I just did a variation of the update_many function listed below I seem to have improved speeds tremendously already.

    http://people.iola.dk/olau/python/bulkops.py

    UPDATE – apparently DSE2 is also an option.

    https://bitbucket.org/weholt/dse2

    Will update with speed tests tomorrow.

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

Sidebar

Related Questions

Bounty update : Already got a very good answer from Mark. Adapted := into
Update : Added simple test example http://jsfiddle.net/7UhrW/1/ using normalize.css. Chrome/WebKit and Firefox have different
Update: I've added an answer that describes my final solution (hint: the single Expr
NOTE: I added my new solution at the UPDATE answer below. I try to
UPDATE : added an example to clarify the format of the data. Considering a
update: added LinkedList.h and SymbolTable.h So I'm having difficulty with a programming assignment from
UPDATE Added <uses-permission android:name=android.permission.WRITE_EXTERNAL_STORAGE /> to the manifest all works ok now. Ok so
update I added a metabox using http://codex.wordpress.org/Function_Reference/add_meta_box Unfortunatly it only adds the metabox to
I added a counter cache but can't get it to update. But I can
There're files/folders that were deleted and then re-added to the repository. svn update >

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.