예제 #1
0
from asset.views import AssetView

urlpatterns = [
	url(r'^$', HomeView.as_view(), name='home'),
    # url(r'^search/', include('haystack.urls')),
    url(r'^search/', FacetedSearchView.as_view(form_class=FacetedSearchForm, facet_fields=['room', 'contact_1_name', 'manufacturer' ]), name='haystack_search'),
	url(r'^about/$', AboutView.as_view(), name='about'),
	url(r'^contact/$', ContactView.as_view(), name='contact'),
    
    url(r'^innovo-sites/$', InnovositeListView.as_view(), name='innovosite_list'),
    url(r'^innovo/(?P<pk>[0-9]+)/$', InnovositeView.as_view(), name='innovosite'),
    
    url(r'^units/$', SubOrganizationListView.as_view(), name='unit_list'),
    url(r'^unit/(?P<pk>[0-9]+)/$', SubOrganizationView.as_view(), name='unit'),
    
    url(r'^building/(?P<pk>[0-9]+)/$', BuildingView.as_view(), name='building'),
    url(r'^asset/(?P<pk>[0-9]+)/$', AssetView.as_view(), name='asset'),
    
    url(r'^user/(?P<pk>[0-9]+)/$', UserView.as_view(), name='user_view'),
    
    url(r'^admin/', admin.site.urls),

    # url(r'^__debug__/', include(debug_toolbar.urls)),

] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)


    # url(r'^$', FacetedSearchView(form_class=FacetedSearchForm, facet_fields=['author']), name='haystack_search'),

    # url(r'^search/', FacetedSearchView.as_view(form_class=FacetedSearchForm, facet_fields=['room'],template_name='search/search.html', context_object_name='page_object'), name='haystack_search'),
예제 #2
0
         login_required(CustomerEditView.as_view()),
         name='customer-edit'),
    path('customers/detail/<int:pk>/',
         login_required(CustomerDetailView.as_view()),
         name='customer-detail'),
    path('customers/deactivate/<int:pk>/',
         login_required(CustomerDeactivateView.as_view()),
         name='customer-deactivate'),
    path('customers/activate/<int:pk>/',
         login_required(CustomerActivateView.as_view()),
         name='customer-activate'),
    # REPORTS
    path('reports/last-seven-days-sales/',
         login_required(get_last_seven_days_sales),
         name='last_seven_days_sales'),
    path('reports/last-year-sales/',
         login_required(get_year_sales_group_by_month),
         name='last_year_sales'),
    path('reports/', login_required(Report.as_view()), name='report'),
    path(
        'reports/<int:start_year>/<int:start_month>/<int:start_day>/<int:end_year>/<int:end_month>/<int:end_day>/',
        login_required(ReportDetails.as_view()),
        name='report_details'),
    # USERS
    path('accounts/users/', login_required(UserView.as_view()), name='users'),
    # ADDRESSES
    path('addresses/add/',
         login_required(AddressCreateView.as_view()),
         name='address-add'),
]
예제 #3
0
from django.contrib.auth.views import login, logout
from core.views import UserView, UsersList, MainPage, UserRegistrationView
from django.conf.urls import include, url

urlpatterns = [
    url(r'^$', MainPage.as_view(), name="main_page"),
    url(r'^users/$', UsersList.as_view(), name="all_users"),
    url(r'^user/(?P<user_id>\d+)/$', UserView.as_view(), name="one_user"),
    url(r'^login/$', login, {'template_name': 'core/login.html'},
        name="login"),
    url(r'^logout/$', logout, name="logout"),
    url(r'^registration/$',
        UserRegistrationView.as_view(),
        name="registration"),
]
예제 #4
0
schema_view = get_schema_view(
    openapi.Info(
        title="Snippets API",
        default_version='v1',
        description="Test description",
        terms_of_service="https://www.google.com/policies/terms/",
        contact=openapi.Contact(email="*****@*****.**"),
        license=openapi.License(name="BSD License"),
    ),
    public=True,
    permission_classes=(permissions.AllowAny, ),
)

