from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import path, include from rest_framework import routers from main.views import (UserView, UserViewSet, CompanyViewSet, TransferViewSet, MainView, CompanyView, TransferView, AbusersView, report, generate) router = routers.DefaultRouter() router.register('user', UserViewSet) router.register('company', CompanyViewSet) router.register('transfer', TransferViewSet) urlpatterns = [ path('admin/', admin.site.urls), path('', MainView.as_view(), name='main'), path('user/', UserView.as_view(), name='user'), path('company/', CompanyView.as_view(), name='company'), path('transfer/', TransferView.as_view(), name='transfer'), path('abusers/', AbusersView.as_view(), name='abusers'), path('abusers/report/', report, name='report'), path('abusers/generate/', generate, name='generate'), # REST API URL path('api_auth/', include(router.urls)), ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
from main.ajax_views import ( ajax_vote_comment, ajax_vote_post, ) urlpatterns = [ path("", HomeView.as_view(), name="home"), path("login/", LoginView.as_view(), name="login"), path("logout/", LogoutView.as_view(), name="logout"), path("register/", RegisterView.as_view(), name="register"), path("create/topic", CreateTopicView.as_view(), name="create_topic"), path("topic/<str:name>/", TopicView.as_view(), name="topic"), path("topic/<str:name>/<slug:slug>", InfoView.as_view(), name="info"), path("create/post", CreatePostView.as_view(), name="create_post"), path("search/<str:q>", SearchView.as_view(), name="search"), path('user/<str:user>', UserView.as_view(), name='profile'), path('user/<str:user>/posts', UserView.as_view()), path('account', AccountView.as_view(), name='account'), path('account/password', ChangePassword.as_view(), name='change_password'), path( "ajax/vote/post/<int:post_id>/<int:vote>/", ajax_vote_post, name="ajax_vote_post", ), path( "ajax/vote/comment/<int:comment_id>/<int:vote>/", ajax_vote_comment, name="ajax_vote_comment", ), ]
from django.conf.urls import url from main.views import UserView, UserDetailView, \ HospitalListView, HospitalDetailView, \ VisitListView, VisitDetailView, UserVisitView urlpatterns = [ url(r'^user/$', UserView.as_view()), url(r'^user/details/$', UserDetailView.as_view()), url(r'^user/visits/$', UserVisitView.as_view()), url(r'^hospital/$', HospitalListView.as_view()), url(r'^hospital/(?P<pk>[0-9]+)/$', HospitalDetailView.as_view()), url(r'^visit/$', VisitListView.as_view()), url(r'^visit/(?P<pk>[0-9]+)/$', VisitDetailView.as_view()), ]
path('blog/<str:user>', blog), # ajax_changeProPic path('changeProPic', ajax_changeProPic), # ajax_confirmPwd path('ajax_confirmPwd', ajax_confirmPwd), # imgDetail path('blog/<str:user>/<int:imgID>', imgDetail), # delete image path('delImage', delImage, name='delImage'), # 新增commend # path('blog/addComment', addComment), # 按讚ajax path('ajax_like', ajax_like), # 新增comment path('ajax_comment', ajax_comment), # 更新comment path('ajax_commentUpdate', ajax_commentUpdate), # 網站介紹 path('info', info), # 技術介紹 path('tech', tech), # 登入 path('login/', login, name='login'), # 登出 path('logout/', logout), # 註冊 path('signUp/', signUp), path('secret/randomImgLike/', random_imgLike), path('main/UserList', UserView.as_view()) ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.contrib import admin from django.urls import path, include, re_path from django.views.generic import TemplateView from django.conf.urls import url from main.views import CheckUser, UserView, PlanView, ActivityView, RemoveActivityView, RemoveAvailabilityView, \ AvailabilityView, PlanDetailsView, RemovePlanView urlpatterns = [ path('admin/', admin.site.urls), path('rotw/', include('main.urls')), path('rotw/', include('django.contrib.auth.urls')), path('rotw/home/', TemplateView.as_view(template_name='home.html'), name='home'), path('', TemplateView.as_view(template_name='home.html'), name='home'), path('check/', CheckUser.as_view()), re_path(r'^rotw/(?P<id>(\d)+)$', UserView.as_view()), re_path(r'^rotw/(?P<u_id>(\d)+)/(?P<p_id>(\d)+)$', PlanView.as_view()), re_path(r'^rotw/activity/(?P<id>(\d)+)$', ActivityView.as_view()), re_path(r'^rotw/availability/(?P<id>(\d)+)$', AvailabilityView.as_view()), url(r'^rotw/plan/remove/(?P<pk>(\d)+)$', RemovePlanView.as_view()), url(r'^rotw/activity/remove/(?P<pk>(\d)+)$', RemoveActivityView.as_view()), url(r'^rotw/availability/remove/(?P<pk>(\d)+)$', RemoveAvailabilityView.as_view()), url(r'^rotw/schedule_details/(?P<u_id>(\d)+)/(?P<p_id>(\d)+)$', PlanDetailsView.as_view()), # url(r'^rotw/schedule_recalculation/(?P<u_id>(\d)+)/(?P<p_id>(\d)+)$', ScheduleRecalculation.as_view()), ]
from django.conf.urls import patterns, include, url from main.views import ImageListView, ImageDetailView, ImageCreateView, ImageDeleteView, UserView, TagView from main.feeds import IndexFeed, UserFeed, TagFeed urlpatterns = patterns( '', url(r'^$', ImageListView.as_view(), name='index'), url(r'^(?i)page/(?P<page>\d+)$', ImageListView.as_view(), name='index_page'), url(r'^(?i)image/(?P<pk>\d+)$', ImageDetailView.as_view(), name='image'), url(r'^(?i)image/(?P<pk>\d+)/delete$', ImageDeleteView.as_view(), name='image_delete'), url(r'^(?i)upload', ImageCreateView.as_view(), name='upload'), url(r'^(?i)user/(?P<user>[\w.@+-]+)$', UserView.as_view(), name='user'), url(r'^(?i)user/(?P<user>[\w.@+-]+)/page/(?P<page>\d+)$', UserView.as_view(), name='user_page'), url(r'^(?i)tag/(?P<tag>\w+)$', TagView.as_view(), name='tag'), url(r'^(?i)tag/(?P<tag>\w+)/page/(?P<page>\d+)$', TagView.as_view(), name='tag_page'), url(r'^(?i)feed$', IndexFeed(), name='index_feed'), url(r'^(?i)feed/user/(?P<user>[\w.@+-]+)$', UserFeed(), name='user_feed'), url(r'^(?i)feed/tag/(?P<tag>\w+)$', TagFeed(), name='tag_feed'), )
from django.conf.urls.static import static from rest_framework import routers from main.views import (BranchViewSet, ClientViewSet, LoyaltyViewSet, RewardViewSet, EarnedRewardViewSet, ProfileByUsernameView, ClientByPhoneView, UserView, AddStarView, RewardListView, ExchangeRewardView, DashboardView, SaleViewSet) router = routers.DefaultRouter() router.register(r'branches', BranchViewSet) router.register(r'clients', ClientViewSet) router.register(r'loyalties', LoyaltyViewSet) router.register(r'rewards', RewardViewSet) router.register(r'earned-rewards', EarnedRewardViewSet) router.register(r'sales', SaleViewSet) urlpatterns = [ path('admin/', admin.site.urls), path('api/', include(router.urls)), path('api/rest-auth/', include('rest_auth.urls')), path('get-profile/', ProfileByUsernameView.as_view()), path('get-client-by-phone/', ClientByPhoneView.as_view()), path('login/', UserView.as_view()), path('add-star/', AddStarView.as_view()), path('reward-list/<int:profile>/<int:client>/', RewardListView.as_view()), path('exchange-reward/', ExchangeRewardView.as_view()), path('dashboard/', DashboardView.as_view()) ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.conf.urls import patterns, include, url from main.views import ImageListView, ImageDetailView, ImageCreateView, ImageDeleteView, UserView, TagView from main.feeds import IndexFeed, UserFeed, TagFeed urlpatterns = patterns('', url(r'^$', ImageListView.as_view(), name='index'), url(r'^(?i)page/(?P<page>\d+)$', ImageListView.as_view(), name='index_page'), url(r'^(?i)image/(?P<pk>\d+)$', ImageDetailView.as_view(), name='image'), url(r'^(?i)image/(?P<pk>\d+)/delete$', ImageDeleteView.as_view(), name='image_delete'), url(r'^(?i)upload', ImageCreateView.as_view(), name='upload'), url(r'^(?i)user/(?P<user>[\w.@+-]+)$', UserView.as_view(), name='user'), url(r'^(?i)user/(?P<user>[\w.@+-]+)/page/(?P<page>\d+)$', UserView.as_view(), name='user_page'), url(r'^(?i)tag/(?P<tag>\w+)$', TagView.as_view(), name='tag'), url(r'^(?i)tag/(?P<tag>\w+)/page/(?P<page>\d+)$', TagView.as_view(), name='tag_page'), url(r'^(?i)feed$', IndexFeed(), name='index_feed'), url(r'^(?i)feed/user/(?P<user>[\w.@+-]+)$', UserFeed(), name='user_feed'), url(r'^(?i)feed/tag/(?P<tag>\w+)$', TagFeed(), name='tag_feed'), )
DeleteReservationView, CreateReviewView urlpatterns = [ path('admin/', admin.site.urls), path('', LandingPageView.as_view(), name='landing-page'), path('index/', MainView.as_view(), name='main-page'), path('index/<int:id>/', PremisesView.as_view(), name='premises'), path('user/<int:pk>/reservations/', ReservationListView.as_view(), name='reservations'), path('index/<int:id>/new_reservation/', NewReservationView.as_view(), name='new-reservation'), path('index/<int:pk>/edit_reservation/', EditReservationView.as_view(), name='edit-reservation'), path('index/<int:pk>/delete_reservation/', DeleteReservationView.as_view(), name='delete-reservation'), path('index/<int:pk>/reservations/new_review/', CreateReviewView.as_view(), name='new-review'), path('client_registration/', ClientRegistrationView.as_view(), name='client-registration'), path('login/', LoginFormView.as_view(), name='login'), path('logout/', LogoutView.as_view(), name='logout'), path('user/<int:pk>/', UserView.as_view(), name='user'), path('user/<int:pk>/edit_user/', EditUserView.as_view(), name='edit-user'), ]