示例#1
0
    signup_view = "account.views.signup"
else:
    signup_view = "signup_codes.views.signup"


urlpatterns = patterns('',
    url(r'^$', direct_to_template, {
        "template": "homepage.html",
    }, name="home"),
    
    url(r'^admin/invite_user/$', 'signup_codes.views.admin_invite_user', name="admin_invite_user"),
    url(r'^account/signup/$', signup_view, name="acct_signup"),
    
    (r'^about/', include('about.urls')),
    (r'^account/', include('account.urls')),
    (r'^openid/(.*)', PinaxConsumer()),
    (r'^profiles/', include('basic_profiles.urls')),
    (r'^notices/', include('notification.urls')),
    (r'^announcements/', include('announcements.urls')),
    (r'^tagging_utils/', include('tagging_utils.urls')),
    (r'^comments/', include('threadedcomments.urls')),
    (r'^attachments/', include('attachments.urls')),
    
    (r'^groups/', include('basic_groups.urls')),
    (r'^tribes/', include('tribes.urls')),
    (r'^projects/', include('projects.urls')),
    
    (r'^admin/(.*)', admin.site.root),
)

if settings.SERVE_MEDIA:
示例#2
0
from django.views.generic.simple import direct_to_template

from account.openid_consumer import PinaxConsumer

from django.contrib import admin
admin.autodiscover()

import os

from wiki import models as wiki_models

urlpatterns = patterns(
    "",
    url(r"^$", direct_to_template, {"template": "homepage.html"}, name="home"),
    (r"^account/", include("account.urls")),
    (r"^openid/(.*)", PinaxConsumer()),
    (r"^profiles/", include("basic_profiles.urls")),
    (r"^notices/", include("notification.urls")),
    (r"^announcements/", include("announcements.urls")),
    (r"^tasks/", include("tasks.urls")),
    (r"^comments/", include("threadedcomments.urls")),
    (r"^paste/", include("dpaste.urls")),
    (r"^wiki/", include("wiki.urls")),
    (r"^attachments/", include("attachments.urls")),
    (r"^tagging_utils/", include("tagging_utils.urls")),

    # piston api
    (r"^api/", include("tasks_api.urls")),
    # haystack search
    (r"^search/", include("search_app.urls")),
    (r"^admin/(.*)", admin.site.root),