コード例 #1
0
ファイル: urls.py プロジェクト: shaliniram/globetrot
from django.contrib import admin
from django.conf import settings
from django.urls import path, include
from django.conf.urls.static import static

from main.views import IndexPageView, ChangeLanguageView, AboutView, ExploreView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', IndexPageView.as_view(), name='index'),
    path('i18n/', include('django.conf.urls.i18n')),
    path('language/', ChangeLanguageView.as_view(), name='change_language'),
    path('about/', AboutView.as_view(), name='about_us'),
    path('accounts/', include('accounts.urls')),
    path('location/', include('location.urls')),
    path('explore/', ExploreView.as_view(), name='explore'),
]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
コード例 #2
0
from django.conf.urls import url

from main.views import (IndexView, AboutView, TermsView, SupportUsView,
                        HeroesView, WelcomeView, SigninView, SignoutView,
                        SignupView, DashboardView, DashboardDetailView,
                        ResetPasswordView, ChangeForgottenPasswordView,
                        VerifyAccountView, SettingsView, ChangePasswordView)

urlpatterns = [
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^about/$', AboutView.as_view(), name='about'),
    url(r'^terms/$', TermsView.as_view(), name='terms'),
    url(r'^support-us/$', SupportUsView.as_view(), name='support-us'),
    url(r'^heroes/$', HeroesView.as_view(), name='heroes'),
    url(r'^welcome/$', WelcomeView.as_view(), name='welcome'),
    url(r'^auth/signin/$', SigninView.as_view(), name='signin'),
    url(r'^auth/signout/$', SignoutView.as_view(), name='signout'),
    url(r'^auth/signup/$', SignupView.as_view(), name='signup'),
    url(r'^auth/reset-password/$',
        ResetPasswordView.as_view(),
        name='reset-password'),
    url(r'^auth/change-forgotten-password/$',
        ChangeForgottenPasswordView.as_view(),
        name='change-forgotten-password'),
    url(r'^auth/verify-account/$',
        VerifyAccountView.as_view(),
        name='verify-account'),
    url(r'^dashboard/$', DashboardView.as_view(), name='dashboard'),
    url(r'^dashboard/(?P<object_type>.+)/(?P<object_id>.+)$',
        DashboardDetailView.as_view(),
        name='dashboard-detail'),
コード例 #3
0
ファイル: urls.py プロジェクト: jarus/hopper.pw
    HomeView,
    OverviewView,
    HostView,
    DeleteHostView,
    AboutView,
    HelpView,
    GenerateSecretView,
    DomainOverwievView,
    DeleteDomainView,
)
from api.views import MyIpView, DetectIpView, NicUpdateView, AuthorizedNicUpdateView

urlpatterns = patterns(
    "",
    url(r"^$", HomeView.as_view(), name="home"),
    url(r"^about/$", AboutView.as_view(), name="about"),
    url(r"^legal/$", TemplateView.as_view(template_name="main/legal.html"), name="legal"),
    url(r"^help/$", HelpView.as_view(), name="help"),
    url(r"^overview/$", OverviewView.as_view(), name="overview"),
    url(r"^host/(?P<pk>\d+)/$", HostView.as_view(), name="host_view"),
    url(r"^generate_secret/(?P<pk>\d+)/$", GenerateSecretView.as_view(), name="generate_secret_view"),
    url(r"^host/(?P<pk>\d+)/delete/$", DeleteHostView.as_view(), name="delete_host"),
    url(r"^domain_overview/$", DomainOverwievView.as_view(), name="domain_overview"),
    url(r"^domain/(?P<pk>\d+)/delete/$", DeleteDomainView.as_view(), name="delete_domain"),
    url(r"^myip$", MyIpView),
    url(r"^detectip/$", DetectIpView),
    url(r"^detectip/(?P<secret>\w+)/$", DetectIpView),
    url(r"^nic/update$", NicUpdateView),
    url(r"^nic/update_authorized$", AuthorizedNicUpdateView, name="nic_update_authorized"),
)
コード例 #4
0
"""
Urls de la aplicacion main
"""
from main.views import index, AboutView, ContactUsView  # Nombre de la vista
from django.urls import path

app_name = "main"
urlpatterns = [
    path("", index, name="index"),

    # Acerca de
    path("acerca-de/", AboutView.as_view(), name="about"),
    path("contactanos/", ContactUsView.as_view(), name="contact"),

]
コード例 #5
0
ファイル: urls.py プロジェクト: mateuszhryciuk/JSart
from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
from main.views import Home, ContactEmail, AboutView, PortfolioView, ProjectView, AddProjectView, AuthorsView, SuccessView, RunProjectScript

