Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DJANGO_SETTINGS_MODULE is undefined #12

Closed
Gwildor opened this issue Aug 20, 2012 · 7 comments
Closed

DJANGO_SETTINGS_MODULE is undefined #12

Gwildor opened this issue Aug 20, 2012 · 7 comments

Comments

@Gwildor
Copy link

Gwildor commented Aug 20, 2012

I can't manage to get django-image-cropping to run. After installation and configuration of my settings.py file, I'm getting the following error:

ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.

@jonasvp
Copy link
Member

jonasvp commented Aug 20, 2012

This is probably because of a syntax or other problem in your settings.py. Try running "python" and then "import settings" to see what errors it throws.

What version of easy_thumbnails are you running? (Check the output of "pip freeze"). Version 1.0 changed some settings, you might want to try the old version: dce62a5

@Gwildor
Copy link
Author

Gwildor commented Aug 20, 2012

First of all, thanks for your fast reaction (too bad I didn't see it just as fast).

Importing settings returns no errors. I forgot to mention this but I'm working on a project which was working fine until I attempted to use django-image-cropping, and actually worked fine again when I commented everything related to it in my settings file, so I really really doubt there is something wrong on that end.

As for my easy_thumbnails version, I'm using version 1.0.3. Can you tell me which version of it might be worth attempting?

@jonasvp
Copy link
Member

jonasvp commented Aug 20, 2012

No, 1.0.3 is fine. When exactly does the error occur? And what did you add to the settings.py?

@Gwildor
Copy link
Author

Gwildor commented Aug 20, 2012

It occurs immediately when I try to run Django form the shell. I added everything from the readme from points 2 and 3 (although I had the import as the second line, not immediately above the THUMBNAIL_PROCESSORS = ...), both from the readme in the master branch as the readme in the django-1.4-compatibility branch (so I tried both the "thumbnail_settings" version and the "defaults" version).

My Django version is 1.4.1, does that bring compatibility issues?

@jonasvp
Copy link
Member

jonasvp commented Aug 20, 2012

No, Django 1.4.1 is fine. Sorry, can't really think of anything more to check. Main thing would be to try and find out what error is causing ./manage.py to bail. Maybe step through the settings with pdb.set_trace().

It's interesting that importing the settings directly doesn't throw any errors but I can't think of anything that would cause this behavior. Is there any public code I could see? Maybe a diff of the settings after adding the image-cropping-related constants?

@Gwildor
Copy link
Author

Gwildor commented Aug 20, 2012

That's too bad, but thanks for your help.

Sorry, there isn't any code which can be publicly available.

@jonasvp
Copy link
Member

jonasvp commented Aug 20, 2012

Well, good luck! Would love for you to check back when you found the problem, maybe others have the same issue.

@jonasvp jonasvp closed this as completed Aug 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants