Пример #1
0
 def get_dashboard_view_context(self, name):
     """ Helper function to create a dashboard view and invoke
         it's get_context_data method
     """
     dashboard_view = DashboardView()
     view_args = {'name': 'dashboard1'}
     dashboard_view.kwargs = view_args
     assets = [
         'file.js', 'app/file.js', 'file.css',
         'app/file.css', 'some.js', 'app2/file.js',
         'some.css', 'app2/file.css',
         'dashboard/dashboard.css'
     ]
     with use_assets(*assets):
         context_data = dashboard_view.get_context_data(**view_args)
     return context_data
Пример #2
0
 def test_302_not_logged_in(self):
     request = self.rf.get('/dashboard/')
     request.user = AnonymousUser()
     resp = DashboardView.as_view()(request)
     self.assertEqual(resp.status_code, 302)
     self.assertEqual(
         resp._headers['location'][1], '/accounts/login/?next=/dashboard/')
Пример #3
0
 def setUp(self):
     self.view = DashboardView.as_view()
     self.request = fake_request(method='GET')
     self.request.META.update({
         'SERVER_NAME': 'globo.com',
         'SERVER_PORT': '80'
     })
     self.request.user.is_authenticated = lambda: True
Пример #4
0
 def setUp(self):
     self.view = DashboardView.as_view()
     self.request = fake_request(method='GET')
     self.request.META.update({
         'SERVER_NAME': 'globo.com',
         'SERVER_PORT': '80'
     })
     self.request.user.is_authenticated = lambda: True
Пример #5
0
    def _get_tags_repository(self, name_repository):
        token = DashboardView._get_token_user(self)
        headers = HEADERS_REPOSITORY_TOPIC
        url = URL_REPOSITORY_TOPIC.format(self.request.user, name_repository,
                                          token)
        response = requests.get(url, headers=headers)

        tags = self._format_tags_to_string(response.json())
        return tags
Пример #6
0
            def get_urls(self):
                from dashboard.views import DashboardView

                urlpatterns = super(MyAdminSite, self).get_urls()

                return urlpatterns + [
                    url(r'^dashboard/$',
                        self.admin_view(DashboardView.as_view()),
                        name='dashboard'),
                ]
Пример #7
0
    def tests_authenticated_dashboard_view(self):
        """
        GIVEN: Authenticated user
        WHEN: Accessing the dashboard view
        THEN: It should respond with 200 and render the view
        """
        request = self.factory.get(reverse("dashboard:dashboard"))
        request.user = self.user

        # Use this syntax for class-based views.
        response = DashboardView.as_view()(request)
        self.assertEqual(response.status_code, 200)
Пример #8
0
 def test_200_ok(self):
     # check 200 and that user can only see their projects
     logged_in_user = AuthenticatedUserFactory()
     other_user_project = ProjectFactory()
     logged_in_project = ProjectFactory(owner=logged_in_user)
     request = self.rf.get('/dashboard/')
     request.user = logged_in_user
     resp = DashboardView.as_view()(request)
     self.assertEqual(resp.status_code, 200)
     self.assertEqual(len(resp.context_data['object_list']), 1)
     self.assertEqual(
         resp.context_data['object_list'][0].pk, logged_in_project.pk)
     self.assertNotEqual(
         resp.context_data['object_list'][0].pk, other_user_project.pk)
Пример #9
0
    def form_valid(self, form):
        form_data = form.cleaned_data
        token = DashboardView._get_token_user(self)
        data_json = self.format_tags_to_json(form_data)
        headers = HEADERS_REPOSITORY_TOPIC
        url = URL_REPOSITORY_TOPIC.format(self.request.user,
                                          form_data['name_repository'], token)
        response = requests.put(url, headers=headers, data=data_json)

        if response.status_code == 200:
            messages.success(self.request, 'Tags alteradas com sucesso!')
            return redirect('dashboard')
        else:
            messages.error(self.request, 'Ocorreu um erro ao alterar a tag!')
            return render(self.request, 'edit_tag.html', {'form': form})
Пример #10
0
from django.conf.urls import patterns, url
from dashboard.views import DashboardView as EmptyView

