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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:22:39+00:00 2026-06-16T04:22:39+00:00

In my app, whenever a question is deleted, it shows a django message that

  • 0

In my app, whenever a question is deleted, it shows a django message that question is deleted.
Related code is:

from django.contrib import messages

msg= _('Question is deleted')
messages.info(request, msg)

The message gets displayed as desired, however I want Display message to last longer say for minimum 10 sec. or till the user clicks on it.

In django docs saw expiration of messages but still could not figure out, and I have nothing like message storage which i can set to false.

Help appreciated 🙂

  • 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-16T04:22:40+00:00Added an answer on June 16, 2026 at 4:22 am

    The thing you want to do is javascript domain. Below code will display your messages for 10 sec or you can close it manually. In template you can do like this:

    {% for message in messages %}
        <div class="message">
            {{ message }}
            <a href="#" class="del-msg">&times;</a>
        </div>
    {% endfor %}
    

    And in javascript:

    <script>
        $(document).ready(function() {
            // messages timeout for 10 sec 
            setTimeout(function() {
                $('.message').fadeOut('slow');
            }, 10000); // <-- time in milliseconds, 1000 =  1 sec
    
            // delete message
            $('.del-msg').live('click',function(){
                $('.del-msg').parent().attr('style', 'display:none;');
            })
        });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My app has a common class that displays an actionSheet whenever Contact Us is
I have implemented Facebook into my app but now I find that whenever I
A question that I hope you can answer for a Q&A app. Still very
Following up from my last question , I still get the error whenever I
My goal is to have the django app automatically restart whenever it crashes, and
I noticed that whenever I tested my app on my Droid X and Droid
I have a local app that uses SQLite. Whenever it has internet access it
I am developing an app whenever a user add some details the record get
What would be the best way to display a dialog whenever my app receives
Whenever I make changes to my app, nodemon restarts the whole app, but every

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.