Exemple #1
0
        FlatpageDeleteView.as_view(),
        name='delete_flatpage'),
    url(r'^attachment/delete/$', deleteAttachment, name='delete_attachment'),
    url(r'^overdub/(?P<pk>\d+)$', OverdubDetailView.as_view(), name='overdub'),
    url(r'^overdub/add/(?P<pk>\d+)$',
        OverdubCreateView.as_view(),
        name='create_overdub'),
    url(r'^overdub/edit/(?P<pk>\d+)$',
        OverdubUpdateView.as_view(),
        name='edit_overdub'),
    url(r'^overdub/delete/(?P<pk>\d+)$',
        OverdubDeleteView.as_view(),
        name='delete_overdub'),
    url(r'^searchcourse/$', CourseListView.as_view(), name='course_list'),
    url(r'^post/save/$', PostSaveView.as_view(), name='save_post'),
    url(r'^post/delete/$', PostDeleteView.as_view(), name='delete_post'),
    url(r'^upload/$', fileUpload, name='file_upload'),
    url(r'^subscribe/(\w+)/$', subscribeCourse, name='subscribe_course'),
    url(r'^perm/change/$', changePerm, name='change_perm'),
    url(r'^activity/copy/$', copyActivity, name='copy_activity'),
    url(r'^lesson/title/edit/$', editLessonTitle, name='edit_lesson_title'),
    url(r'^essaydraft/edit/$', editEssayDraft, name='edit_essay_draft'),
    url(r'^admin/', include(admin.site.urls)),
    #url(r'^socket\.io', include(socketio.sdjango.urls)),
    url(r'^accounts/login/$', 'django.contrib.auth.views.login', name='login'),
    url(r'^logout/$', 'django.contrib.auth.views.logout', name='logout'),
    #
    # url(r'^accounts/login/$', 'django_cas.views.login', name='login'),
    # url(r'^accounts/logout/$', uhcaslogout, name='logout'),

    # url(r'^accounts/login/$', 'django_cas_ng.views.login', name='login'),
Exemple #2
0
    url(r'^discussion/(?P<pk>\d+)$', DiscussionDetailView.as_view(), name='discussion'),
    url(r'^discussion/add/(?P<pk>\d+)$', DiscussionCreateView.as_view(), name='create_discussion'),
    url(r'^discussion/edit/(?P<pk>\d+)$', DiscussionUpdateView.as_view(), name='edit_discussion'),
    url(r'^discussion/delete/(?P<pk>\d+)$', DiscussionDeleteView.as_view(), name='delete_discussion'),
    url(r'^essay/(?P<pk>\d+)$', EssayDetailView.as_view(), name='essay'),
    url(r'^essay/add/(?P<pk>\d+)$', EssayCreateView.as_view(), name='create_essay'),
    url(r'^essay/edit/(?P<pk>\d+)$', EssayUpdateView.as_view(), name='edit_essay'),
    url(r'^essay/delete/(?P<pk>\d+)$', EssayDeleteView.as_view(), name='delete_essay'),
    url(r'^essay/grade/(?P<pk>\d+)$', EssayResponseUpdateView.as_view(), name='grade_essay'),
    url(r'^overdub/(?P<pk>\d+)$', OverdubDetailView.as_view(), name='overdub'),
    url(r'^overdub/add/(?P<pk>\d+)$', OverdubCreateView.as_view(), name='create_overdub'),
    url(r'^overdub/edit/(?P<pk>\d+)$', OverdubUpdateView.as_view(), name='edit_overdub'),
    url(r'^overdub/delete/(?P<pk>\d+)$', OverdubDeleteView.as_view(), name='delete_overdub'),
    url(r'^searchcourse/$', CourseListView.as_view(), name='course_list'),
    url(r'^post/save/$',PostSaveView.as_view(), name='save_post'),
    url(r'^post/delete/$', PostDeleteView.as_view(), name='delete_post'),
    url(r'^upload/$', fileUpload, name='file_upload'),
    url(r'^subscribe/(\w+)/$', subscribeCourse, name='subscribe_course'),
    url(r'^perm/change/$', changePerm, name='change_perm'),
    url(r'^activity/copy/$', copyActivity, name='copy_activity'),
    url(r'^lesson/title/edit/$', editLessonTitle, name='edit_lesson_title'),
    url(r'^essaydraft/edit/$', editEssayDraft, name='edit_essay_draft'),

    url(r'^admin/', include(admin.site.urls)),
    url(r'^socket\.io', include(socketio.sdjango.urls)),

    # url(r'^accounts/login/$', 'django.contrib.auth.views.login', name='login'),
    # url(r'^logout/$', 'django.contrib.auth.views.logout', name='logout'),

    url(r'^accounts/login/$', 'django_cas.views.login', name='login'),
    url(r'^accounts/logout/$', uhcaslogout, name='logout'),