urlpatterns = patterns(
    '', url(r'^$', EmptyView.as_view(), name='reports'),
    url(r'(?P<pk>[0-9]+)/?$', EmptyView.as_view(), name='report'))
Пример #11
0
from django.conf.urls import patterns, url

from questions.rest_views import QuestionCatalogueList, QuestionCatalogueDetail, QuestionCatalogueSeevcam, \
    QuestionDetails, QuestionListSeevcam, QuestionList
from dashboard.views import DashboardView as EmptyView

rest_patterns = patterns(
    '',
    url(r'^catalogue/?$', QuestionCatalogueList.as_view()),
    # Seevcam Scope
    url(r'^catalogue/seevcam/?$', QuestionCatalogueSeevcam.as_view()),
    url(r'^catalogue/seevcam/(?P<question_catalogue>[0-9]+)/list/?$',
        QuestionListSeevcam.as_view()),
    # Private Scope
    url(r'^catalogue/(?P<pk>[0-9]+)/?$', QuestionCatalogueDetail.as_view()),
    url(r'^catalogue/(?P<question_catalogue>[0-9]+)/list/?$',
        QuestionList.as_view()),
    url(r'^catalogue/(?P<question_catalogue>[0-9]+)/list/(?P<pk>[0-9]+)/?$',
        QuestionDetails.as_view()))

html_patterns = patterns(
    '', url(r'^$', EmptyView.as_view(), name='questions'),
    url(r'(?P<pk>[0-9]+)/?$', EmptyView.as_view(), name='openCatalogue'))

urlpatterns = rest_patterns + html_patterns
Пример #12
0
# -*-*- encoding: utf-8 -*-*-
from __future__ import absolute_import, unicode_literals

from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static

from arctic.generics import LoginView, LogoutView
from arctic.views import handler400, handler403, handler404, handler500  # noqa

from countries.views import CountryAPIView, CountryListView
from dashboard.views import DashboardView

urlpatterns = [
    url(r"^$", DashboardView.as_view(), name="index"),
    url(r"^login/$", LoginView.as_view(), name="login"),
    url(r"^logout/$", LogoutView.as_view(), name="logout"),
    url(r"^articles/", include("articles.urls", "articles")),
    url(r"^users/", include("arctic.users.urls", namespace="users")),
    url(r"^countries/$", CountryListView.as_view(), name="countries-list"),
    url(r"^countries-api/$", CountryAPIView.as_view(), name="countries-api"),
    url(r"^arctic/", include("arctic.urls", namespace="arctic")),
]

if settings.DEBUG:
    try:
        import debug_toolbar

        urlpatterns = [url(r"^__debug__/", include(debug_toolbar.urls))
                       ] + urlpatterns
    except ImportError:
Пример #13
0
from django.contrib import admin

from conference.views import ConferenceResponseView, CreateConfernceAPIView, ConferenceAnnounceView, ConferenceRetrieveAPIView, CallStatusView, ConferenceStatusView
from organization.views import HomeView, OrganizationCreateView, OrganizationInviteCreateView, OrganizationRetrieveView, MeRetrieveView
from invite.views import InviteView, UseInviteView, OrganizationOnboardingView, InviteOnboardingView
from dashboard.views import DashboardView

admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'escalator.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url('', include('social.apps.django_app.urls', namespace='social')),
    url(r'^$', HomeView.as_view(), name='home'),
    url(r'^dashboard/?$', DashboardView.as_view(), name='dashboard'),
    url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),

    url(r'^invite/(?P<id>\d+)/(?P<token>[\w-]+)/?$', InviteView.as_view(), name='start_invite'),
    url(r'^start/?$', UseInviteView.as_view(), name='use_invite'),
    url(r'^start/organization/?$', OrganizationOnboardingView.as_view(), name='onboard_organization'),
    url(r'^start/invite/?$', InviteOnboardingView.as_view(), name='onboard_invite'),

    url(r'^conf/(?P<conf_id>\d+)/?$', ConferenceResponseView.as_view(), name='conference_response'),
    url(r'^conf/(?P<conf_id>\d+)/announce/(?P<user_id>\d+)/?$', ConferenceAnnounceView.as_view(), name='conference_announce'),
    url(r'^voice/call/status/?$', CallStatusView.as_view(), name='voice_call_status'),
    url(r'^voice/conference/status/?$', ConferenceStatusView.as_view(), name='voice_conference_status'),

    url(r'^api/v1/me/?$', MeRetrieveView.as_view(), name='api_me'),
    url(r'^api/v1/organizations/(?P<pk>\d+)/conferences/?$', CreateConfernceAPIView.as_view(), name='api_create_conference'),
    url(r'^api/v1/organizations/(?P<pk>\d+)/invites/?$', OrganizationInviteCreateView.as_view(), name='api_invite_user'),
