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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:52:06+00:00 2026-05-23T08:52:06+00:00

I have this as template account_form.html <form action=/contact/ method=post> {% for field in form

  • 0

I have this as template account_form.html

<form action="/contact/" method="post">
    {% for field in form %}
        <div class="fieldWrapper">
            {{ field.errors }}
            {{ field.label_tag }}: {{ field }}
        </div>
    {% endfor %}
    <p><input type="submit" value="Send message" /></p>
</form>

My model.py

class Account(models.Model):
        person_name     = models.CharField(max_length=30)
        account_number  = models.IntegerField()
        creation_date   = models.DateField()

My View is

def account_form(request):
    if request.method == 'POST': # If the form has been submitted...
        form = AccountForm(request.POST) # A form bound to the POST data
        if form.is_valid(): # All validation rules pass
                # Process the data in form.cleaned_data
                # ...
                return HttpResponseRedirect('/thanks/') # Redirect after POST
    else:
        form = AccountForm() # An unbound form

    return render_to_response('account_form.html', {
            'form': form,
    })

The problem is when i load the page i only get the submit button nothing else

  • 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-23T08:52:07+00:00Added an answer on May 23, 2026 at 8:52 am

    I think you forgot to actually create your form:

    Should read something like this:

    forms.py:

    from django.forms import ModelForm
    from yourapp.models import Account
    
    class AccountForm(ModelForm):
        class Meta:
            model = Order
    

    This will give you all fields from Account.

    HTH

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

Sidebar

Related Questions

I have a model which has a template field. This template is HTML and
Suppose I have code like this: template<class T, T initial_t> class Bar { //
Assume I have a function template like this: template<class T> inline void doStuff(T* arr)
I have to parse this template file ($html) : {$myFirstVariable} {$myMainVar:MYF1,x\:x\,x,2:MYF2:MYF3,false} {$myLastVariable:trim} Following, my
I have this template function: template <class P> double Determinant(const P & a, const
I have this tiny Qt project with a project file like this: TEMPLATE =
I have code like this: template <typename T, typename U> struct MyStruct { T
So I have this code in a google app engine template: <select name='voter'> {%
I have DataTemplate containing a TextBox . I'm setting this template to a listbox
I would like to have a nice template for doing this in development. How

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.