peritus / django_templatecomponents

A django application that makes it easy organize your component source (javascript, css) right in your django templates to to make your website much faster.

This URL has Read+Write access

django_templatecomponents / urls.py
100644 15 lines (12 sloc) 0.453 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from django.conf.urls.defaults import *
from django.conf import settings
from django_templatecomponents.views import css, javascript
 
# In your urls.py use
#
# from django.conf import settings
# if settings.DEBUG:
# urlpatterns += patterns('', ('', include('django_templatecomponents.urls')))
 
urlpatterns = patterns('',
  (r'^%s(?P<group>.*).css$' % settings.MEDIA_URL[1:], css),
  (r'^%s(?P<group>.*).js$' % settings.MEDIA_URL[1:], javascript),
)