Пример #14
0
from django.conf.urls import include, url
from django.contrib.auth.decorators import login_required
from django.views.generic import TemplateView, RedirectView
from django.contrib import admin
admin.autodiscover()

import views
from patients.views import PatientsView
from dashboard.views import DashboardView

urlpatterns = [
    url(r'^setup/$', views.SetupView.as_view(), name='setup'),
    url(r'^welcome/$', views.DoctorWelcome.as_view(), name='welcome'),
    url(r'^dashboard/$', DashboardView.as_view(), name='dashboard'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'', include('social.apps.django_app.urls', namespace='social')),
    url(r'^checkin/$', DashboardView.as_view(), name='checkin'),
    url(r'^patients/$', PatientsView.as_view(), name='patients'),
]
Пример #15
0
from django.conf.urls import url
from dashboard.views import DashboardView, upload_file, delete_file, new_folder, update_file, download_file
from easyNAS.views import handler500

urlpatterns = [
	url(r'^$', DashboardView.as_view(), name="dashboard_home"),
	url(r'^folder_contents/$', DashboardView.as_view(), name="folder_contents"),
	url(r'^upload_file/$', upload_file, name="upload_file"),
	url(r'^delete_file/$', delete_file, name="delete_file"),
	url(r'^new_folder/$', new_folder, name="new_folder"),
	url(r'^update_file/$', update_file, name="update_file"),
	url(r'^download_file/$', download_file, name="download_file"),
	url(r'^error/$', handler500, name="dashboard_error"),
]
Пример #16
0
from django.conf.urls.defaults import *
from dashboard.views import DashboardView

urlpatterns = patterns('',
    url(r'', DashboardView.as_view()),
)
Пример #17
0
from django.conf.urls import include, url

from dashboard.views import (SeriesView, SeriesEdit, SeriesDelete,
                             WebsiteCreate, WebsiteSettings,
                             WebsiteSettingsInfo, SeriesCreate, VideoCreate,
                             VideoEdit, DashboardView, PaymentSettings,
                             stripe_auth, stripe_callback, VideoDelete,
                             WebsiteCustomize)

