Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
AE
Sith
Commits
be855c6c
Verified
Commit
be855c6c
authored
Oct 05, 2019
by
Sli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
django2.2: migrate url to re_path
parent
7be9077f
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
387 additions
and
342 deletions
+387
-342
accounting/urls.py
accounting/urls.py
+36
-34
api/urls.py
api/urls.py
+5
-5
club/urls.py
club/urls.py
+32
-24
com/urls.py
com/urls.py
+36
-30
core/urls.py
core/urls.py
+65
-59
counter/urls.py
counter/urls.py
+33
-33
eboutic/urls.py
eboutic/urls.py
+5
-5
election/urls.py
election/urls.py
+18
-16
forum/urls.py
forum/urls.py
+23
-19
launderette/urls.py
launderette/urls.py
+14
-14
matmat/urls.py
matmat/urls.py
+5
-5
pedagogy/urls.py
pedagogy/urls.py
+10
-10
requirements.txt
requirements.txt
+1
-1
rootplace/urls.py
rootplace/urls.py
+3
-3
sas/urls.py
sas/urls.py
+14
-14
sith/urls.py
sith/urls.py
+45
-32
stock/urls.py
stock/urls.py
+20
-18
subscription/urls.py
subscription/urls.py
+3
-3
trombi/urls.py
trombi/urls.py
+19
-17
No files found.
accounting/urls.py
View file @
be855c6c
...
@@ -22,131 +22,133 @@
...
@@ -22,131 +22,133 @@
#
#
#
#
from
django.
conf.
urls
import
url
from
django.urls
import
re_path
from
accounting.views
import
*
from
accounting.views
import
*
urlpatterns
=
[
urlpatterns
=
[
# Accounting types
# Accounting types
url
(
re_path
(
r
"^simple_type$"
,
r
"^simple_type$"
,
SimplifiedAccountingTypeListView
.
as_view
(),
SimplifiedAccountingTypeListView
.
as_view
(),
name
=
"simple_type_list"
,
name
=
"simple_type_list"
,
),
),
url
(
re_path
(
r
"^simple_type/create$"
,
r
"^simple_type/create$"
,
SimplifiedAccountingTypeCreateView
.
as_view
(),
SimplifiedAccountingTypeCreateView
.
as_view
(),
name
=
"simple_type_new"
,
name
=
"simple_type_new"
,
),
),
url
(
re_path
(
r
"^simple_type/(?P<type_id>[0-9]+)/edit$"
,
r
"^simple_type/(?P<type_id>[0-9]+)/edit$"
,
SimplifiedAccountingTypeEditView
.
as_view
(),
SimplifiedAccountingTypeEditView
.
as_view
(),
name
=
"simple_type_edit"
,
name
=
"simple_type_edit"
,
),
),
# Accounting types
# Accounting types
url
(
r
"^type$"
,
AccountingTypeListView
.
as_view
(),
name
=
"type_list"
),
re_path
(
r
"^type$"
,
AccountingTypeListView
.
as_view
(),
name
=
"type_list"
),
url
(
r
"^type/create$"
,
AccountingTypeCreateView
.
as_view
(),
name
=
"type_new"
),
re_path
(
r
"^type/create$"
,
AccountingTypeCreateView
.
as_view
(),
name
=
"type_new"
),
url
(
re_path
(
r
"^type/(?P<type_id>[0-9]+)/edit$"
,
r
"^type/(?P<type_id>[0-9]+)/edit$"
,
AccountingTypeEditView
.
as_view
(),
AccountingTypeEditView
.
as_view
(),
name
=
"type_edit"
,
name
=
"type_edit"
,
),
),
# Bank accounts
# Bank accounts
url
(
r
"^$"
,
BankAccountListView
.
as_view
(),
name
=
"bank_list"
),
re_path
(
r
"^$"
,
BankAccountListView
.
as_view
(),
name
=
"bank_list"
),
url
(
r
"^bank/create$"
,
BankAccountCreateView
.
as_view
(),
name
=
"bank_new"
),
re_path
(
r
"^bank/create$"
,
BankAccountCreateView
.
as_view
(),
name
=
"bank_new"
),
url
(
re_path
(
r
"^bank/(?P<b_account_id>[0-9]+)$"
,
r
"^bank/(?P<b_account_id>[0-9]+)$"
,
BankAccountDetailView
.
as_view
(),
BankAccountDetailView
.
as_view
(),
name
=
"bank_details"
,
name
=
"bank_details"
,
),
),
url
(
re_path
(
r
"^bank/(?P<b_account_id>[0-9]+)/edit$"
,
r
"^bank/(?P<b_account_id>[0-9]+)/edit$"
,
BankAccountEditView
.
as_view
(),
BankAccountEditView
.
as_view
(),
name
=
"bank_edit"
,
name
=
"bank_edit"
,
),
),
url
(
re_path
(
r
"^bank/(?P<b_account_id>[0-9]+)/delete$"
,
r
"^bank/(?P<b_account_id>[0-9]+)/delete$"
,
BankAccountDeleteView
.
as_view
(),
BankAccountDeleteView
.
as_view
(),
name
=
"bank_delete"
,
name
=
"bank_delete"
,
),
),
# Club accounts
# Club accounts
url
(
r
"^club/create$"
,
ClubAccountCreateView
.
as_view
(),
name
=
"club_new"
),
re_path
(
r
"^club/create$"
,
ClubAccountCreateView
.
as_view
(),
name
=
"club_new"
),
url
(
re_path
(
r
"^club/(?P<c_account_id>[0-9]+)$"
,
r
"^club/(?P<c_account_id>[0-9]+)$"
,
ClubAccountDetailView
.
as_view
(),
ClubAccountDetailView
.
as_view
(),
name
=
"club_details"
,
name
=
"club_details"
,
),
),
url
(
re_path
(
r
"^club/(?P<c_account_id>[0-9]+)/edit$"
,
r
"^club/(?P<c_account_id>[0-9]+)/edit$"
,
ClubAccountEditView
.
as_view
(),
ClubAccountEditView
.
as_view
(),
name
=
"club_edit"
,
name
=
"club_edit"
,
),
),
url
(
re_path
(
r
"^club/(?P<c_account_id>[0-9]+)/delete$"
,
r
"^club/(?P<c_account_id>[0-9]+)/delete$"
,
ClubAccountDeleteView
.
as_view
(),
ClubAccountDeleteView
.
as_view
(),
name
=
"club_delete"
,
name
=
"club_delete"
,
),
),
# Journals
# Journals
url
(
r
"^journal/create$"
,
JournalCreateView
.
as_view
(),
name
=
"journal_new"
),
re_path
(
r
"^journal/create$"
,
JournalCreateView
.
as_view
(),
name
=
"journal_new"
),
url
(
re_path
(
r
"^journal/(?P<j_id>[0-9]+)$"
,
r
"^journal/(?P<j_id>[0-9]+)$"
,
JournalDetailView
.
as_view
(),
JournalDetailView
.
as_view
(),
name
=
"journal_details"
,
name
=
"journal_details"
,
),
),
url
(
re_path
(
r
"^journal/(?P<j_id>[0-9]+)/edit$"
,
r
"^journal/(?P<j_id>[0-9]+)/edit$"
,
JournalEditView
.
as_view
(),
JournalEditView
.
as_view
(),
name
=
"journal_edit"
,
name
=
"journal_edit"
,
),
),
url
(
re_path
(
r
"^journal/(?P<j_id>[0-9]+)/delete$"
,
r
"^journal/(?P<j_id>[0-9]+)/delete$"
,
JournalDeleteView
.
as_view
(),
JournalDeleteView
.
as_view
(),
name
=
"journal_delete"
,
name
=
"journal_delete"
,
),
),
url
(
re_path
(
r
"^journal/(?P<j_id>[0-9]+)/statement/nature$"
,
r
"^journal/(?P<j_id>[0-9]+)/statement/nature$"
,
JournalNatureStatementView
.
as_view
(),
JournalNatureStatementView
.
as_view
(),
name
=
"journal_nature_statement"
,
name
=
"journal_nature_statement"
,
),
),
url
(
re_path
(
r
"^journal/(?P<j_id>[0-9]+)/statement/person$"
,
r
"^journal/(?P<j_id>[0-9]+)/statement/person$"
,
JournalPersonStatementView
.
as_view
(),
JournalPersonStatementView
.
as_view
(),
name
=
"journal_person_statement"
,
name
=
"journal_person_statement"
,
),
),
url
(
re_path
(
r
"^journal/(?P<j_id>[0-9]+)/statement/accounting$"
,
r
"^journal/(?P<j_id>[0-9]+)/statement/accounting$"
,
JournalAccountingStatementView
.
as_view
(),
JournalAccountingStatementView
.
as_view
(),
name
=
"journal_accounting_statement"
,
name
=
"journal_accounting_statement"
,
),
),
# Operations
# Operations
url
(
re_path
(
r
"^operation/create/(?P<j_id>[0-9]+)$"
,
r
"^operation/create/(?P<j_id>[0-9]+)$"
,
OperationCreateView
.
as_view
(),
OperationCreateView
.
as_view
(),
name
=
"op_new"
,
name
=
"op_new"
,
),
),
url
(
r
"^operation/(?P<op_id>[0-9]+)$"
,
OperationEditView
.
as_view
(),
name
=
"op_edit"
),
re_path
(
url
(
r
"^operation/(?P<op_id>[0-9]+)$"
,
OperationEditView
.
as_view
(),
name
=
"op_edit"
),
re_path
(
r
"^operation/(?P<op_id>[0-9]+)/pdf$"
,
OperationPDFView
.
as_view
(),
name
=
"op_pdf"
r
"^operation/(?P<op_id>[0-9]+)/pdf$"
,
OperationPDFView
.
as_view
(),
name
=
"op_pdf"
),
),
# Companies
# Companies
url
(
r
"^company/list$"
,
CompanyListView
.
as_view
(),
name
=
"co_list"
),
re_path
(
r
"^company/list$"
,
CompanyListView
.
as_view
(),
name
=
"co_list"
),
url
(
r
"^company/create$"
,
CompanyCreateView
.
as_view
(),
name
=
"co_new"
),
re_path
(
r
"^company/create$"
,
CompanyCreateView
.
as_view
(),
name
=
"co_new"
),
url
(
r
"^company/(?P<co_id>[0-9]+)$"
,
CompanyEditView
.
as_view
(),
name
=
"co_edit"
),
re_path
(
r
"^company/(?P<co_id>[0-9]+)$"
,
CompanyEditView
.
as_view
(),
name
=
"co_edit"
),
# Labels
# Labels
url
(
r
"^label/new$"
,
LabelCreateView
.
as_view
(),
name
=
"label_new"
),
re_path
(
r
"^label/new$"
,
LabelCreateView
.
as_view
(),
name
=
"label_new"
),
url
(
re_path
(
r
"^label/(?P<clubaccount_id>[0-9]+)$"
,
r
"^label/(?P<clubaccount_id>[0-9]+)$"
,
LabelListView
.
as_view
(),
LabelListView
.
as_view
(),
name
=
"label_list"
,
name
=
"label_list"
,
),
),
url
(
re_path
(
r
"^label/(?P<label_id>[0-9]+)/edit$"
,
LabelEditView
.
as_view
(),
name
=
"label_edit"
r
"^label/(?P<label_id>[0-9]+)/edit$"
,
LabelEditView
.
as_view
(),
name
=
"label_edit"
),
),
url
(
re_path
(
r
"^label/(?P<label_id>[0-9]+)/delete$"
,
r
"^label/(?P<label_id>[0-9]+)/delete$"
,
LabelDeleteView
.
as_view
(),
LabelDeleteView
.
as_view
(),
name
=
"label_delete"
,
name
=
"label_delete"
,
),
),
# User account
# User account
url
(
r
"^refound/account$"
,
RefoundAccountView
.
as_view
(),
name
=
"refound_account"
),
re_path
(
r
"^refound/account$"
,
RefoundAccountView
.
as_view
(),
name
=
"refound_account"
),
]
]
api/urls.py
View file @
be855c6c
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
#
#
#
#
from
django.
conf.
urls
import
url
,
include
from
django.urls
import
re_path
,
include
from
api.views
import
*
from
api.views
import
*
from
rest_framework
import
routers
from
rest_framework
import
routers
...
@@ -49,8 +49,8 @@ router.register(
...
@@ -49,8 +49,8 @@ router.register(
urlpatterns
=
[
urlpatterns
=
[
# API
# API
url
(
r
"^"
,
include
(
router
.
urls
)),
re_path
(
r
"^"
,
include
(
router
.
urls
)),
url
(
r
"^login/"
,
include
(
"rest_framework.
url
s"
,
namespace
=
"rest_framework"
)),
re_path
(
r
"^login/"
,
include
(
"rest_framework.
re_path
s"
,
namespace
=
"rest_framework"
)),
url
(
r
"^markdown$"
,
RenderMarkdown
,
name
=
"api_markdown"
),
re_path
(
r
"^markdown$"
,
RenderMarkdown
,
name
=
"api_markdown"
),
url
(
r
"^mailings$"
,
FetchMailingLists
,
name
=
"mailings_fetch"
),
re_path
(
r
"^mailings$"
,
FetchMailingLists
,
name
=
"mailings_fetch"
),
]
]
club/urls.py
View file @
be855c6c
...
@@ -23,80 +23,88 @@
...
@@ -23,80 +23,88 @@
#
#
#
#
from
django.
conf.
urls
import
url
from
django.urls
import
re_path
from
club.views
import
*
from
club.views
import
*
urlpatterns
=
[
urlpatterns
=
[
url
(
r
"^$"
,
ClubListView
.
as_view
(),
name
=
"club_list"
),
re_path
(
r
"^$"
,
ClubListView
.
as_view
(),
name
=
"club_list"
),
url
(
r
"^new$"
,
ClubCreateView
.
as_view
(),
name
=
"club_new"
),
re_path
(
r
"^new$"
,
ClubCreateView
.
as_view
(),
name
=
"club_new"
),
url
(
r
"^stats$"
,
ClubStatView
.
as_view
(),
name
=
"club_stats"
),
re_path
(
r
"^stats$"
,
ClubStatView
.
as_view
(),
name
=
"club_stats"
),
url
(
r
"^(?P<club_id>[0-9]+)/$"
,
ClubView
.
as_view
(),
name
=
"club_view"
),
re_path
(
r
"^(?P<club_id>[0-9]+)/$"
,
ClubView
.
as_view
(),
name
=
"club_view"
),
url
(
re_path
(
r
"^(?P<club_id>[0-9]+)/rev/(?P<rev_id>[0-9]+)/$"
,
r
"^(?P<club_id>[0-9]+)/rev/(?P<rev_id>[0-9]+)/$"
,
ClubRevView
.
as_view
(),
ClubRevView
.
as_view
(),
name
=
"club_view_rev"
,
name
=
"club_view_rev"
,
),
),
url
(
r
"^(?P<club_id>[0-9]+)/hist$"
,
ClubPageHistView
.
as_view
(),
name
=
"club_hist"
),
re_path
(
url
(
r
"^(?P<club_id>[0-9]+)/edit$"
,
ClubEditView
.
as_view
(),
name
=
"club_edit"
),
r
"^(?P<club_id>[0-9]+)/hist$"
,
ClubPageHistView
.
as_view
(),
name
=
"club_hist"
url
(
),
re_path
(
r
"^(?P<club_id>[0-9]+)/edit$"
,
ClubEditView
.
as_view
(),
name
=
"club_edit"
),
re_path
(
r
"^(?P<club_id>[0-9]+)/edit/page$"
,
r
"^(?P<club_id>[0-9]+)/edit/page$"
,
ClubPageEditView
.
as_view
(),
ClubPageEditView
.
as_view
(),
name
=
"club_edit_page"
,
name
=
"club_edit_page"
,
),
),
url
(
re_path
(
r
"^(?P<club_id>[0-9]+)/members$"
,
ClubMembersView
.
as_view
(),
name
=
"club_members"
r
"^(?P<club_id>[0-9]+)/members$"
,
ClubMembersView
.
as_view
(),
name
=
"club_members"
),
),
url
(
re_path
(
r
"^(?P<club_id>[0-9]+)/elderlies$"
,
r
"^(?P<club_id>[0-9]+)/elderlies$"
,
ClubOldMembersView
.
as_view
(),
ClubOldMembersView
.
as_view
(),
name
=
"club_old_members"
,
name
=
"club_old_members"
,
),
),
url
(
re_path
(
r
"^(?P<club_id>[0-9]+)/sellings$"
,
r
"^(?P<club_id>[0-9]+)/sellings$"
,
ClubSellingView
.
as_view
(),
ClubSellingView
.
as_view
(),
name
=
"club_sellings"
,
name
=
"club_sellings"
,
),
),
url
(
re_path
(
r
"^(?P<club_id>[0-9]+)/sellings/csv$"
,
r
"^(?P<club_id>[0-9]+)/sellings/csv$"
,
ClubSellingCSVView
.
as_view
(),
ClubSellingCSVView
.
as_view
(),
name
=
"sellings_csv"
,
name
=
"sellings_csv"
,
),
),
url
(
r
"^(?P<club_id>[0-9]+)/prop$"
,
ClubEditPropView
.
as_view
(),
name
=
"club_prop"
),
re_path
(
url
(
r
"^(?P<club_id>[0-9]+)/tools$"
,
ClubToolsView
.
as_view
(),
name
=
"tools"
),
r
"^(?P<club_id>[0-9]+)/prop$"
,
ClubEditPropView
.
as_view
(),
name
=
"club_prop"
url
(
r
"^(?P<club_id>[0-9]+)/mailing$"
,
ClubMailingView
.
as_view
(),
name
=
"mailing"
),
),
url
(
re_path
(
r
"^(?P<club_id>[0-9]+)/tools$"
,
ClubToolsView
.
as_view
(),
name
=
"tools"
),
re_path
(
r
"^(?P<club_id>[0-9]+)/mailing$"
,
ClubMailingView
.
as_view
(),
name
=
"mailing"
),
re_path
(
r
"^(?P<mailing_id>[0-9]+)/mailing/generate$"
,
r
"^(?P<mailing_id>[0-9]+)/mailing/generate$"
,
MailingAutoGenerationView
.
as_view
(),
MailingAutoGenerationView
.
as_view
(),
name
=
"mailing_generate"
,
name
=
"mailing_generate"
,
),
),
url
(
re_path
(
r
"^(?P<mailing_id>[0-9]+)/mailing/delete$"
,
r
"^(?P<mailing_id>[0-9]+)/mailing/delete$"
,
MailingDeleteView
.
as_view
(),
MailingDeleteView
.
as_view
(),
name
=
"mailing_delete"
,
name
=
"mailing_delete"
,
),
),
url
(
re_path
(
r
"^(?P<mailing_subscription_id>[0-9]+)/mailing/delete/subscription$"
,
r
"^(?P<mailing_subscription_id>[0-9]+)/mailing/delete/subscription$"
,
MailingSubscriptionDeleteView
.
as_view
(),
MailingSubscriptionDeleteView
.
as_view
(),
name
=
"mailing_subscription_delete"
,
name
=
"mailing_subscription_delete"
,
),
),
url
(
re_path
(
r
"^membership/(?P<membership_id>[0-9]+)/set_old$"
,
r
"^membership/(?P<membership_id>[0-9]+)/set_old$"
,
MembershipSetOldView
.
as_view
(),
MembershipSetOldView
.
as_view
(),
name
=
"membership_set_old"
,
name
=
"membership_set_old"
,
),
),
url
(
r
"^(?P<club_id>[0-9]+)/poster$"
,
PosterListView
.
as_view
(),
name
=
"poster_list"
),
re_path
(
url
(
r
"^(?P<club_id>[0-9]+)/poster$"
,
PosterListView
.
as_view
(),
name
=
"poster_list"
),
re_path
(
r
"^(?P<club_id>[0-9]+)/poster/create$"
,
r
"^(?P<club_id>[0-9]+)/poster/create$"
,
PosterCreateView
.
as_view
(),
PosterCreateView
.
as_view
(),
name
=
"poster_create"
,
name
=
"poster_create"
,
),
),
url
(
re_path
(
r
"^(?P<club_id>[0-9]+)/poster/(?P<poster_id>[0-9]+)/edit$"
,
r
"^(?P<club_id>[0-9]+)/poster/(?P<poster_id>[0-9]+)/edit$"
,
PosterEditView
.
as_view
(),
PosterEditView
.
as_view
(),
name
=
"poster_edit"
,
name
=
"poster_edit"
,
),
),
url
(
re_path
(
r
"^(?P<club_id>[0-9]+)/poster/(?P<poster_id>[0-9]+)/delete$"
,
r
"^(?P<club_id>[0-9]+)/poster/(?P<poster_id>[0-9]+)/delete$"
,
PosterDeleteView
.
as_view
(),
PosterDeleteView
.
as_view
(),
name
=
"poster_delete"
,
name
=
"poster_delete"
,
...
...
com/urls.py
View file @
be855c6c
...
@@ -22,97 +22,103 @@
...
@@ -22,97 +22,103 @@
#
#
#
#
from
django.
conf.
urls
import
url
from
django.urls
import
re_path
from
com.views
import
*
from
com.views
import
*
from
club.views
import
MailingDeleteView
from
club.views
import
MailingDeleteView
urlpatterns
=
[
urlpatterns
=
[
url
(
r
"^sith/edit/alert$"
,
AlertMsgEditView
.
as_view
(),
name
=
"alert_edit"
),
re_path
(
r
"^sith/edit/alert$"
,
AlertMsgEditView
.
as_view
(),
name
=
"alert_edit"
),
url
(
r
"^sith/edit/info$"
,
InfoMsgEditView
.
as_view
(),
name
=
"info_edit"
),
re_path
(
r
"^sith/edit/info$"
,
InfoMsgEditView
.
as_view
(),
name
=
"info_edit"
),
url
(
re_path
(
r
"^sith/edit/weekmail_destinations$"
,
r
"^sith/edit/weekmail_destinations$"
,
WeekmailDestinationEditView
.
as_view
(),
WeekmailDestinationEditView
.
as_view
(),
name
=
"weekmail_destinations"
,
name
=
"weekmail_destinations"
,
),
),
url
(
r
"^weekmail$"
,
WeekmailEditView
.
as_view
(),
name
=
"weekmail"
),
re_path
(
r
"^weekmail$"
,
WeekmailEditView
.
as_view
(),
name
=
"weekmail"
),
url
(
r
"^weekmail/preview$"
,
WeekmailPreviewView
.
as_view
(),
name
=
"weekmail_preview"
),
re_path
(
url
(
r
"^weekmail/preview$"
,
WeekmailPreviewView
.
as_view
(),
name
=
"weekmail_preview"
),
re_path
(
r
"^weekmail/new_article$"
,
r
"^weekmail/new_article$"
,
WeekmailArticleCreateView
.
as_view
(),
WeekmailArticleCreateView
.
as_view
(),
name
=
"weekmail_article"
,
name
=
"weekmail_article"
,
),
),
url
(
re_path
(
r
"^weekmail/article/(?P<article_id>[0-9]+)/delete$"
,
r
"^weekmail/article/(?P<article_id>[0-9]+)/delete$"
,
WeekmailArticleDeleteView
.
as_view
(),
WeekmailArticleDeleteView
.
as_view
(),
name
=
"weekmail_article_delete"
,
name
=
"weekmail_article_delete"
,
),
),
url
(
re_path
(
r
"^weekmail/article/(?P<article_id>[0-9]+)/edit$"
,
r
"^weekmail/article/(?P<article_id>[0-9]+)/edit$"
,
WeekmailArticleEditView
.
as_view
(),
WeekmailArticleEditView
.
as_view
(),
name
=
"weekmail_article_edit"
,
name
=
"weekmail_article_edit"
,
),
),
url
(
r
"^news$"
,
NewsListView
.
as_view
(),
name
=
"news_list"
),
re_path
(
r
"^news$"
,
NewsListView
.
as_view
(),
name
=
"news_list"
),
url
(
r
"^news/admin$"
,
NewsAdminListView
.
as_view
(),
name
=
"news_admin_list"
),
re_path
(
r
"^news/admin$"
,
NewsAdminListView
.
as_view
(),
name
=
"news_admin_list"
),
url
(
r
"^news/create$"
,
NewsCreateView
.
as_view
(),
name
=
"news_new"
),
re_path
(
r
"^news/create$"
,
NewsCreateView
.
as_view
(),
name
=
"news_new"
),
url
(
re_path
(
r
"^news/(?P<news_id>[0-9]+)/delete$"
,
r
"^news/(?P<news_id>[0-9]+)/delete$"
,
NewsDeleteView
.
as_view
(),
NewsDeleteView
.
as_view
(),
name
=
"news_delete"
,
name
=
"news_delete"
,
),
),
url
(
re_path
(
r
"^news/(?P<news_id>[0-9]+)/moderate$"
,
r
"^news/(?P<news_id>[0-9]+)/moderate$"
,
NewsModerateView
.
as_view
(),
NewsModerateView
.
as_view
(),
name
=
"news_moderate"
,
name
=
"news_moderate"
,
),
),
url
(
r
"^news/(?P<news_id>[0-9]+)/edit$"
,
NewsEditView
.
as_view
(),
name
=
"news_edit"
),
re_path
(
url
(
r
"^news/(?P<news_id>[0-9]+)$"
,
NewsDetailView
.
as_view
(),
name
=
"news_detail"
),
r
"^news/(?P<news_id>[0-9]+)/edit$"
,
NewsEditView
.
as_view
(),
name
=
"news_edit"
url
(
r
"^mailings$"
,
MailingListAdminView
.
as_view
(),
name
=
"mailing_admin"
),
),
url
(
re_path
(
r
"^news/(?P<news_id>[0-9]+)$"
,
NewsDetailView
.
as_view
(),
name
=
"news_detail"
),
re_path
(
r
"^mailings$"
,
MailingListAdminView
.
as_view
(),
name
=
"mailing_admin"
),
re_path
(
r
"^mailings/(?P<mailing_id>[0-9]+)/moderate$"
,
r
"^mailings/(?P<mailing_id>[0-9]+)/moderate$"
,
MailingModerateView
.
as_view
(),
MailingModerateView
.
as_view
(),
name
=
"mailing_moderate"
,
name
=
"mailing_moderate"
,
),
),
url
(
re_path
(
r
"^mailings/(?P<mailing_id>[0-9]+)/delete$"
,
r
"^mailings/(?P<mailing_id>[0-9]+)/delete$"
,
MailingDeleteView
.
as_view
(
redirect_page
=
"com:mailing_admin"
),
MailingDeleteView
.
as_view
(
redirect_page
=
"com:mailing_admin"
),
name
=
"mailing_delete"
,
name
=
"mailing_delete"
,
),
),
url
(
r
"^poster$"
,
PosterListView
.
as_view
(),
name
=
"poster_list"
),
re_path
(
r
"^poster$"
,
PosterListView
.
as_view
(),
name
=
"poster_list"
),
url
(
r
"^poster/create$"
,
PosterCreateView
.
as_view
(),
name
=
"poster_create"
),
re_path
(
r
"^poster/create$"
,
PosterCreateView
.
as_view
(),
name
=
"poster_create"
),
url
(
re_path
(
r
"^poster/(?P<poster_id>[0-9]+)/edit$"
,
r
"^poster/(?P<poster_id>[0-9]+)/edit$"
,
PosterEditView
.
as_view
(),
PosterEditView
.
as_view
(),
name
=
"poster_edit"
,
name
=
"poster_edit"
,
),
),
url
(
re_path
(
r
"^poster/(?P<poster_id>[0-9]+)/delete$"
,
r
"^poster/(?P<poster_id>[0-9]+)/delete$"
,
PosterDeleteView
.
as_view
(),
PosterDeleteView
.
as_view
(),
name
=
"poster_delete"
,
name
=
"poster_delete"
,
),
),
url
(
re_path
(
r
"^poster/moderate$"
,
r
"^poster/moderate$"
,
PosterModerateListView
.
as_view
(),
PosterModerateListView
.
as_view
(),
name
=
"poster_moderate_list"
,
name
=
"poster_moderate_list"
,
),
),
url
(
re_path
(
r
"^poster/(?P<object_id>[0-9]+)/moderate$"
,
r
"^poster/(?P<object_id>[0-9]+)/moderate$"
,
PosterModerateView
.
as_view
(),
PosterModerateView
.
as_view
(),
name
=
"poster_moderate"
,
name
=
"poster_moderate"
,
),
),
url
(
r
"^screen$"
,
ScreenListView
.
as_view
(),
name
=
"screen_list"
),
re_path
(
r
"^screen$"
,
ScreenListView
.
as_view
(),
name
=
"screen_list"
),
url
(
r
"^screen/create$"
,
ScreenCreateView
.
as_view
(),
name
=
"screen_create"
),
re_path
(
r
"^screen/create$"
,
ScreenCreateView
.
as_view
(),
name
=
"screen_create"
),
url
(
re_path
(
r
"^screen/(?P<screen_id>[0-9]+)/slideshow$"
,
r
"^screen/(?P<screen_id>[0-9]+)/slideshow$"
,
ScreenSlideshowView
.
as_view
(),
ScreenSlideshowView
.
as_view
(),
name
=
"screen_slideshow"
,
name
=
"screen_slideshow"
,
),
),
url
(
re_path
(
r
"^screen/(?P<screen_id>[0-9]+)/edit$"
,
r
"^screen/(?P<screen_id>[0-9]+)/edit$"
,
ScreenEditView
.
as_view
(),
ScreenEditView
.
as_view
(),
name
=
"screen_edit"
,
name
=
"screen_edit"
,
),
),
url
(
re_path
(
r
"^screen/(?P<screen_id>[0-9]+)/delete$"
,
r
"^screen/(?P<screen_id>[0-9]+)/delete$"
,
ScreenDeleteView
.
as_view
(),
ScreenDeleteView
.
as_view
(),
name
=
"screen_delete"
,
name
=
"screen_delete"
,
...
...
core/urls.py
View file @
be855c6c
...
@@ -23,189 +23,195 @@
...
@@ -23,189 +23,195 @@
#
#
#
#
from
django.
conf.
urls
import
url
from
django.urls
import
re_path
from
core.views
import
*
from
core.views
import
*
urlpatterns
=
[