title: accssesing table with django shell
body: <p>I have a table in <code>MySQL</code> named <code>main_A</code> with 2 columns.
  in my <code>models.py</code> I have:</p>
  
  <pre><code>from django.db import  models
  class main_A(models.Model):
         x= models.IntegerField(primary_key = True)
         y= models.IntegerField(blank = True)
  </code></pre>
  
  <p>i want to view it's rows from django shell.
  Note: The table <strong>already exists</strong> in the Database.</p>
  
  <p>This is the view of my project files:
  <a href="http://s18.postimg.org/musyd3pe1/1234.png" rel="nofollow">http://s18.postimg.org/musyd3pe1/1234.png</a></p>
  
  <p>I'm statring django with:</p>
  
  <pre><code>python manage.py shell
  </code></pre>
  
  <p>now... I'm supposed to write:</p>
  
  <pre><code>from models import main_A
  </code></pre>
  
  <p>but says:</p>
  
  <blockquote>
    <p>ImportError: NO module named models</p>
  </blockquote>
  
  <p>i can get pass this error only if I write:</p>
  
  <pre><code>from main.models import main_A
  </code></pre>
  
  <p>then I can for example do:</p>
  
  <pre><code>p1 = main_A.objects.all()
  p1
  </code></pre>
  
  <p>but it tells me: </p>
  
  <blockquote>
    <p>table main_main_A doesn't exists</p>
  </blockquote>
  
  <p>I know that django auto add the name of the package to all tables... and thats why I get <code>main_main_A</code> but I don't understand why <code>from models import main_A</code> doesn't work.</p>
  
  <p>How do I get pass this?</p>