urlpatterns = [
    # url(r"^$", TemplateView.as_view(template_name="dashboard/dashboard.html"), name="dashboard"),
    url(r"^$", DashboardView.as_view(), name="dashboard"),

    # /websites/
    url(
        r"^websites/",
        include([

            # /websites/{website_id}
            url(r"^(?P<website_id>[0-9]+)/$",
                DashboardView.as_view(),
                name="websites_dashboard"),

            # /websites/create
            url(r"^create/$", WebsiteCreate.as_view(), name="websites_create"),

            # /websites/{website_id}/videos
            url(
                r'^(?P<website_id>[0-9]+)/videos/',
                include(
                    [
Пример #18
0
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Add an import:  from blog import urls as blog_urls
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""

from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin

from dashboard.views import DashboardView
from checkout.views import CheckoutAjaxView

from products.views import UserLibraryListView

urlpatterns = [
    url(r'^$', DashboardView.as_view(), name="dashboard"),
    #url(r'^test/$', CheckoutView.as_view(), name="test"),
    url(r'^checkout/$', CheckoutAjaxView.as_view(), name="checkout"),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^products/', include("products.urls", namespace='products')),
    url(r'^tags/', include("tags.urls", namespace='tags')),
    url(r'^seller/', include("sellers.urls", namespace='sellers')),
    url(r'^library/', UserLibraryListView.as_view(), name="library"),
] 

if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Пример #19
0
from django.urls import path
from django.conf.urls import url

from dashboard.views import DashboardView

urlpatterns = [
    url(r'^$', DashboardView.as_view()),
]
Пример #20
0
from django.conf.urls import patterns, url, include

from dashboard.views import DashboardView as EmptyView
from .rest_views import InterviewDetail, InterviewList, JobPositionList, InterviewQuestions

rest_patterns = patterns('',
                         url(r'interviews/(?P<pk>[0-9]+)/?$', InterviewDetail.as_view()),
                         url(r'interviews/(?P<pk>[0-9]+)/questions/?$', InterviewQuestions.as_view()),
                         url(r'jobPositions/?$', JobPositionList.as_view()),
                         url(r'interviews/?$', InterviewList.as_view()))


html_patterns = patterns('',
                         url(r'', include('answers.urls')),
                         url(r'', include('notes.urls')),
                         url(r'', include('events.urls')),
                         url(r'', include('overall_ratings.urls')),
                         url(r'^$', EmptyView.as_view(), name='interviews'),
                         url(r'(?P<pk>[0-9]+)/?$', EmptyView.as_view(), name='interview'),
                         url(r'^create/', EmptyView.as_view(), name='create-interview'))

urlpatterns = rest_patterns + html_patterns
Пример #21
0
from django.conf.urls import url, include
from django.contrib.auth.decorators import login_required

from dashboard.views import DashboardView

urlpatterns = [
    url(r'^$', login_required(DashboardView.as_view()), name='index'),
]
Пример #22
0
from django.conf.urls import patterns, url
from dashboard.views import DashboardView, AccountView

urlpatterns = patterns(
    '',
    url(r'^$', DashboardView.as_view(), name='dashboard-index'),
    url(r'^account/$', AccountView.as_view(), name='account'),
    url(r'^account/edit/$', 'member.views.profileedit', name="edit-profile"),
    url(r'^account/pass/$', 'member.views.passchange', name="change-password"),
    #       url(r'^profile/(?P<slug>[-\w]+)/$', 'member.views.profileedit'),
    #       url(r'^profile/$', ProfileView.as_view(), name="edit-profile"),
)
Пример #23
0
from django.contrib import admin
from django.contrib.auth import views as auth_views
from django.conf import settings
from django.conf.urls.static import static
from django.views.generic import TemplateView

from rest_framework.authtoken.views import obtain_auth_token
from allauth.account.views import password_change
from dashboard.views import DashboardView

urlpatterns = [
    # Examples:
    # url(r'^$', 'detexian.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', DashboardView.as_view(), name="index"),
    url(r'^alerts/', include('alerts.urls')),
    url(r'^logs/', include('logs.urls')),
    url(r'^accounts/', include('allauth.urls')),
    url(r'^accounts/profile/$',
        TemplateView.as_view(template_name='account/profile.html'),
        name="profile"),
    url(r"^accounts/settings/$",
        password_change,
        name="account_change_password"),
    url(r'^api/host/', include('hosts.api.urls')),
    url(r'^api-token-auth/', obtain_auth_token),
]

if settings.DEBUG:
    import debug_toolbar
Пример #24
0
from django.conf.urls import include, url
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static

import views
from dashboard.views import DashboardView, ContactsView, CompaniesView, FunnelView, TasksView, TeamView, SettingsView, LogoutView

urlpatterns = [
	url(r'^$', DashboardView.as_view(), name='dash'),
	url(r'^contacts/$', ContactsView.as_view(), name='contacts'),
	url(r'^companies/$', CompaniesView.as_view(), name='companies'),
	url(r'^funnel/$', FunnelView.as_view(), name='funnel'),
	url(r'^tasks/$', TasksView.as_view(), name='tasks'),
	url(r'^team/$', TeamView.as_view(), name='team'),
	url(r'^settings/$', SettingsView.as_view(), name='settings'),
	url(r'^logout/$', LogoutView.as_view(), name='logout'),
]

if settings.DEBUG:
	urlpatterns += static(settings.STATIC_URL, document_root = settings.STATIC_ROOT)
	urlpatterns += static(settings.MEDIA_URL, document_root = settings.MEDIA_ROOT)
"""video_analytics_webapp URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.0/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
from django.conf.urls.static import static
from django.conf import settings

from dashboard.views import DashboardView

urlpatterns = [
    path('', DashboardView.as_view()),
]+static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) \
              + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)\


Пример #26
0
Файл: urls.py Проект: ntai/cworg
from userprofile.views import (
    login_view,
    register_view,
    logout_view,
    PasswordResetView,
    PasswordResetDoneView,
    PasswordResetConfirmView,
    PasswordResetCompleteView,
    PasswordChangeView,
    PasswordChangeDoneView,
)

from dashboard.views import DashboardView

urlpatterns = [
    path('', DashboardView.as_view(), name="index"),
    path('meets/', include('meets.urls')),
    path('meets/api/', include('meets.api.urls')),
    path('locations/', include('locations.urls')),
    path('teams/', include('teams.urls')),
    path('users/', include('userprofile.urls')),
    path('admin/', admin.site.urls),
    path('register/', register_view, name='register'),
    path('login/', login_view, name='login'),
    path('logout/', logout_view, name='logout'),
    path('password_change/',
         PasswordChangeView.as_view(),
         name='password_change'),
    path('password_change/done/',
         PasswordChangeDoneView.as_view(),
         name='password_change_done'),
Пример #27
0
from django.conf.urls import url
from django.contrib.auth.decorators import login_required

from dashboard.views import DashboardView

urlpatterns = [
    url(r'^(?P<name>.*)$', login_required(DashboardView.as_view()))
]
Пример #28
0
from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required

from dashboard.views import DashboardView

from .views.upload_spreadsheet import UploadSpreadsheetView
from .views.list_sources import ListSources
from .views.item import AddEditItemView

from hid.tabs.view_and_edit_table import view_and_edit_table_form_process_items

urlpatterns = patterns('',
    url(r'^sources/upload/$', login_required(UploadSpreadsheetView.as_view()), name='sources-upload'),
    url(r'^sources/(?P<label>\w+)/$', login_required(ListSources.as_view()), name='sources-edit'),
    url(r'^sources/$', login_required(ListSources.as_view()), name='sources'),
    url(r'^process-items/$', login_required(view_and_edit_table_form_process_items), name="data-view-process"),
    url(r'^item/(?P<item_id>\d+)/edit/$', login_required(AddEditItemView.as_view()), name='edit-item'),
    url(r'^item/add/(?P<item_type>[-_\w]+)/$', login_required(AddEditItemView.as_view()), name='add-item'),
    url(r'^$', login_required(DashboardView.as_view()), name='dashboard'),
)
Пример #29
0
from django.urls import path

from dashboard.views import DashboardView

app_name = "dashboard"

urlpatterns = [path('', DashboardView.as_view(), name="dashboard")]
Пример #30
0
from django.urls import path
from dashboard.views import (
    DashboardView,
    SavedJobs,
    SubscriptionView,
    SaveCivilServiceTitleView,
    SaveExamNumberView,
    CivilServiceTitleDeleteView,
    ExamResultsDeleteView,
    RecommendedJobs,
)


app_name = "dashboard"
urlpatterns = [
    path("", DashboardView.as_view(), name="dashboard"),
    path("savedjobs", SavedJobs.as_view(), name="savedjobs"),
    path("subscription", SubscriptionView.as_view(), name="subscription"),
    path(
        "SaveCivilServiceTitleView",
        SaveCivilServiceTitleView.as_view(),
        name="SaveCivilServiceTitleView",
    ),
    path(
        "SaveExamNumberView",
        SaveExamNumberView.as_view(),
        name="SaveExamNumberView",
    ),
    path(
        "CivilServiceTitleDelete",
        CivilServiceTitleDeleteView.as_view(),
Пример #31
0
    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.urls import path, include
from django.conf.urls.static import static
from django.contrib import admin

from checkout.views import CheckoutTestView, CheckoutAjaxView
from dashboard.views import DashboardView
from products.views import UserLibraryListView

urlpatterns = [
    path('', DashboardView.as_view(), name='dashboard'),
    path('test/', CheckoutTestView.as_view(), name='test'),
    path('checkout/', CheckoutAjaxView.as_view(), name='checkout'),
    path('admin/', admin.site.urls),
    path('products/',
         include(('products.urls', 'products'), namespace='products')),
    path('seller/', include(('sellers.urls', 'sellers'), namespace='sellers')),
    path('tags/', include(('tags.urls', 'tags'), namespace='tags')),
    path('library/', UserLibraryListView.as_view(), name='library'),
]

if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL,
                          document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
Пример #32
0
__author__ = 'dmalik'
from django.urls import path

from dashboard.views import DashboardView

urlpatterns = [
    path('', DashboardView.as_view(), name="dashboard_view"),
]
Пример #33
0
    1. Add an import:  from blog import urls as blog_urls
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""

from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin

from dashboard.views import DashboardView
from checkout.views import CheckoutAjaxView

from products.views import UserLibraryListView

urlpatterns = [
    url(r'^$', DashboardView.as_view(), name="dashboard"),
    #url(r'^test/$', CheckoutView.as_view(), name="test"),
    url(r'^checkout/$', CheckoutAjaxView.as_view(), name="checkout"),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^products/', include("products.urls", namespace='products')),
    url(r'^tags/', include("tags.urls", namespace='tags')),
    url(r'^seller/', include("sellers.urls", namespace='sellers')),
    url(r'^library/', UserLibraryListView.as_view(), name="library"),
]

if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL,
                          document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
Пример #34
0
from django.contrib.auth.views import logout
from django.urls import path

from dashboard.views import HomeView, SignUpView, DashboardView, SignInView

urlpatterns = [
    path('home/', HomeView.as_view(), name='home'),
    path('signup/', SignUpView.as_view(), name='signup'),
    path('signin/', SignInView.as_view(), name='signin'),
    path('logout/', logout, {"next_page": "/habit-app/home/"}, name='logout'),
    path('dashboard/', DashboardView.as_view(), name='dashboard')
]
Пример #35
0
    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.conf.urls import url
from dashboard.views import DashboardView
from kyd_dashboard.views import KYDDashboardView, FeatureOne, FeatureTwo, FeatureThree, FeatureFour, FeatureSix
from django.conf import settings
from django.conf.urls.static import static
from dashboard import views

urlpatterns = [
    url(r'^$', DashboardView.as_view(), name='home'),
    url(r'^kyd_dashboard$', KYDDashboardView.as_view(), name='kyd_dashboard'),
    url(r'^kyd_dashboard/feature1$', FeatureOne.as_view(), name='feat1'),
    url(r'^kyd_dashboard/feature2$', FeatureTwo.as_view(), name='feat2'),
    url(r'^kyd_dashboard/feature3$', FeatureThree.as_view(), name='feat3'),
    url(r'^kyd_dashboard/feature4$', FeatureFour.as_view(), name='feat4'),
    url(r'^kyd_dashboard/feature5$', FeatureSix.as_view(), name='feat5'),
    url(r'^admin/', admin.site.urls),
    url(r'^login/', views.login_request, name='login'),
    url(r'^logout/', views.logout_request, name='logout'),

    # url(r'logout', views.logout_request, name="logout"),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
Пример #36
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from dashboard.views import DashboardView, StockChartView, TestView, SingleStockView
from forecast_server.views import ForecastGenerateView
from recommendation_server.views import RecommendationView

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'stock.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^admin/', include(admin.site.urls)),
    url(r'stock/', DashboardView.as_view()),
    url(r'^stock_chart/$', StockChartView.as_view()),
    url(r'^stock_api/$', SingleStockView.as_view()),
    url(r'test/', TestView.as_view()),
    url(r'forecast_generate/', ForecastGenerateView.as_view()),
    url(r'recommendation/', RecommendationView.as_view()),
)

urlpatterns += staticfiles_urlpatterns()
Пример #37
0
from django.conf.urls import url
from dashboard.views import (
    DashboardView,
    username_autocomplete,
    search_user_information,
    specify_parent,
)
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse_lazy

urlpatterns = [
    # Dashboard Page
    url(r'^$',
        login_required(login_url=reverse_lazy('account_login'))(
            DashboardView.as_view()),
        name='dashboard'),

    # Autocomplete in "username" field | Link available to superuser
    url(r'^username_autocomplete/$',
        username_autocomplete,
        name='username_autocomplete'),

    # AJAX request which return full user information | Link available to superuser
    url(r'^search_user_information/(?P<username>[\w\-]+)/$',
        search_user_information,
        name='search_user_information'),

    # Set parent if user has not registered in the system through the referral link
    url(r'^specify_parent/', specify_parent, name='specify_parent'),
]
Пример #38
0
from django.contrib import admin
from django.urls import path
from homepage.views import HomePage
from accounts.views import LoginView, SignupView
from dashboard.views import DashboardView
from staff.views import AddStaff, StaffProfile
from assets.views import AddCreditCard, AddActiveDirectoryAccount, AssignAsset, FlagsView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', HomePage.as_view(), name="homepage"),
    path('audits', FlagsView.as_view(), name="audits"),
    path('staff/add', AddStaff.as_view(), name="add-staff"),
    path('staff/<pk>/', StaffProfile.as_view(), name="staff-profile"),
    path('assets/credit-card/add',
         AddCreditCard.as_view(),
         name="add-credit-card"),
    path('asset/assign-asset', AssignAsset.as_view(), name="assign-asset"),
    path('asset/<pk>/disable', StaffProfile.as_view(), name="staff-profile"),
    path('assets/active-directory/add',
         AddActiveDirectoryAccount.as_view(),
         name="add-active-directory"),
    path('dashboard', DashboardView.as_view(), name="dashboard"),
    path('login', LoginView.as_view(), name="login"),
    path('signup', SignupView.as_view(), name="signup")
]
Пример #39
0
    url(r'^post/$', views.EmailView.as_view()), #this endpoint is used to send emails
    url(r'^notifynew/$', views.NotifyView.as_view()), #this endpoint is used to send emails
    url(r'^activatenew/$', views.ActivateView.as_view()), #this endpoint is used to send emails
    url(r'^postblog/$', views.PostBlogView.as_view()), #this endpoint is used to send emails
    url(r'^postcomment/$', views.PostCommentView.as_view()),
    url(r'^rules/', include('rules_light.urls')),
    url(r'^sale/', SalesView.as_view()),
    url(r'^sales/', SalesView.as_view()),
    url(r'^rent/', RentView.as_view()),
    url(r'^contact/', ContactView.as_view()),
    url(r'^contactus/', views.ContactView.as_view()),
    url(r'^featured/', FeaturedView.as_view()),
    url(r'^rentals/', RentView.as_view()),
    url(r'^agents/', AgentView.as_view()),
    url(r'^about/', AboutView.as_view()),
    url(r'^dashboard/', DashboardView.as_view()),
    url(r'^logout/',DashboardLogoutView.as_view()),
    url(r'^search/', views.SearchView.as_view()),
    url(r'^rss/', RssSiteNewsFeed()),
    url(r'^feeds/', RssPostsFeed()),
    url(r'^atom/', AtomSiteNewsFeed()),
    url(r'^signup/',MemberSignupView.as_view()),
    url(r'^signin/',MemberLoginView.as_view()), 
#    url(r'^accounts/login/$',MemberLoginView.as_view()),
    url(r'^accounts/login/$',RedirectView.as_view(url='/signin/')),
    url(r'^podcasts/', include('podcast.urls')),
    url(r'^properties/(?P<type_id>[0-9a-zA-Z_-]+)/$',PropertyListView.as_view(),
        name='property_type_list'
    ),
   # url(r'^users/(?P<username>[0-9a-zA-Z_-]+)/$',views.UserList.as_view(),
    #    name='user_list'
Пример #40
0
    SeriesDelete,
    WebsiteCreate,
    WebsiteSettings,
    WebsiteSettingsInfo,
    SeriesCreate,
    VideoCreate,
    VideoEdit,
    DashboardView,
    PaymentSettings,
    stripe_auth,
    stripe_callback,
    VideoDelete, WebsiteCustomize, WebsiteDelete)

urlpatterns = [

    url(r"^$", DashboardView.as_view(), name="dashboard"),

    # /websites/
    url(r"^websites/", include([

        # /websites/{website_id}
        url(r"^(?P<website_id>[0-9]+)/$", DashboardView.as_view(), name="websites_dashboard"),

        # /websites/create
        url(r"^create/$", WebsiteCreate.as_view(), name="websites_create"),

        # /websites/delete
        url(r"^(?P<pk>[0-9]+)/delete/$", WebsiteDelete.as_view(), name="websites_delete"),

        # /websites/{website_id}/videos
        url(r'^(?P<website_id>[0-9]+)/videos/', include([