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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:51:33+00:00 2026-05-24T23:51:33+00:00

I have a small problem that I am hoping you guys can help me

  • 0

I have a small problem that I am hoping you guys can help me with. I have two buttons that I use to approve, or disable rates. Basically, makes the boolean flag True or False. Now I’m having some trouble wrapping my head around this idea but, I would like to have only the Approve button show if rates are disabled, and vice versa for the Disable button.

Anyone have any suggestions to get me started?

Thanks so much.

Steve

  • 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-24T23:51:34+00:00Added an answer on May 24, 2026 at 11:51 pm

    You have two choices – hide & show the buttons server side with django or do it client side with javascript (as the other answers mention).

    Either way, you first add the approved boolean to the Rate model – I’m guessing you know how to do that.

    In a django template, you can use an if statement to check the approved boolean and show the results:

    {% if approved %}<button disableRate>{% else %}<button approveRate>{% endif %}
    

    You should look at ajax though, because otherwise you’ll be doing an entire page load every time you click one of those buttons

    http://www.nomadjourney.com/2009/01/using-django-templates-with-jquery-ajax/

    http://www.b-list.org/weblog/2006/jul/31/django-tips-simple-ajax-example-part-1/ (old)

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

Sidebar

Related Questions

I have a small problem that I am hoping to get some help with.
Im hoping someone can help me with a small problem! I have a php
We have an interesting problem that I was hoping someone could help to shed
Have run into an issue that i am hoping somebody can help give me
I got a small problem that I can't figure out. I have a superclass
I have a small problem that takes me for a day and until now
I've got a small Cocoa problem. I have a StatusBar application that has an
I have a problem with Regular Expressions. I'm writing a small program that matches
have small problem, and would very much appreciate help :) I should convert byte
I have small problem with Spring MVC. Basically what I'm trying to do is

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.