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

  • SEARCH
  • Home
  • 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 8123001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:01:14+00:00 2026-06-06T06:01:14+00:00

django 1.4,python 2.6.6. I have an app jobs. my files tree: djproject/ |– djproject

  • 0

django 1.4,python 2.6.6.
I have an app “jobs”.
my files tree:

djproject/
|-- djproject
|   |-- db
|   |   `-- tdata.db
|   |-- __init__.py
|   |-- __init__.pyc
|   |-- jobs
|   |   |-- admin.py
|   |   |-- admin.pyc
|   |   |-- __init__.py
|   |   |-- __init__.pyc
|   |   |-- models.py
|   |   |-- models.pyc
|   |   |-- tests.py
|   |   `-- views.py
|   |-- settings.py
|   |-- settings.pyc
|   |-- urls.py
|   |-- urls.pyc
|   |-- wsgi.py
|   `-- wsgi.pyc
`-- manage.py

my manage.py file:

#!/usr/bin/env python

import os
import sys

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "djproject.settings")

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)

Then I run “python manage.py shell” in which is the same level folder with file “manage.py”.
And then I type “from jobs.models import Job”.
Errors as follow(relative path):

>>> from jobs.models import Job
Traceback (most recent call last):
  File "<console>", line 1, in <module>
ImportError: No module named jobs.models

but, If I use full path

>>> from djproject.jobs.models import Job

error disapear, why?

  • 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-06-06T06:01:17+00:00Added an answer on June 6, 2026 at 6:01 am

    This is as expected because you’re now running manage.py from a different directory than in previous versions of Django. See Updated default project layout and manage.py in the Django documentation for more details.

    You’re now starting manage.py from a higher directory in the tree so you’ll need to include djproject when importing the code. The documentation also gives a suggestion on how to do it differently (if you want):

    Anything imported as a top-level module can be placed adjacent to the
    new manage.py. For instance, to decouple “myapp” from the project
    module and import it as just myapp, place it outside the mysite/
    directory:

    manage.py
    myapp/
        __init__.py
        models.py
    mysite/
        __init__.py
        settings.py
        urls.py
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Django app written in Python 2.5 and I plan to upgrade
I have python/django app on Heroku (Cedar stack) and would like to make it
I am trying to learn Django (and Python) and have created my own app
I have a python/django application that runs on the google app engine. My views.py
I'm new to python, django and google app engine. All great tools and have
Suppose I have a Django app (for example, myapp ) and a Python script
I have a App Engine/Python/Django application which has grown and been modified over the
I have a string in a django/python app and need to search it for
hi i am working on a django python application using sqlite3 database. I have
I have java sdk 1.7. I've always used django/python for web development, this will

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.