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

Backport of #1188 "Serve staticfiles in the webapp if whitenoise is installed" to 0.9.x #1209

Closed
wants to merge 11 commits into from

Conversation

deniszh
Copy link
Member

@deniszh deniszh commented Apr 19, 2015

This avoids the collectstatic step & apache configuration. It's probably slightly less optimal than serving files with apache/nginx but much easier to start with.
Whitenoise is compatible with Django 1.4 and above.

Tested with synthesize and manual whitenoise installation, but please check more.

@deniszh
Copy link
Member Author

deniszh commented Apr 19, 2015

@brutasse , @obfuscurity - please check, thanks!

@obfuscurity obfuscurity added this to the 0.9.13 milestone Jun 1, 2015
@obfuscurity obfuscurity mentioned this pull request Jun 1, 2015
13 tasks
@gwaldo
Copy link
Member

gwaldo commented Jun 1, 2015

From a quick read it looks ok, but I don't have the bandwidth to test it.

@esc
Copy link
Contributor

esc commented Jun 3, 2015

deniszh: how do I go about checking this?

@deniszh
Copy link
Member Author

deniszh commented Jun 3, 2015

@esc: Very good question, indeed. I just found that I do not know. Synthesize working properly on Django 1.4-1.7 and there's no need to setup /static alias at all.... 😕

@obfuscurity
Copy link
Member

@deniszh you're welcome 😉

@deniszh
Copy link
Member Author

deniszh commented Jun 3, 2015

@obfuscurity: yep, that's good in general, but not in that specific case.
BTW latest Django 1.8 doesn't work with synthesize, gives strange error, will try to find out what's going on.

@obfuscurity
Copy link
Member

@deniszh If you're trying to upgrade to Django 1.8, it's no longer Synthesize. Synthesize uses requirements.txt, which is frozen to 1.4.

@deniszh
Copy link
Member Author

deniszh commented Jun 19, 2015

According to #1252 (comment) and whitenoise docs it doesn't work with python 2.6 and 0.9.13 must working with it.
Maybe we need to import whitenoise only if python version is 2.7 ?

@deniszh
Copy link
Member Author

deniszh commented Jun 19, 2015

Add that change and squashed commits.

@SEJeff
Copy link
Member

SEJeff commented Aug 12, 2015

This looks reasonable to me, although I'm not the biggest fan of skipping using a web server like Apache or nginx.

Personally, it shouldn't be a warning in the check deps script, perhaps just an INFO message?

@deniszh
Copy link
Member Author

deniszh commented Aug 12, 2015

@SEJeff - will change it, thanks!

@deniszh
Copy link
Member Author

deniszh commented Aug 12, 2015

Is anyone has idea why Travis is b0rking on that change for all Django's except 1.8 ?

@alecxvs
Copy link

alecxvs commented Aug 12, 2015

Probably a similar issue to sous-chefs/graphite#227
A newer django-tagging is only compatible with django 1.7+, it needs to be locked down for older djangos.

@deniszh
Copy link
Member Author

deniszh commented Aug 16, 2015

Ah, screw it. Will make another commit, this one is too distant from 0.9.x

@deniszh deniszh restored the 0.9.x_bp_1188 branch September 13, 2015 13:24
@deniszh deniszh deleted the 0.9.x_bp_1188 branch October 12, 2015 14:30
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

Successfully merging this pull request may close these issues.

8 participants