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 8726765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:18:48+00:00 2026-06-13T08:18:48+00:00

I have a representing a model and I want to be able to remove

  • 0

I have a representing a model and I want to be able to remove the row and delete the object from the DB without reloading the page. On the left I have an X icon when clicked hides the row using .hide(‘slow’) but how can I make it remove from the db? Re-loading the page takes a while.. Can I delete the object using a form or using a /delete page?

  • 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-13T08:18:49+00:00Added an answer on June 13, 2026 at 8:18 am

    you can use jquery to easily make an ajax request

    as part of the event handler that is triggered by a user clicking ‘X’, you can make a request to your django app.

    $.post('/django/url/to/your/view', {idToDelete: 'value'}, function(response) {
      // callback
    });
    

    Of coures this is just on the client side. In django you will need to creat a new urls.py entry and create the view logic to handle actually deleteing the id.

    It is very important to include a csrf token in your post requests. Django provides step by step on how to do this with ajax requests. https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ajax

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

Sidebar

Related Questions

A question about representing a string from a model. I have a Country model
I have a model in Rails from which I want to pick a random
In my Rails 3.2.6 app, I have a model representing a collection of data
I have a datastore model representing items in an ecommerce site: class Item(db.Model): CSIN
I have 3d-data representing the atmosphere. Now I want to interpolate this data to
I have a string representing an URL containing spaces and want to convert it
Suppose we have a table with different columns representing properties of an object e.g.
I have a model that contains a boolean field representing the item's approval or
I have a Django model representing a simple grocery list, as follows (truncated for
I have a mongoose model in my node.js application, representing invoices. I have figured

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.