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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:43:27+00:00 2026-05-11T03:43:27+00:00

I have spent too much time on this problem and am beginning to think

  • 0

I have spent too much time on this problem and am beginning to think that it can’t be done in Django. I am pulling a list of pathogen names from a postgres database to a drop down box. The user selects the pathogen, which requires the id to be passed back through django to the database for further retrieval of more data. Please see

http://dpaste.com/119358/ for the drop down code.

The problem is that the select id = statement is above the point where the form retrieves the pathology id. The django statements must be placed at this point or the drop down doesn’t work. Has anyone written something similar and found a solution?

Max

  • 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. 2026-05-11T03:43:28+00:00Added an answer on May 11, 2026 at 3:43 am

    The id of the select tag in your HTML does not need to have any knowledge of your pathology records. Your code is correct, except for the lack of closing select tag.

    Your Django view that is mapped to the /pathology/ action URL needs to handle the POST method and pull the pathology id out of the request like so:

    pathology_id = request.POST['pathology'] 

    Now you can look that object up in your database by its id and generate a new page/form or whatever business logic you need to do with it.

    The dictionary key that you need to use in the request.POST[‘…’] call is based on the name you’ve given your select element, in this case ‘pathology’.

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

Sidebar

Ask A Question

Stats

  • Questions 242k
  • Answers 242k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It is an ASP.Net web handler file. Read Generic Handlers… May 13, 2026 at 7:41 am
  • Editorial Team
    Editorial Team added an answer Use a Microformats vCard <div class="vcard"> <span class="fn">Gregory Peck</span> <a… May 13, 2026 at 7:41 am
  • Editorial Team
    Editorial Team added an answer The first problem I've encountered is that I don't know… May 13, 2026 at 7:41 am

Related Questions

I know there are tons of articles all over Google on doing something similar
With my luck this question will be closed too quickly. I see a tremendous
I am trying to determine why an asp.net grid view is so horribly slow.
I need a very accurate way to time parts of my program. I could

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.