# chloro - personal space
# Copyright (C) 2019 Frederic Peters
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see .
from django.conf.urls import url
from django.contrib.admin.views.decorators import staff_member_required
from django.views.decorators.cache import never_cache
import ckeditor.views as ckeditor_views
from . import views
urlpatterns = [
url(
r'^ckeditor/upload/',
staff_member_required(ckeditor_views.upload, login_url='login'),
name='ckeditor_upload',
),
url(
r'^ckeditor/browse/',
never_cache(staff_member_required(ckeditor_views.browse, login_url='login')),
name='ckeditor_browse',
),
url(r'^(?P[\w:-]+)/edit/$', staff_member_required(views.NoteEditView.as_view(), login_url='login')),
url(
r'^(?P[\w:-]+)/delete/$',
staff_member_required(views.NoteDeleteView.as_view(), login_url='login'),
),
url(r'^new-note/$', staff_member_required(views.NoteAddView.as_view(), login_url='login')),
url(r'^(?P[\w:-]+)/$', views.NoteView.as_view()),
url(r'^$', views.HomeView.as_view()),
]