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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:35:30+00:00 2026-05-29T11:35:30+00:00

Hello and thank you in advance, I am very much a Django/Python noobie. I

  • 0

Hello and thank you in advance,

I am very much a Django/Python noobie. I just need guidance, not necessarily answers. I have read all the pertinent documentation and I can’t seem to find a concise example of what I am trying to do.

I have two views, one is a form and the other is a view that lists data contained in a database table. I am trying to display both these views on the same webpage page that is called by the user going to one URL listed in the URLS.py file. I am sure this is possible, I am equally sure I am missing something basic.

Thank you for your help.

dp

  • 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-29T11:35:31+00:00Added an answer on May 29, 2026 at 11:35 am

    I usually try and define my views in small pieces. For example, the form might be something like this:

    <!-- form.html -->
    <form><input type="submit"/></form>
    

    and the model listing is this:

    <!-- listing.html -->
    <ul>
    {% for item in items %}
    <li>Item {{ item.name }}</li>
    {% endfor %}
    </ul>
    

    Then, the page that is just the form would look like this:

    <!-- form_page.html -->
    <html><body>
    {% include "form.html" %}
    </body></html>
    

    The page with just the listing:

    <!-- listing_page.html -->
    <html><body>
    {% include "listing.html" %}
    </body></html>
    

    and the page with both:

    <!-- both_page.html -->
    <html><body>
    {% include "form.html" %}
    {% include "listing.html" %}
    </body></html>
    

    This is a very simplified example, but hopefully you get the idea.

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

Sidebar

Related Questions

Hello and thank you in advance, I am trying to create a django form
Hello and thank you in advance. This is a follow up question from the
Hello there people of stack overflow, I have just started developing with android and
Hello everyone and thanks in advance for any ideas, suggestions or answers. First, the
Hello and thank you in advance for the help. I am having some trouble
Hello (and thanks in advance) I'm in a bit of a quandry, I cant
Suppose file1 looks like this: bye bye hello thank you And file2 looks like
Hello all and thanks for the help, I need to write every row from
Hello guys. I think it isn't possible just using PHP, but just to be
I have this kinda template text : Hello {#Name#}, Thanks for coming blah on

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.