Revision a33b15e6 snf-stats-app/synnefo_stats/urls.py

b/snf-stats-app/synnefo_stats/urls.py
31 31
# interpreted as representing official policies, either expressed
32 32
# or implied, of GRNET S.A.
33 33

  
34
from django.conf.urls.defaults import patterns
34
from django.conf.urls.defaults import patterns, include
35
from snf_django.lib.api.utils import prefix_pattern
36
from synnefo_stats.stats_settings import BASE_PATH
35 37
from synnefo_stats.grapher import grapher
36 38

  
39
stats_patterns = patterns('',
40
    (r'^(?P<hostname>\S+)/(?P<graph_type>\S+)/$', grapher),
41
)
42

  
37 43
urlpatterns = patterns('',
38
    (r'^stats/(?P<hostname>\S+)/(?P<graph_type>\S+)/$', grapher),
44
    (prefix_pattern(BASE_PATH), include(stats_patterns)),
39 45
)

Also available in: Unified diff