urlpatterns = [
    path('', include(router.urls)),
    path('admin/', admin.site.urls),
    path('api-auth/', include('rest_framework.urls')),
    path('accounts/login/', obtain_jwt_token),
    path('users/', UserView.as_view()),
    url(r'^swagger(?P<format>\.json|\.yaml)$',
        schema_view.without_ui(cache_timeout=0),
        name='schema-json'),
    url(r'^swagger/$',
        schema_view.with_ui('swagger', cache_timeout=0),
        name='schema-swagger-ui'),
    url(r'^redoc/$',
        schema_view.with_ui('redoc', cache_timeout=0),
        name='schema-redoc'),
]
예제 #5
0
urlpatterns = [
    url(r'^$', HomeView.as_view(), name='home'),
    # url(r'^search/', include('haystack.urls')),
    url(r'^search/',
        FacetedSearchView.as_view(
            form_class=FacetedSearchForm,
            facet_fields=['room', 'contact_1_name', 'manufacturer']),
        name='haystack_search'),
    url(r'^about/$', AboutView.as_view(), name='about'),
    url(r'^contact/$', ContactView.as_view(), name='contact'),
    url(r'^innovo-sites/$',
        InnovositeListView.as_view(),
        name='innovosite_list'),
    url(r'^innovo/(?P<pk>[0-9]+)/$',
        InnovositeView.as_view(),
        name='innovosite'),
    url(r'^units/$', SubOrganizationListView.as_view(), name='unit_list'),
    url(r'^unit/(?P<pk>[0-9]+)/$', SubOrganizationView.as_view(), name='unit'),
    url(r'^building/(?P<pk>[0-9]+)/$', BuildingView.as_view(),
        name='building'),
    url(r'^asset/(?P<pk>[0-9]+)/$', AssetView.as_view(), name='asset'),
    url(r'^user/(?P<pk>[0-9]+)/$', UserView.as_view(), name='user_view'),
    url(r'^admin/', admin.site.urls),

    # url(r'^__debug__/', include(debug_toolbar.urls)),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

# url(r'^$', FacetedSearchView(form_class=FacetedSearchForm, facet_fields=['author']), name='haystack_search'),

# url(r'^search/', FacetedSearchView.as_view(form_class=FacetedSearchForm, facet_fields=['room'],template_name='search/search.html', context_object_name='page_object'), name='haystack_search'),
예제 #6
0
from django.urls import path

from core.views import UserView, DoctorsView, AppointmentView, ReportView, LoginView

urlpatterns = [
    path('user/', UserView.as_view()),
    path('doctors/', DoctorsView.as_view()),
    path('user/<int:id>/', UserView.as_view()),
    path('login/', LoginView.as_view()),
    path('appointment/', AppointmentView.as_view()),
    path('report/', ReportView.as_view()),
    #path('appointment/<int:patient>/', AppointmentView.as_view()),
]
예제 #7
0
"""
from django.conf.urls import url, include
from django.contrib import admin
from django.conf import settings

from core.views import UserView
from recommendations.views import RecommendationsView
from subscriptions.views import SubscriptionView

admin.site.site_title = 'GHRecommender'
admin.site.site_header = 'GHRecommender.io Administration'

urlpatterns = [
    url(r'^%s/' % settings.ADMIN_URL, admin.site.urls),
    url('', include('social_django.urls', namespace='social')),
    url(r'^api/user/$', UserView.as_view(), name='api-user'),
    url(r'^api/recommendations/$',
        RecommendationsView.as_view(),
        name='api-recommendations'),
    url(r'^api/subscription/$',
        SubscriptionView.as_view(),
        name='api-subscription'),
]

if settings.DEBUG:
    import debug_toolbar

    urlpatterns += [
        url(r'^__debug__/', include(debug_toolbar.urls)),
    ]
예제 #8
0
파일: urls.py 프로젝트: tomviner/lunchbox
from django.conf.urls import patterns, url

from core.views import cast_vote, LoginView, LogoutView, test_vote, UserView, ResultView
from core.views import get_votes

urlpatterns = patterns('',
   url(r'^$', UserView.as_view(), name='home'),
   url(r'login/(?P<pk>\d+)/$',
       LoginView.as_view(), name='login'),
   url(r'logout/(?P<pk>\d+)/$',
       LogoutView.as_view(), name='logout'),
   url(r'^testvote/$', test_vote),
   url(r'^vote/$', cast_vote),
   url(r'^getvotes/$', get_votes),
   url(r'^results/$', ResultView.as_view()),
)
예제 #9
0
                        ListBeaconActiveTargets, UploadBeaconScript,
                        TargetBeaconsStatsView, TargetBeaconsListView,
                        TargetBeaconsEventListView, DeleteBeacons,
                        FolderMinionListing)

from .models import Grains, Beacon
from django.conf.urls import patterns, url
from django.contrib.auth.models import User

urlpatterns = patterns('', url(r'^login/$',
                               views.AuthenticateUserView.as_view(),
                               name='authenticate'),
                       url(r'^users/all/$',
                           UserListView.as_view(model=User),),
                       url(r'^users/add/$',
                           UserView.as_view()),
                       url(r'^users/delete/$',
                           DeleteUsers.as_view()),
                       url(r'^users/(?P<userid>\d+)/edit/$',
                           EditUserView.as_view()),
                       url(r'^users/(?P<userid>\d+)/$',
                           UserObject.as_view()),
                       url(r'^count/$',
                           ObjectCountView.as_view(),),
                       url(r'^folder/delete/(?P<folder_id>\d+)/$',
                           DeleteSystemFolderView.as_view(),),
                       url(r'^folder/create/$',
                           CreateSystemFolderView.as_view(),),
                       url(r'^folder/edit/$',
                           EditSystemFolderView.as_view(),),
                       url(r'^public/folder/all/$',
예제 #10
0
    UploadBeaconScript, TargetBeaconsStatsView, TargetBeaconsListView,
    TargetBeaconsEventListView, DeleteBeacons, FolderMinionListing)

from .models import Grains, Beacon
from django.conf.urls import patterns, url
from django.contrib.auth.models import User

urlpatterns = patterns(
    '',
    url(r'^login/$', views.AuthenticateUserView.as_view(),
        name='authenticate'),
    url(
        r'^users/all/$',
        UserListView.as_view(model=User),
    ),
    url(r'^users/add/$', UserView.as_view()),
    url(r'^users/delete/$', DeleteUsers.as_view()),
    url(r'^users/(?P<userid>\d+)/edit/$', EditUserView.as_view()),
    url(r'^users/(?P<userid>\d+)/$', UserObject.as_view()),
    url(
        r'^count/$',
        ObjectCountView.as_view(),
    ),
    url(
        r'^folder/delete/(?P<folder_id>\d+)/$',
        DeleteSystemFolderView.as_view(),
    ),
    url(
        r'^folder/create/$',
        CreateSystemFolderView.as_view(),
    ),
예제 #11
0
파일: urls.py 프로젝트: Aoshee/coreblog
from core.models import News

urlpatterns = [
        url(r'^$', IndexView.as_view(), name='index-view'),
        url(r'^article/(?P<slug>\w+).html$',
            ArticleView.as_view(), name='article-detail-view'),
        url(r'^all/$', AllView.as_view(), name='all-view'),
        url(r'^search/$', SearchView.as_view()),
        url(r'^login/$',
            TemplateView.as_view(template_name="blog/login.html"),
            name='login-view'),
        url(r'^register/$',
            TemplateView.as_view(template_name="blog/register.html"),
            name='register-view'),
        url(r'^forgetpassword/$',
            TemplateView.as_view(template_name="blog/forgetpassword.html"),
            name='forgetpassword-view'),
        url(r'^resetpassword/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$',
            TemplateView.as_view(template_name="blog/resetpassword.html"),
            name='resetpassword-view'),
        url(r'^column/(?P<column>\w+)/$',
            ColumnView.as_view(), name='column-detail-view'),
        url(r'^user/(?P<slug>\w+)$', UserView.as_view(), name='user-view'),
        url(r'^news/$', NewsView.as_view(), name='news-view'),
        url(r'^news/(?P<pk>\w+)$',
            DetailView.as_view(model=News), name='news-detail-view'),
        url(r'^tag/(?P<tag>\w+)/$', TagView.as_view(), name='tag-detail-view'),
        url(r'^category/(?P<category>\w+)/$',
            CategoryView.as_view(), name='category-detail-view'),
]