title: Django Import Class From models.py
body: <p>Using a folder structure like this:</p>
  
  <pre><code>library/
  -django.wsgi
  -manage.py
  -static/
      --all my static files
  -library/
      --__init__.py
      --models.py
      --settings.py
      --urls.py
      --views.py
      --wsgi.py
      --templates/
          ---where i plan to store all my templates
  </code></pre>
  
  <p>How can i import a class in my views.py that is defined in models.py?</p>
  
  <p>I've tried:</p>
  
  <pre><code>from . import models.class
  
  from models import class
  
  from projectname.models import class
  
  from projectname import models.class
  
  from project import class
  </code></pre>
  
  <p>But for all those i get invalid syntax errors</p>
  
  <p>views.py</p>
  
  <pre><code>from django.core.context_processors import csrf
  from django.shortcuts import redirect, render
  from django.contrib.auth import authenticate, login
  from django.contrib.auth.decorators import login_required
  from django.contrib.auth.models import User
  from django.http import HttpResponse
  from django.contrib import messages
  from django.template import RequestContext, loader
  from django.contrib.auth import logout
  
  from library.models import 7DTagmap
  </code></pre>
  
  <p>models.py</p>
  
  <pre><code>from __future__ import unicode_literals
  
  from django.db import models
  
  class 7DTagmap(models.Model):
     id = models.IntegerField(primary_key=True)
      tag_id = models.CharField(max_length=50L)
      st_tag_id = models.IntegerField()
      class Meta:
          db_table = '7d_tagmap'
  </code></pre>
  
  <p>error:</p>
  
  <pre><code>invalid syntax (views.py, line 11)
  Exception Type: SyntaxError
  Exception Value:    invalid syntax (views.py, line 11)
  </code></pre>