Esempio n. 1
0
"""geeksportal_website URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from main.views import IndexPageView, ChangeLanguageView, HomePageView, ProfileView

urlpatterns = [
    path('admin/', admin.site.urls, name='admin'),
    path('profile/', ProfileView.as_view(), name='profile'),
    path('accounts/', include('accounts.urls'), name='accounts'),
    path('tutorials/', include('tutorials.urls'), name='tutorial'),
    path('forum/', HomePageView.as_view(), name='home'),
    path('', IndexPageView.as_view(), name='index'),
    path('language/', ChangeLanguageView.as_view(), name='change_language'),
    path('forum/post/<int:post_id>', HomePageView.as_view(),
         name='post_reply'),
]
Esempio n. 2
0
from django.conf.urls import url, include
from modernrpc.views import RPCEntryPoint

from main.views import HomePageView

app_name = 'main'

urlpatterns = [
    url(r'^$', HomePageView.as_view()),
    url(r'^rpc', RPCEntryPoint.as_view(enable_doc=True)),
]
Esempio n. 3
0
from django.conf.urls import url, include
from django.contrib import admin
from . import views
from main.views import HomePageView, UserCreateView

#urlpatterns = [
#    url(r'', views.home, name='home'),
#    url(r'', UserList.as_view() ),
#    url(r'^$', views.HomePageView.as_view(), name='home'), # Notice the URL has been named
#    url(r'^about/$', views.AboutPageView.as_view(), name='about'),
#    url(r'^data/$', views.DataPageView.as_view(), name='data'),  # Add this URL pattern
#]

urlpatterns = (
    url(r'', HomePageView.as_view(), name='homepage'),
    url(r'create/$', UserCreateView.as_view(), name='create_user'),
)
Esempio n. 4
0
"""watcher URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin
from main.views import CustomFormView, FormResponsesListView
from main.views import HomePageView
from main.views import CreateEditFormView

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', HomePageView.as_view(), name='home'),
    url(r'^form/(?P<form_pk>\d+)/$', CustomFormView.as_view(), name='custom-form'),
    url(r'^form/(?P<form_pk>\d+)/responses/$', FormResponsesListView.as_view(), name='form-responses'),
    url(r'^form/new/$', CreateEditFormView.as_view(), name='create-form'),
    url(r'^form/(?P<form_pk>\d+)/edit/$', CreateEditFormView.as_view(), name='edit-form'),
]
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth import views as auth_views
from django.urls import include, path

from main.views import HomePageView, MapView

urlpatterns = [
    path('', HomePageView.as_view(), name='home'),
    path('map/', MapView.as_view(), name='map'),
    path('admin/', admin.site.urls),
    path('accounts/', include('registration.backends.hmac.urls')),
    path('api/', include('nodes.urls')),
    path('login/',
         auth_views.login, {'template_name': 'login.html'},
         name='login'),
    path('logout/', auth_views.logout, {'next_page': '/'}, name='logout'),
]

if settings.DEBUG:
    urlpatterns += [] + static(settings.MEDIA_URL,
                               document_root=settings.MEDIA_ROOT)
Esempio n. 6
0
from django.urls import path

from main.views import LoginPageView, LogoutPageView, ComplexMeasurementsView, RegisterUserView, HomePageView, addComplexMeasurement, ComplexMeasurementsDelete
from . import views
from rest_framework.urlpatterns import format_suffix_patterns
from django.conf.urls import url

