~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to sphinxdoc/urls.py

  • Committer: franku
  • Date: 2016-07-02 12:38:06 UTC
  • mfrom: (404.2.56 widelands)
  • Revision ID: somal@arcor.de-20160702123806-q69u3d48s1prrxds
merged the django1_8 branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# encoding: utf-8
 
2
 
 
3
from django.conf.urls import *
 
4
from django.views.generic.list import ListView
 
5
 
 
6
from sphinxdoc import models
 
7
 
 
8
app_info = {
 
9
    'queryset': models.App.objects.all().order_by('name'),
 
10
    'template_object_name': 'app',
 
11
}
 
12
 
 
13
 
 
14
urlpatterns = patterns('sphinxdoc.views',
 
15
    url(
 
16
        r'^$',
 
17
        ListView.as_view(),
 
18
        app_info,
 
19
    ),
 
20
    url(
 
21
        r'^(?P<slug>[\w-]+)/search/$',
 
22
        'search',
 
23
        name='doc-search',
 
24
    ),
 
25
    url(
 
26
        r'^(?P<slug>[\w-]+)/_images/(?P<path>.*)$',
 
27
        'images',
 
28
    ),
 
29
    url(
 
30
        r'^(?P<slug>[\w-]+)/_source/(?P<path>.*)$',
 
31
        'source',
 
32
    ),
 
33
    url(
 
34
        r'^(?P<slug>[\w-]+)/_objects/$',
 
35
        'objects_inventory',
 
36
        name='objects-inv',
 
37
    ),
 
38
    url(
 
39
        r'^(?P<slug>[\w-]+)/$',
 
40
        'documentation',
 
41
        {'url': ''},
 
42
        name='doc-index',
 
43
    ),
 
44
    url(
 
45
        r'^(?P<slug>[\w-]+)/(?P<url>(([\w-]+)/)+)$',
 
46
        'documentation',
 
47
        name='doc-detail',
 
48
    ),
 
49
)