| 92 | | #_____________________________________ |
| 93 | | # REDIRECT |
| 94 | | # Redirect old PyLucid (with "index.py") to the new URLs. |
| 95 | | # Only usefull, if you have a old PyLucid page used. |
| 96 | | #(r'^index.py(.*?)$', 'PyLucid.index.redirect'), |
| 97 | | |
| 98 | | #_____________________________________ |
| 99 | | # STATIC FILES |
| 100 | | # Using this method is inefficient and insecure. |
| 101 | | # Do not use this in a production setting. Use this only for development. |
| 102 | | # http://www.djangoproject.com/documentation/static_files/ |
| 103 | | # |
| 104 | | # uncomment the lines, if you use the dajngo development server: |
| 105 | | #-------------------------------------------------------------------------- |
| 106 | | # ( |
| 107 | | # '^%s(?P<path>.*)$' % settings.MEDIA_URL.lstrip("/"), |
| 108 | | # 'django.views.static.serve', |
| 109 | | # {'document_root': './%s' % settings.MEDIA_URL} |
| 110 | | # ), |
| | 98 | |
| | 99 | |
| | 100 | if getattr(settings, "REDIRECT_OLD_PYLUCID_URL", False) == True: |
| | 101 | # Redirect old PyLucid (with "index.py") to the new URLs. |
| | 102 | # Only usefull, if you have a old PyLucid page used in the past ;) |
| | 103 | urls += ( |
| | 104 | r'^index.py(.*?)$', 'PyLucid.index.redirect' |
| | 105 | ), |
| | 106 | |
| | 107 | |
| | 108 | # serve static files |
| | 109 | if getattr(settings, "SERVE_STATIC_FILES", False) == True: |
| | 110 | # Should only enabled, if the django development server used. |
| | 111 | urls += ( |
| | 112 | '^%s(?P<path>.*)$' % settings.MEDIA_URL.lstrip("/"), |
| | 113 | 'django.views.static.serve', |
| | 114 | {'document_root': './%s' % settings.MEDIA_URL}, |
| | 115 | ), |
| | 116 | |
| | 117 | |