urlpatterns = [
    path('', HomePageView.as_view(), name='index'),
    url(r'^login/$', LoginPageView.as_view(), name='login'),
    url(r'^logout/', LogoutPageView.as_view(), name='logout'),
    url(r'^register/$', RegisterUserView.as_view(), name='register'),
    url(r'^complexMeasurements/$', ComplexMeasurementsView.as_view(), name='complex_measurements'),
    url(r'^monitors/$', views.monitors, name='monitors'),
    url(r'^monitors/(?P<monitor_id>[0-9]+)/$', views.monitors_detail),
    url(r'^monitors/(?P<monitor_id>[0-9]+)/download_monitor_data', views.downloadMonitorDetails),
    url(r'^monitors/(?P<monitor_id>[0-9]+)/get_monitor_hosts', views.getMonitorHosts),
    url(r'^monitors/(?P<monitor_list>[\w\-]+)/get_last_measurements_from_monitor_list', views.getLastMeasurementsFromMonitorListView),
    url(r'^monitors/(?P<monitor_id>[0-9]+)/get_last_measurements', views.getLastMeasurementsView),
    url(r'^monitors/(?P<monitor_id>[0-9]+)/check_active_sensors', views.checkActiveSensors),
    url(r'^monitors/(?P<monitor_id>[0-9]+)/hosts/(?P<host_id>[0-9]+)/$', views.hosts_detail),
    url(r'^monitors/(?P<monitor_id>[0-9]+)/hosts/(?P<host_id>[0-9]+)/historicalMeasurements/$', views.historical_measurements),
    url(r'^monitors/(?P<monitor_id>[0-9]+)/hosts/(?P<host_id>[0-9]+)/refresh_chart_measurements',
        views.refreshChartMeasurments),
    url(r'^monitors/(?P<monitor_id>[0-9]+)/hosts/(?P<host_id>[0-9]+)/metrics/(?P<metric_id>[0-9]+)/$',
        views.metrics_detail),
    url(r'^search/$', views.search, name='search'),
    url(r'^search/search_host/', views.search_host, name='search_host'),
    url(r'^monitors/(?P<monitor_id>[0-9]+)/hosts/(?P<host_id>[0-9]+)/add_custom_measurement_page/add_complex_measurement/$', addComplexMeasurement.as_view()),
    url(r'^monitors/(?P<monitor_id>[0-9]+)/hosts/(?P<host_id>[0-9]+)/add_custom_measurement_page/$', views.add_custom_measurement_page_view),
    url(r'^customDelete/(?P<custom_id>[0-9]+)', ComplexMeasurementsDelete.as_view(), name='customDelete'),
Esempio n. 7
0
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.urls import path
from django.views.decorators.csrf import ensure_csrf_cookie
from django.views.generic import TemplateView

from main.text import chapters
from main.views import FrontendAppView, HomePageView, api_view, timeout_view

home_view = HomePageView.as_view()
urlpatterns = [
    path('api/<method_name>/', api_view),
    path('home/', home_view),
    path('', home_view),
    path('course/', ensure_csrf_cookie(FrontendAppView.as_view())),
    path(
        'toc/',
        TemplateView.as_view(template_name="toc.html",
                             extra_context=dict(chapters=chapters))),
    path('timeout/', timeout_view),
]
Esempio n. 8
0
from events.views import *
from filebrowser.sites import site



def robots(request):
    html = 'User-agent: *\r\nDisallow: /siteadmin/admin'
    return HttpResponse(html)

def yandex(request):
    html = '48cf5d8bcfc1'
    return HttpResponse(html)

urlpatterns = patterns('',
                       url(r'^$',
                           cache_page(600)(HomePageView.as_view())),

                       # Examples:
                       # url(r'^$', 'nowarkongress.views.home', name='home'),
                       url(r'^0a0915f4dc4f.html', yandex),
                       url(r'^robots.txt', robots),
                       url(r'^feed/$', LatestEntriesFeed()),
                       url(r'^search/', SearchView.as_view()),
                       url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}),
                       url(r'^login-form/$', LoginView.as_view()),
                       url(r'^loginfailed/$', TemplateView.as_view(template_name='loginfailed.html')),
                       url(r'^signature/added/$', TemplateView.as_view(template_name='addedsignature.html')),
                       url(r'^comments/', include('fluent_comments.urls')),
                       url(r'^profile/messages/', include('django_messages.urls')),
                       url(r'^profile/', include('person.urls', namespace='people')),
                       url(r'^people/(?P<pk>\d+)/all/$', AuthorListView.as_view(), name='peoplecontentlist'),
Esempio n. 9
0
from django.urls import path
from main.views import HomePageView
from . import views

app_name = 'main'  # here for namespacing the urls

urlpatterns = [
    path("", views.login_request, name="login"),
    path("homepage/", HomePageView.as_view(), name="homepage"),
    path("register/", views.register, name="register"),
    path("logout", views.logout_request, name="logout"),
    path("account", views.account, name="account"),
]
Esempio n. 10
0
from django.conf.urls import include, url
from django.contrib import admin

