コード例 #1
0
ファイル: urls.py プロジェクト: meilinger/firecares
from django.contrib.auth.decorators import login_required
from django.contrib.auth.decorators import user_passes_test, permission_required
from django.views.decorators.csrf import csrf_exempt
from sitemaps import BaseSitemap, DepartmentsSitemap

admin.autodiscover()
v1_api = Api(api_name="v1")
v1_api.register(StaffingResource())
v1_api.register(FireStationResource())
v1_api.register(FireDepartmentResource())

sitemaps = {"base": BaseSitemap, "departments": DepartmentsSitemap}

urlpatterns = patterns(
    "",
    url(r"^$", Home.as_view(), name="firestation_home"),
    (r"^api/", include(v1_api.urls)),
    url(r"^", include("firecares.firestation.urls")),
    url(r"^contact-us/$", ContactUs.as_view(), name="contact_us"),
    url(
        r"^contact-us/thank-you/$",
        TemplateView.as_view(template_name="contact/thank_you.html"),
        name="contact_thank_you",
    ),
    (r"^accounts/", include("registration.backends.default.urls")),
    url(r"^account-request/$", csrf_exempt(AccountRequestView.as_view()), name="account_request"),
    url(r"^thank-you/$", ShowMessage.as_view(), name="show_message"),
    url(r"^login/$", "django.contrib.auth.views.login", name="login", kwargs={"template_name": "accounts/login.html"}),
    url(
        r"^password-reset/$",
        "django.contrib.auth.views.password_reset",
コード例 #2
0
ファイル: urls.py プロジェクト: sbaxter/firecares
from django.views.generic import TemplateView
from .firecares_core.forms import FirecaresPasswordResetForm
from .firecares_core.views import ForgotUsername
from .firestation.api import StaffingResource, FireStationResource, FireDepartmentResource
from tastypie.api import Api
from firestation.views import Home

admin.autodiscover()
v1_api = Api(api_name='v1')
v1_api.register(StaffingResource())
v1_api.register(FireStationResource())
v1_api.register(FireDepartmentResource())


urlpatterns = patterns('',
    url(r'^$', cache_page(60 * 60 * 24)(Home.as_view()), name='firestation_home'),
    (r'^api/', include(v1_api.urls)),
    url(r'^', include('firecares.firestation.urls')),
    (r'^accounts/', include('registration.backends.default.urls')),
    url(r'^login/$', 'django.contrib.auth.views.login', name='login', kwargs={'template_name': 'accounts/login.html'}),
    url(r'^password-reset/$', 'django.contrib.auth.views.password_reset',
        name='password_reset',
        kwargs={'template_name': 'registration/password/password_reset_form.html',
                'password_reset_form': FirecaresPasswordResetForm}),
    url(r'^password-reset/done/$', 'django.contrib.auth.views.password_reset_done',
        name='password_reset_done',
        kwargs={'template_name': 'registration/password/password_reset_done.html'}),
    url(r'^password-reset/confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})$',
        'django.contrib.auth.views.password_reset_confirm', name='password_reset_confirm',
        kwargs={'template_name': 'registration/password/password_reset_confirm.html'}),
    url(r'^password-reset/complete/$', 'django.contrib.auth.views.password_reset_complete',
コード例 #3
0
ファイル: urls.py プロジェクト: haytastan/vida
from django.contrib.sites.models import Site

admin.autodiscover()
v1_api = Api(api_name='v1')
v1_api.register(StaffingResource())
v1_api.register(PersonResource())
v1_api.register(ShelterResource())
v1_api.register(FileItemResource())
v1_api.register(FaceSearchResource())
v1_api.register(TilesetResource())

admin.site.unregister(Site)


urlpatterns = patterns('',
    url(r'^$', Home.as_view(), name='firestation_home'),
    (r'^api/', include(v1_api.urls)),
    url(r'^', include('vida.firestation.urls')),
    url(r'^', include('vida.vida.urls')),
    (r'^accounts/', include('registration.backends.default.urls')),
    url(r'^login/$', 'django.contrib.auth.views.login', name='login', kwargs={'template_name': 'accounts/login.html'}),
    url(r'^password-reset/$', 'django.contrib.auth.views.password_reset',
        name='password_reset',
        kwargs={'template_name': 'registration/password/password_reset_form.html',
                'password_reset_form': VIDAPasswordResetForm}),
    url(r'^password-reset/done/$', 'django.contrib.auth.views.password_reset_done',
        name='password_reset_done',
        kwargs={'template_name': 'registration/password/password_reset_done.html'}),
    url(r'^password-reset/confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})$',
        'django.contrib.auth.views.password_reset_confirm', name='password_reset_confirm',
        kwargs={'template_name': 'registration/password/password_reset_confirm.html'}),
コード例 #4
0
ファイル: urls.py プロジェクト: tbuffington7/firecares
v1_api.register(StaffingResource())
v1_api.register(FireStationResource())
v1_api.register(FireDepartmentResource())
v1_api.register(StaffingStationRollupResource())
v1_api.register(GetServiceAreaInfo())
v1_api.register(GetEFFFInfo())
v1_api.register(WeatherWarningResource())

sitemaps = {
    'base': BaseSitemap,
    'departments': DepartmentsSitemap,
}

urlpatterns = patterns(
    '',
    url(r'^$', Home.as_view(), name='firestation_home'),  # noqa
    url(r'^(?i)IAFF/?$', Home.as_view(), name='firestation_iaff_home'),
    (r'^api/', include(v1_api.urls)),
    url(r'^', include('firecares.firestation.urls')),
    url(r'^accounts/login/', page_not_found),
    url(r'^contact-us/$', ContactUs.as_view(), name='contact_us'),
    url(r'^contact-us/thank-you/$',
        TemplateView.as_view(template_name='contact/thank_you.html'),
        name='contact_thank_you'),
    (r'^accounts/', include('firecares.firecares_core.ext.registration.urls')),
    url(r'^account-request/$',
        AccountRequestView.as_view(),
        name='account_request'),
    url(r'^thank-you/$', ShowMessage.as_view(), name='show_message'),
    url(r'^login/$',
        'django.contrib.auth.views.login',