mallipeddi / django-yslow
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
7e435f0
commit 7e435f00cebe4af47c99f3a564f2cd2eefd46fde
tree bda9900079a139883f06bdf0b2e745abe7fb02ba
parent 8873ff8fa9ea55e6c3c9c026543749a8f12f762e
tree bda9900079a139883f06bdf0b2e745abe7fb02ba
parent 8873ff8fa9ea55e6c3c9c026543749a8f12f762e
django-yslow / utils.py
| 8873ff8f » | mallipeddi | 2008-05-21 | 1 | from django.conf import settings | |
| 2 | |||||
| 3 | def should_optimize(): | ||||
| 4 | """Is optimization turned ON or OFF? | ||||
| 5 | |||||
| 6 | If settings has a YSLOW_OPTIMIZE flag, use that. | ||||
| 7 | Else use the global Django project DEBUG flag. | ||||
| 8 | """ | ||||
| 9 | if hasattr(settings, 'YSLOW_OPTIMIZE'): | ||||
| 10 | return settings.YSLOW_OPTIMIZE | ||||
| 11 | else: | ||||
| 12 | return settings.DEBUG | ||||
