Ready to throw the keyboard using Django 1.7 on Windows 7

17 views
Skip to first unread message

Todd Kovalsky

unread,
Jun 19, 2015, 12:31:04 PM6/19/15
to django...@googlegroups.com
Having a miserable time trying to get a django site running on a wintel box.

The issue comes after I add models to models.py.

I keep getting the error Could not import settings 'myapp.settings'...No module named myapp.settings.

Very irritating trying to get a site up and working on a windows machine vs osx



any help is greatly appreciated

Vijay Khemlani

unread,
Jun 19, 2015, 12:39:47 PM6/19/15
to django...@googlegroups.com
How is your project folder structure?

If you open a normal python shell from the same directory as your manage.py and execute "import myapp.settings" what does it say?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/876bd435-9e37-4471-9840-86ac040e6434%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bill Freeman

unread,
Jun 19, 2015, 12:41:01 PM6/19/15
to django-users
Is this under manage.py or behind a wsgi front end like Apache/mod_wsgi or ngnx?

If under manage.py, you need to cd to the directory containing manage.py first.  (There are ways around this if absolutely necessary.)  If behind a wsgi front end, there are other means for insuring that this directory is on sys.path.

The directory holding manage.py must also hold a sub-directory named myapp.  The myapp directory must, in torn, contain both a settings.py file and a __init__.py file (the latter can be an empty file).

Let us know if this doesn't get you going.

--

Mike Dewhirst

unread,
Jun 19, 2015, 6:55:40 PM6/19/15
to django...@googlegroups.com
On 20/06/2015 2:16 AM, Todd Kovalsky wrote:
> Having a miserable time trying to get a django site running on a wintel box.
>
> The issue comes after I add models to models.py.
>
> I keep getting the error Could not import settings 'myapp.settings'...No
> module named myapp.settings.

Your DJANGO_SETTINGS_MODULE has a full path. Try changing it to a
relative 'myapp.settings'

>
> Very irritating trying to get a site up and working on a windows machine
> vs osx
>
>
>
> any help is greatly appreciated
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users...@googlegroups.com
> <mailto:django-users...@googlegroups.com>.
> To post to this group, send email to django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
> <https://groups.google.com/d/msgid/django-users/876bd435-9e37-4471-9840-86ac040e6434%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages