Ejemplo n.º 1
0
"""URL mapping."""
from django.conf.urls import url

from demoproject.compat import patterns
from demoproject.lighttpd import views

urlpatterns = patterns(
    "demoproject.lighttpd.views",
    url(
        r"^optimized-by-middleware/$",
        views.optimized_by_middleware,
        name="optimized_by_middleware",
    ),
    url(
        r"^optimized-by-decorator/$",
        views.optimized_by_decorator,
        name="optimized_by_decorator",
    ),
)
Ejemplo n.º 2
0
from django.conf.urls import url

from demoproject.compat import patterns
from demoproject.path import views

urlpatterns = patterns(
    "",
    url(r"^static-path/$", views.static_path, name="static_path"),
    url(
        r"^dynamic-path/(?P<path>[a-zA-Z0-9_-]+\.[a-zA-Z0-9]{1,4})$",
        views.dynamic_path,
        name="dynamic_path",
    ),
)
Ejemplo n.º 3
0
from django.conf.urls import url

from demoproject.compat import patterns
from demoproject.virtual import views

urlpatterns = patterns(
    "",
    url(r"^text/$", views.TextDownloadView.as_view(), name="text"),
    url(r"^stringio/$", views.StringIODownloadView.as_view(), name="stringio"),
    url(r"^gerenated/$", views.GeneratedDownloadView.as_view(), name="generated"),
)
Ejemplo n.º 4
0
urlpatterns = patterns(
    "",
    # ObjectDownloadView.
    url(
        r"^object/",
        include("demoproject.object.urls",
                app_name="object",
                namespace="object"),
    ),
    # StorageDownloadView.
    url(
        r"^storage/",
        include("demoproject.storage.urls",
                app_name="storage",
                namespace="storage"),
    ),
    # PathDownloadView.
    url(r"^path/",
        include("demoproject.path.urls", app_name="path", namespace="path")),
    # HTTPDownloadView.
    url(r"^http/",
        include("demoproject.http.urls", app_name="http", namespace="http")),
    # VirtualDownloadView.
    url(
        r"^virtual/",
        include("demoproject.virtual.urls",
                app_name="virtual",
                namespace="virtual"),
    ),
    # Nginx optimizations.
    url(
        r"^nginx/",
        include("demoproject.nginx.urls", app_name="nginx", namespace="nginx"),
    ),
    # Apache optimizations.
    url(
        r"^apache/",
        include("demoproject.apache.urls",
                app_name="apache",
                namespace="apache"),
    ),
    # Lighttpd optimizations.
    url(
        r"^lighttpd/",
        include("demoproject.lighttpd.urls",
                app_name="lighttpd",
                namespace="lighttpd"),
    ),
    # An informative homepage.
    url(r"$", home, name="home"),
)
Ejemplo n.º 5
0
from django.conf.urls import url

from demoproject.compat import patterns
from demoproject.object import views

urlpatterns = patterns(
    "",
    url(
        r"^default-file/(?P<slug>[a-zA-Z0-9_-]+)/$",
        views.default_file_view,
        name="default_file",
    ),
    url(
        r"^another-file/(?P<slug>[a-zA-Z0-9_-]+)/$",
        views.another_file_view,
        name="another_file",
    ),
    url(
        r"^deserialized_basename/(?P<slug>[a-zA-Z0-9_-]+)/$",
        views.deserialized_basename_view,
        name="deserialized_basename",
    ),
    url(
        r"^inline-file/(?P<slug>[a-zA-Z0-9_-]+)/$",
        views.inline_file_view,
        name="inline_file",
    ),
)
Ejemplo n.º 6
0
from django.conf.urls import url

from demoproject.compat import patterns
from demoproject.http import views

urlpatterns = patterns(
    "",
    url(r"^simple_url/$", views.simple_url, name="simple_url"),
    url(r"^avatar_url/$", views.avatar_url, name="avatar_url"),
)