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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:30:56+00:00 2026-06-16T19:30:56+00:00

A noobish question to be sure. <a href={% url ‘stuff.views.SomeView’ %}/somethingnew> <button>See something new

  • 0

A noobish question to be sure.

<a href="{% url 'stuff.views.SomeView' %}/somethingnew">
    <button>See something new on this page</button>
</a>

<form action="" method="post">{% csrf_token %}
    <button name="somethingnew" type="submit" value=True>See something new on this page</button>
</form>

With either choice, I update some boolean variable, perform the appropriate calculations, call the page view and render a page with something new on this page. Part of the reason I use either method is to save the state of a collection of boolean variables. What is the best way 1) change a boolean variable 2) save its state 3) perform the necessary updates when the button is clicked and finally 4) render page after the underlying data has been updated?

Right now, I am using forms rather than links so that I don’t need to code a url for each boolean variable. Which method is better? Will one method improve the time it takes to reload the page (assuming many boolean variables)?

  • 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-16T19:30:57+00:00Added an answer on June 16, 2026 at 7:30 pm

    1) Following the REST mindset, a POST request is in order to transmit the user input, since you are altering database objects.

    2) I’d save it in the Session object if the input is not needed forever (session duration). Otherwise in the database as you are doing now.

    3/4) I’d gather all the necessary info in a form. When the user commits the form in a POST request, I’d compute the data and respond with the rendered page containing the computed result. If the input variables are gathered step by step with intermittent computation, I’d just update the input form accordingly (display different choices in a combo box or something like that). Of course the transmitting could be done in an AJAXy way, too.

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

Sidebar

Related Questions

I'm new to C++, so this may be a noobish question; I have the
I'm new to web development, so I apologize if this question is noobish. I
I'm very new to Java so please forgive me the noobish question in advance.
I'm new to Django so i'm sorry if this question is noobish. I want
Apologies if this is a total noobish question. I'm new to JS and not
Sorry for the noobish question (I'm new with Django) but I was wondering how
This is THE MOST noobish question ever, I see it done so often. I
Apologies for the noobish question, I am completely new to both Python and Django
I'm new to OpenGL-ES on Android, so excuse me for my noobish question. I'm
I'm new to C#, so forgive this noobish question. I'm playing with a simple

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.