title: Django model save the form but does not show me
body: <p>Hi I have created a address model  and link that model to the forms and created the view. but that form does save any data but that data does not show to me. Although it show me that data in the terminal .
  this is my address model:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>from django.db import models
  from billing.models import BillingProfile
  # Create your models here.
  ADDRESS_TYPES = (
      ('billing' , 'Billing'),
      ('shipping' , 'Shipping'),
  )
  
  
  class Address(models.Model):
      billing_profile     = models.ForeignKey(BillingProfile , on_delete=models.CASCADE)
      addresss_type        = models.CharField(max_length=120 , choices=ADDRESS_TYPES)
      address_line_1      = models.CharField(max_length=120)
      address_line_2      = models.CharField(max_length=120 , null=True , blank= True)
      city                = models.CharField(max_length=120)
      country             = models.CharField(max_length=120 ,default='Pakistan')
      postal_code         = models.CharField(max_length=120)
  
      def __str__(self):
          return str(self.billing_profile)</code></pre>
  </div>
  </div>
  
  since I connect address model with billingprofile so the billing model is:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>class BillingProfile(models.Model):
      user        = models.OneToOneField(User ,null=True , blank=True , on_delete=models.CASCADE)
      email       = models.EmailField()
      active      =models.BooleanField(default=True)
      update      = models.DateTimeField(auto_now=True)
      time_stamp   = models.DateTimeField(auto_now_add=True)
  
      objects = BillingProfileManager()
  
      def __str__(self):
          return self.email</code></pre>
  </div>
  </div>
  </p>
  <p>and I call my address model into form
  <strong>forms.py/address</strong></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>from django import forms
  from .models import Address
  
  class AddressForm(forms.ModelForm):
      class Meta:
          model = Address
          fields = ['address_line_1','address_line_2','city','country','postal_code']</code></pre>
  </div>
  </div>
  </p>
  <p>and my address/views.py is:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>from django.shortcuts import render , redirect
  from django.utils.http import is_safe_url
  # Create your views here.
  from billing.models import BillingProfile
  from .forms import AddressForm
  
  def checkout_address_create_view(request):
      form = AddressForm(request.POST or None)
      context = {
          'form':form
      }
      next_ = request.GET.get('next')
      next_post = request.POST.get('next')
      redirect_path = next_ or next_post or None
      if form.is_valid():
          print(request.POST)
          instance = form.save(commit=False)
          billing_profile ,  billing_profile_created = BillingProfile.objects.new_or_get(request)
          if billing_profile is not None:
              instance.billing_profile = billing_profile
              instance.address_type = request.POST.get('address_type','shipping')
              instance.save()
          else:
              print("Error Here")
              return redirect("cart:checkout")
  
          if is_safe_url(redirect_path , request.get_host()):
              return redirect(redirect_path)
          else:
              return redirect("cart:checkout")
      return redirect("cart:checkout")</code></pre>
  </div>
  </div>
  </p>
  <p>and my address/form.html is:</p>
  <p>now my form.html is:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;form method="POST" action="{% if action_url%}{{ action_url }} {% else %}{% url 'login' %}{% endif %}"&gt;
                  {% csrf_token %}
      {% if next_url %}
         &lt;input type="hidden" name="next" value="{{ next_url }}"/&gt;
      {% endif %}
  
      {% if address_type %}
          &lt;input type="hidden" name="address_type" value="{{ address_type }}"/&gt;
        {% endif %}
                  {{form.as_p}}
                  &lt;button type="submit" class="btn btn-secondary"&gt;Submit&lt;/button&gt;
                &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>and this form is shown on cart home so the cart view is:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>def checkout_home(request):
      cart_obj , cart_created = Cart.objects.new_or_get(request)
      order_obj = None
      if  cart_created or cart_obj.products.count() ==0:
          return redirect("cart:home")
      login_form = LoginForm()
      guest_form = GuestForm()
      address_form =AddressForm()
      billing_address_form = AddressForm()
  
      billing_profile, billing_profile_created = BillingProfile.objects.new_or_get(request)
      if billing_profile is not None:
          order_obj , order_obj_created = Order.objects.new_or_get(billing_profile , cart_obj)
  
  
      context= {
          "object" : order_obj,
          "billing_profile" : billing_profile,
          "login_form" : login_form,
          "guest_form" :guest_form,
          "address_form" :address_form,
          "billing_address_form" : billing_address_form,
  
      }
  
      return render(request , "carts/checkout.html" , context)</code></pre>
  </div>
  </div>
  </p>
  <p>and my checkout html is:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>{% extends 'base.html' %}
  
  {% block content %}
  
  
  {{object.order_id}} -- {{object.cart}}
  
  {% if not billing_profile %}
  &lt;div class="row text-center"&gt;
      &lt;div class="col-12 col-md-6"&gt;
          &lt;p class="lead"&gt;Login&lt;/p&gt;
          {% include 'accounts/snippets/form.html' with form=login_form next_url=request.build_absolute_uri %}
      &lt;/div&gt;
      &lt;div class="col-12 col-md-6"&gt;
          &lt;p class="lead"&gt;Continue as guest&lt;/p&gt;
  
          {% url "guest_register" as guest_register_url %}
          {% include 'accounts/snippets/form.html' with form=guest_form next_url=request.build_absolute_uri action_url=guest_register_url %}
      &lt;/div&gt;
      &lt;/div&gt;
  {% else %}
  
           {% if not object.shipping_address %}
                  &lt;div class="row"&gt;
                           &lt;div class="col-md-6 mx-auto col-10"&gt;
                               &lt;p class="lead"&gt;Shipping Address&lt;/p&gt;
                                  {% url "checkout_address_create" as checkout_address_create %}
                                  {% include 'addresses/form.html' with form=address_form next_url=request.build_absolute_uri action_url=checkout_address_create address_type='shipping' %}
                            &lt;/div&gt;
                  &lt;/div&gt;
           {% elif not object.billing_address%}
              &lt;div class="row"&gt;
                           &lt;div class="col-md-6 mx-auto col-10"&gt;
                               &lt;p class="lead"&gt;Billing Address&lt;/p&gt;
                                  {% url "checkout_address_create" as checkout_address_create %}
                                  {% include 'addresses/form.html' with form=address_form next_url=request.build_absolute_uri action_url=checkout_address_create address_type='billing' %}
                            &lt;/div&gt;
              &lt;/div&gt;
  
           {% else %}
  
                  &lt;h1&gt;Finalize Checkout&lt;/h1&gt;
              &lt;p&gt;Cart_total:{{object.cart.total}}&lt;/p&gt;
              &lt;p&gt;Shipping Total:{{object.shipping_total}}&lt;/p&gt;
              &lt;p&gt;Order Total:{{object.total}}&lt;/p&gt;
              &lt;button&gt;Checkout&lt;/button&gt;
           {% endif %}
  
  {% endif %}
  {% endblock %}</code></pre>
  </div>
  </div>
  </p>