title: Django: Cannot import name 'model'
body: <p>So I am a student and I am trying to build a small shop using Django, so when I run the project on my laptop it works as expected but when I upload it to the server I got this error </p>
  
  <blockquote>
    <p>cannot import name 'CustomerOrderModel'</p>
  </blockquote>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>from django.shortcuts import render, get_object_or_404
  from django.views import generic
  from HomePage.models import Product
  from HomePage.forms import Customer
  from django.contrib import messages
  from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
  
  #other functions
  
  def customer_order_view(request, pk):
     product = get_object_or_404(Product, id=pk)
     form = Customer(request.POST or None)
     if form.is_valid():
        instance = form.save(commit=False)
        instance.customer_product_name = product
        instance.save()
        messages.success(request, "Success \n we will contact you soon")
        context = {'form': form, 'product': product}
     return render(request, 'HomePage/customerDetail.html', context)
  </code></pre>
  
  <p><strong>forms.py</strong></p>
  
  <pre><code>from django import forms
  from HomePage.models import CustomerOrderModel  #the error in this line 
  
  class Customer(forms.ModelForm):
    class Meta:   
      model = CustomerOrderModel   
      fields = [# some fields]
  </code></pre>
  
  <p><strong>url.py</strong></p>
  
  <pre><code>from django.conf.urls import url
  from django.conf import settings
  from django.conf.urls.static import static
  from HomePage.views import index_view, GiftView, FlowerView, BalloonView, 
  detail_view, customer_order_view
  
  app__name = 'HomePage'
  
  urlpatterns = [
                url(r'^$', index_view, name='index'),
                url(r'^gift/$', GiftView.as_view(), name='gift'),
                url(r'^flower/$', FlowerView.as_view(), name='flower'),
                url(r'^balloon/$', BalloonView.as_view(), name='balloon'),
                url(r'^(?P&lt;pk&gt;[0-9]+)/$', detail_view, name='detail'),
                url(r'^(?P&lt;pk&gt;[0-9]+)/order/$', customer_order_view, 
                    name='product_form'),
                    ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
  </code></pre>
  
  <p><strong>admin.py</strong></p>
  
  <pre><code>from django.contrib import admin
  from HomePage.models import Product, CustomerOrderModel
  
  #some code
  </code></pre>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>from django.db import models
  from django.core.validators import RegexValidator
  
  #some code
  </code></pre>
  
  <p><strong>this is picture of my file structure</strong> </p>
  
  <p><a href="https://i.stack.imgur.com/MdCRS.png" rel="nofollow noreferrer">image of the file structure</a></p>
  
  <p><strong>The Traceback</strong></p>
  
  <pre><code>  File "/home/django/venv/lib/python3.5/site-packages/django/core/handlers/exception.py" in inner
    35.             response = get_response(request)
  
  File "/home/django/venv/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
   128.                 response = self.process_exception_by_middleware(e, request)
  
  File "/home/django/venv/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
    126.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)
  
  File "/home/django/LovelyMemory/HomePage/views.py" in customer_order_view
  49. def customer_order_view(request, pk):
  
  File "/home/django/LovelyMemory/HomePage/forms.py" in &lt;module&gt;
  4. class Customer(forms.ModelForm):
  
  File "/home/django/LovelyMemory/HomePage/forms.py" in Customer
  5.     class Meta:
  
  File "/home/django/LovelyMemory/HomePage/forms.py" in Meta
  6.         from HomePage.models import CustomerOrderModel
  
  Exception Type: ImportError at /8/order/
  Exception Value: cannot import name 'CustomerOrderModel'
  </code></pre>