1 # chloro - personal space
2 # Copyright (C) 2019 Frederic Peters
4 # This program is free software: you can redistribute it and/or modify it
5 # under the terms of the GNU Affero General Public License as published
6 # by the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU Affero General Public License for more details.
14 # You should have received a copy of the GNU Affero General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 import ckeditor.views as ckeditor_views
18 from django.conf.urls import url
19 from django.contrib.admin.views.decorators import staff_member_required
20 from django.views.decorators.cache import never_cache
27 staff_member_required(ckeditor_views.upload, login_url='login'),
28 name='ckeditor_upload',
32 never_cache(staff_member_required(ckeditor_views.browse, login_url='login')),
33 name='ckeditor_browse',
35 url(r'^(?P<slug>[\w:-]+)/edit/$', staff_member_required(views.NoteEditView.as_view(), login_url='login')),
37 r'^(?P<slug>[\w:-]+)/delete/$',
38 staff_member_required(views.NoteDeleteView.as_view(), login_url='login'),
40 url(r'^(?P<slug>[\w:-]+)/api-save/$', staff_member_required(views.NoteApiSaveView.as_view())),
41 url(r'^ajax/upload/$', staff_member_required(views.ajax_upload)),
42 url(r'^ajax/newpage/$', staff_member_required(views.ajax_new_page)),
43 url(r'^ajax/search/$', views.ajax_search, name='ajax-search'),
44 url(r'^new-note/$', staff_member_required(views.NoteAddView.as_view(), login_url='login')),
45 url(r'^feeds/(?P<sub>[\w:-]+)/atom$', views.AtomFeed()),
46 url(r'^feed/atom$', views.AtomFeed()),
47 url(r'^tag/(?P<tag>[\w:-]+)/$', views.ListOnTagView.as_view()),
48 url(r'^archives/$', views.ArchivesView.as_view()),
49 url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<slug>[\w:-]+)/$', views.NoteView.as_view()),
50 url(r'^(?P<slug>[\w:-]+)/$', views.NoteView.as_view()),
51 url(r'^$', views.HomeView.as_view()),