Exemple #3
0
from django.conf.urls.defaults import *
from django.conf import settings

from core.views import PostListView, PostCreateView, TagListView, PostDetailView, PostUpdateView, PostDeleteView

urlpatterns = patterns('homepage.views',
    #url(r'^$',             'home',      name="home"),
    url(r'^$', PostListView.as_view(),      name="post-list"),
	url(r'^add/$', PostCreateView.as_view(), name='post-create'),
	url(r'^tags/$', TagListView.as_view(), name='tag-list'),
	url(r'^(?P<pk>[\w\d]+)/$', PostDetailView.as_view(), name='post-detail'),
	url(r'^(?P<pk>[\w\d]+)/edit/$', PostUpdateView.as_view(), name='post-update'),
	url(r'^(?P<pk>[\w\d]+)/delete/$', PostDeleteView.as_view(), name='post-delete'),

)
Exemple #4
0
from django.contrib import admin
from django.urls import path, include

from rest_framework.authtoken.views import obtain_auth_token

from core.views import PostView, PostListCreateView, PostDeleteView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api-auth/', include('rest_framework.urls')),
    path('', PostView.as_view(), name='test'),
    path('list-create', PostListCreateView.as_view(), name='list-create'),
    path('<int:id>/delete', PostDeleteView.as_view(), name='delete'),
    path('api/token', obtain_auth_token, name='obtain-token'),
]
Exemple #5
0
     UserUpdateView.as_view(),
     name='userprofile_basic'),
 url(r'^accounts/advanced/$',
     UserProfileUpdateView.as_view(),
     name='userprofile_advanced'),
 # pinax-messages: Added URL for Messages.
 url(r"^messages/",
     include("pinax.messages.urls", namespace="pinax_messages")),
 url(r'^user/(?P<username>[-\w]{5,30})/$',
     UserProfileDetailView.as_view(),
     name='userprofile'),
 # Post: CRUD url's.
 url(r'^post/create/$', PostCreateView.as_view(), name='post_create'),
 url(r'^post/(?P<pk>\d+)/$', PostDetailView.as_view(), name='post_detail'),
 url(r'^post/(?P<pk>\d+)/delete/$',
     PostDeleteView.as_view(),
     name='post_delete'),
 # Post Comments: CRUD url's.
 url(r'^post/(?P<pk>\d+)/comment/$',
     CommentCreateView.as_view(),
     name='post_comment_create'),
 # django-activity-stream: Testing URL
 url('^activity/', include('actstream.urls')),
 url(r'^u/(?P<username>[-\w]{5,30})/followers/$',
     FollowersListView.as_view(),
     name='followers'),
 url(r'^u/(?P<username>[-\w]{5,30})/following/$',
     FollowingListView.as_view(),
     name='following'),
 url(r'^u/(?P<username>[-\w]{5,30})/follow/$', follow_view, name='follow'),
 url(r'^u/(?P<username>[-\w]{5,30})/unfollow/$',
Exemple #6
0
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from core.views import home, register, profile, PostListView, PostDetailView, PostCreateView, PostUpdateView, PostDeleteView
from django.contrib.auth import views as auth_views
from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
    path('admin/', admin.site.urls),
    path('home/', PostListView.as_view(), name='home'),
    path('post/<int:pk>/', PostDetailView.as_view(), name='post-detail'),
    path('post/new/', PostCreateView.as_view(), name='post-create'),
    path('post/<int:pk>/update/', PostUpdateView.as_view(),
         name='post-update'),
    path('post/<int:pk>/delete/', PostDeleteView.as_view(),
         name='post-delete'),
    path('register/', register, name='register'),
    path('profile/', profile, name='profile'),
    path('login/',
         auth_views.LoginView.as_view(template_name='login.html'),
         name='login'),
    path('logout/',
         auth_views.LogoutView.as_view(template_name='logout.html'),
         name='logout'),
]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)