from main.views import HomePageView, CreteUserAndLogin
from django.core.urlresolvers import reverse_lazy

admin.autodiscover()

urlpatterns = [
    url(r'^$', HomePageView.as_view()),
    url(r"^groups/", include('groups.urls', namespace='group')),
    url(r"^students/", include('stud.urls', namespace='student')),
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^index/$', HomePageView.as_view(), name='home'),
    url(r'^login/',
        'django.contrib.auth.views.login', {'template_name': 'login.html'},
        name='login'),
    url(r'^logout/$', 'django.contrib.auth.views.logout',
        {'next_page': reverse_lazy('home')}),
    url(r'^new/user/$', CreteUserAndLogin.as_view(), name='new_user'),
]
Esempio n. 11
0
from main.views import (
    salepoint, contact, HomePageView, CreateRequest, LostBaggage,
    LostBaggageRu, HomePageViewRu
    )
from main.sitemap import StaticViewSitemap

sitemaps = {
    'static': StaticViewSitemap,
}

urlpatterns = patterns(
    '',
    # url(r'^blog/', include('blog.urls')),
    url(
        r'^$',
        HomePageView.as_view(template_name="index.html"),
        name='indexua'),
    url(
        r'^ru$',
        HomePageViewRu.as_view(template_name="ru/index.html"),
        name='indexru'),


    url(r'^lost_baggage/$', LostBaggage.as_view(), name='lost_baggage'),
    url(r'^ru/lost_baggage/$',
        LostBaggageRu.as_view(),
        name='ru_lost_baggage'),

    url(r'^create_request/$', CreateRequest.as_view(), name='create_request'),
    # url(r'^point', SalePointAPI.as_view(), name='salepoints'),
    url(r'^point', salepoint, name='salepoints'),
Esempio n. 12
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
import settings

from main.views import HomePageView, CreteUserAndLogin

admin.autodiscover()

urlpatterns = patterns('',

    url(r'^$', HomePageView.as_view()),
    
    url(r"^groups/", include('groups.urls', namespace='group')),
#    url(r"^student/", include('people.urls', namespace='student')),
    
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^admin/', include(admin.site.urls)),
    
    url(r'^index/$', HomePageView.as_view(), name='home'),
    url(r'^login/', 'django.contrib.auth.views.login', {'template_name': 'login.html'}, name='login'),
    url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/index/'}),
    url(r'^new/user/$', CreteUserAndLogin.as_view(), name='new_user'),

)
Esempio n. 13
0
The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin
from django.conf.urls import include, url
from django.contrib import admin
from main.views import HomePageView

urlpatterns = [
    url(r'^twintails/', admin.site.urls),
    url(r'^api/', include('osb_api.urls')),
    url(r'^showcase/', include('showcase.urls')),
    url(r'^user/', include('main.urls_user')),
    url(r'^learn/', include('sphinxdoc.urls')),
    url(r'^pages/', include('django.contrib.flatpages.urls')),
    url(r'^$', HomePageView.as_view(), name='index'),
    url(r'^photologue/', include('photologue.urls', namespace='photologue')),
]
from django.conf.urls import url

from main.views import CreateEditFormView
from main.views import CustomFormView
from main.views import FormResponsesListView
from main.views import HomePageView

urlpatterns = [
    url(r'^$', HomePageView.as_view(), name='home'),
    url(r'^form/(?P<form_pk>\d+)/$', CustomFormView.as_view(), name='custom-form'),
    url(r'^form/(?P<form_pk>\d+)/responses/$', FormResponsesListView.as_view(), name='form-responses'),

    url(r'form/new/$', CreateEditFormView.as_view(), name='create-form'),
    url(r'form/(?P<form_pk>\d+)/edit/$', CreateEditFormView.as_view(), name='edit-form'),
]
Esempio n. 15
0
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 (HomePageView, searchTerm)
urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r"^$", HomePageView.as_view(), name="home"),
    url(r'^search/', searchTerm, name="search")
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
Esempio n. 16
0
 def test_root_url_resolves_to_home_page_view(self):
     found = resolve('/en/')
     self.assertEqual(found.func.__name__, HomePageView.as_view().__name__)