app_name = 'main'
urlpatterns = [
    path('main/', Home.as_view(), name="home"),
    path('project/<int:id>', ProjectView.as_view(), name="project_view"),
    path('run_project/<int:id>', RunProjectScript.as_view(), name="runscript"),
    path('projects/', PortfolioView.as_view(), name="portfolio"),
    path('about/', AboutView.as_view(), name="about"),
    path('contact/', ContactEmail.as_view(), name="contact"),
    path('success/', SuccessView.as_view(), name='success'),
    path('add_project/', AddProjectView.as_view(), name="add_project"),

    #authors
    path('authors/', AuthorsView.as_view(), name="authors"),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

# if settings.DEBUG:
#     urlpatterns += path(
#         'django.views.static',
#         (r'^media/(?P<path>.*)',
#         'serve',
#         {'document_root': settings.MEDIA_ROOT}), )
コード例 #6
0
ファイル: urls.py プロジェクト: mes-shahadat/django-basics
from django.urls import path
from main.views import HomeView, ContactView, AboutView, navigateView, ClearcacheView
from django.views.generic.base import RedirectView
from django.views.decorators.cache import cache_page

urlpatterns = [

    # ================================ home, contact, about urls ===========================================
    path('', HomeView.as_view(), name='homeurl'),
    path('contact/', ContactView.as_view(), name='contacturl'),
    path('contactcache/',
         cache_page(30)(ContactView.as_view()),
         name='contactcacheurl'),
    #cache will update after every 30 seconds
    path('about/', AboutView.as_view(), name='abouturl'),
    path('clearcache/', ClearcacheView.as_view(), name='clearcacheurl'),
    path('debug/', navigateView.as_view(), name='debugurl'),

    # ====================================== redirect urls =================================================
    path('home/', RedirectView.as_view(url='/'), name='homeurl'),
    path('index/',
         RedirectView.as_view(pattern_name='homeurl'),
         name='indexurl'),
    #if dynameic url has value and if nameurl is used instead of redirecting to a url then the nameurl will get the dynamic value also
    path('google/',
         RedirectView.as_view(url='https://www.google.com'),
         name='googleurl'),
]
コード例 #7
0
from api.views import (MyIpView, DetectIpView, NicUpdateView,
                       AuthorizedNicUpdateView)
from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from main.views import (HomeView, OverviewView, HostView, DeleteHostView,
                        AboutView, HelpView, GenerateSecretView,
                        DomainOverwievView, DeleteDomainView, ThankYouView,
                        RegistrationSuccessView)
from stats.views import StatsView

urlpatterns = patterns(
    '',
    url(r'^$', HomeView.as_view(), name="home"),
    url(r'^about/$', AboutView.as_view(), name="about"),
    url(r'^thank_you/$', ThankYouView.as_view(), name="thank_you"),
    url(r'^welcome/$', RegistrationSuccessView.as_view(), name="welcome"),
    url(r'^legal/$',
        TemplateView.as_view(template_name='main/legal.html'),
        name="legal"),
    url(r'^help/$', HelpView.as_view(), name="help"),
    url(r'^stats/$', StatsView.as_view(), name="stats"),
    url(r'^overview/$', OverviewView.as_view(), name='overview'),
    url(r'^host/(?P<pk>\d+)/$', HostView.as_view(), name='host_view'),
    url(r'^generate_secret/(?P<pk>\d+)/$',
        GenerateSecretView.as_view(),
        name='generate_secret_view'),
    url(r'^host/(?P<pk>\d+)/delete/$',
        DeleteHostView.as_view(),
        name='delete_host'),
    url(r'^domain_overview/$',
        DomainOverwievView.as_view(),
コード例 #8
0
ファイル: urls.py プロジェクト: RedSunEmpire/hopper.pw
from api.views import (
    MyIpView, DetectIpView, NicUpdateView, AuthorizedNicUpdateView)
from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from main.views import (
    HomeView, OverviewView, HostView, DeleteHostView, AboutView, HelpView,
    GenerateSecretView, DomainOverwievView, DeleteDomainView, ThankYouView,
    RegistrationSuccessView
)
from stats.views import StatsView


urlpatterns = patterns(
    '',
    url(r'^$', HomeView.as_view(), name="home"),
    url(r'^about/$', AboutView.as_view(), name="about"),
    url(r'^thank_you/$', ThankYouView.as_view(), name="thank_you"),
    url(r'^welcome/$', RegistrationSuccessView.as_view(), name="welcome"),
    url(r'^legal/$',
        TemplateView.as_view(template_name='main/legal.html'), name="legal"),
    url(r'^help/$', HelpView.as_view(), name="help"),
    url(r'^stats/$', StatsView.as_view(), name="stats"),
    url(r'^overview/$', OverviewView.as_view(), name='overview'),
    url(r'^host/(?P<pk>\d+)/$', HostView.as_view(), name='host_view'),
    url(r'^generate_secret/(?P<pk>\d+)/$',
        GenerateSecretView.as_view(), name='generate_secret_view'),
    url(r'^host/(?P<pk>\d+)/delete/$',
        DeleteHostView.as_view(), name='delete_host'),
    url(r'^domain_overview/$',
        DomainOverwievView.as_view(), name='domain_overview'),
    url(r'^domain/(?P<pk>\d+)/delete/$',
コード例 #9
0
ファイル: urls.py プロジェクト: maremaremare/nashaletopis
urlpatterns = patterns('',
                       url(r'^$',
                           HomepageView.as_view()),

                       # Examples:
                       # url(r'^$', 'nashaletopis.views.home', name='home'),
                       url(r'^stories/',
                           include('stories.urls', namespace='stories',)),
                       url(r'^radio/',
                           include('radio.urls', namespace='radio',)),
                       url(r'^map/',
                           include('helpmap.urls', namespace='helpmap',)),
                       url(r'^help/',
                           include('help.urls', namespace='help',)),
                       url(r'^aboutus',
                           AboutView.as_view(template_name='about.html')),

                       # Uncomment the admin/doc line below to enable admin documentation:
                       # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

                       # Uncomment the next line to enable the admin:
                       url(r'^autocomplete/', include('autocomplete_light.urls')),
                       url(r'^captcha/', include('captcha.urls')),
                       url(r'^admin/', include('smuggler.urls')),
                       url(r'^admin/', include(admin.site.urls)),
                       )
if settings.DEBUG:
    urlpatterns = patterns('',
                           url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
                               {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
                           url(r'',
コード例 #10
0
ファイル: urls.py プロジェクト: tdhuynh/la-nails-spa
from django.conf.urls import url
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static

from main.views import IndexView, AboutView, ContactView, ServicesView

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', IndexView.as_view(), name='index_view'),
    url(r'^about$', AboutView.as_view(), name='about_view'),
    url(r'^contact$', ContactView.as_view(), name='contact_view'),
    url(r'^services$', ServicesView.as_view(), name='services_view')
]
コード例 #11
0
from django.conf.urls import patterns, include, url

from main.views import AboutView

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns(
    '',
    url(r'^$', AboutView.as_view(), name='home'),
    url(r'^admin/', include(admin.site.urls)),
)
コード例 #12
0
ファイル: urls.py プロジェクト: durianpy/durianpy
from django.conf.urls import patterns, include, url

# View
from main.views import IndexView, AboutView, ContactView, ArchiveView


urlpatterns = patterns('',
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^about$', AboutView.as_view(), name='about'),
    url(r'^contact$', ContactView.as_view(), name='contact'),
    url(r'^archive$', ArchiveView.as_view(), name='archive'),
)

# Apps
urlpatterns += patterns('',
    url(r'^meetups/', include('meetups.urls')),
)
コード例 #13
0
from django.contrib import admin
from django.urls import path, include
from main.views import HomeView, consent, daily_emails, autologin, logout_user, take_survey, FaqView, VisionView, \
    AboutView, DataView, TeamView, set_language_custom, delete_all_openhuman_files, delete_all

urlpatterns = [
    path("admin/", admin.site.urls),
    path("", HomeView.as_view(), name="home"),
    path("autologin/<int:oh_id>/", autologin, name="autologin"),
    path("consent/", consent, name="consent"),
    path("daily_emails/", daily_emails, name="daily_emails"),
    path("logout/", logout_user, name="logout"),
    path("survey/", take_survey, name="take_survey"),
    path("team/", TeamView.as_view(), name="team"),
    path("faq/", FaqView.as_view(), name="faq"),
    # path("vision/", VisionView.as_view(), name="vision"),
    path("about/", AboutView.as_view(), name="about"),
    path("data/", DataView.as_view(), name="data"),
    path("delete-all-openhuman-files/",
         delete_all_openhuman_files,
         name="delete_all_openhuman_files"),
    path("delete-all/", delete_all, name="delete_all"),
    path("i18n/", set_language_custom, name="set_language_custom"),
]

urlpatterns += [path("openhumans/", include("openhumans.urls"))]
コード例 #14
0
from django.conf.urls import patterns, include, url

from main.views import AboutView

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    url(r'^$', AboutView.as_view(), name='home'),

    url(r'^admin/', include(admin.site.urls)),
)