mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-31 20:13:46 +00:00 
			
		
		
		
	Enable testing minified files in dev
(imported from commit 257b8547849a85c447319d3d211f2c989616ce64)
This commit is contained in:
		| @@ -236,6 +236,11 @@ PIPELINE_YUI_BINARY     = '/usr/bin/env yui-compressor' | ||||
| # event handlers defined in HTML. | ||||
| PIPELINE_DISABLE_WRAPPER = True | ||||
|  | ||||
| # To use minified files in dev, uncomment: | ||||
| #PIPELINE = True | ||||
|  | ||||
| # You will need to run ./tools/update-prod-static after changing static files. | ||||
|  | ||||
|  | ||||
| USING_RABBITMQ = DEPLOYED | ||||
| # This password also appears in servers/configure-rabbitmq | ||||
|   | ||||
| @@ -85,4 +85,11 @@ urlpatterns = patterns('', | ||||
|     url(r'^notify_pointer_update$',         'zephyr.tornadoviews.notify_pointer_update'), | ||||
| ) | ||||
|  | ||||
| # Static file serving in dev is now handled by django.contrib.staticfiles | ||||
| if not settings.DEPLOYED: | ||||
|     use_prod_static = getattr(settings, 'PIPELINE', False) | ||||
|     static_root = os.path.join(settings.SITE_ROOT, | ||||
|         '../prod-static/serve' if use_prod_static else '../zephyr/static') | ||||
|  | ||||
|     urlpatterns += patterns('', | ||||
|         url(r'^static/(?P<path>.*)$', 'django.views.static.serve', | ||||
|             {'document_root': static_root})) | ||||
|   | ||||
| @@ -46,8 +46,12 @@ os.chdir(path.join(path.dirname(__file__), '..')) | ||||
| # and all of the processes they spawn. | ||||
| os.setpgrp() | ||||
|  | ||||
| for cmd in ['python manage.py runserver  %s localhost:%d' % (manage_args, django_port), | ||||
|             'python manage.py runtornado %s localhost:%d' % (manage_args, tornado_port)]: | ||||
| # Pass --nostatic because we configure static serving ourselves in | ||||
| # humbug/urls.py. | ||||
| for cmd in ['python manage.py runserver --nostatic %s localhost:%d' | ||||
|                 % (manage_args, django_port), | ||||
|             'python manage.py runtornado %s localhost:%d' | ||||
|                 % (manage_args, tornado_port)]: | ||||
|     subprocess.Popen(cmd, shell=True) | ||||
|  | ||||
| class Resource(resource.Resource): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user