Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hub
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cyroxx
hub
Commits
41abb527
Commit
41abb527
authored
Sep 23, 2023
by
HeJ
Browse files
Options
Downloads
Patches
Plain Diff
backoffice/staticpages: remove 'new page' functionality (broken anyway)
parent
54b60170
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/backoffice/templates/backoffice/staticpage_list.html
+0
-3
0 additions, 3 deletions
src/backoffice/templates/backoffice/staticpage_list.html
src/backoffice/urls.py
+0
-1
0 additions, 1 deletion
src/backoffice/urls.py
src/backoffice/views/pages.py
+0
-37
0 additions, 37 deletions
src/backoffice/views/pages.py
with
0 additions
and
41 deletions
src/backoffice/templates/backoffice/staticpage_list.html
+
0
−
3
View file @
41abb527
...
...
@@ -32,9 +32,6 @@
</tbody>
</table>
</div>
<div
class=
"card-footer"
>
<a
href=
"{% url 'backoffice:page-new' %}"
>
add a new page
</a>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
src/backoffice/urls.py
+
0
−
1
View file @
41abb527
...
...
@@ -43,7 +43,6 @@ urlpatterns = [
path
(
'
conferences
'
,
misc
.
ConferenceSelectionView
.
as_view
(),
name
=
'
conference_selection
'
),
path
(
'
pages
'
,
pages
.
PagesView
.
as_view
(),
name
=
'
pages
'
),
path
(
'
page/new
'
,
pages
.
NewPageView
.
as_view
(),
name
=
'
page-new
'
),
path
(
'
page/<uuid:pk>
'
,
pages
.
PageView
.
as_view
(),
name
=
'
page-detail
'
),
path
(
'
page/<uuid:pk>/delete
'
,
pages
.
PageDeleteView
.
as_view
(),
name
=
'
page-delete
'
),
path
(
'
page/<uuid:pk>/delete-revision
'
,
pages
.
PageRevisionDeleteView
.
as_view
(),
name
=
'
page-revision-delete
'
),
...
...
This diff is collapsed.
Click to expand it.
src/backoffice/views/pages.py
+
0
−
37
View file @
41abb527
...
...
@@ -58,43 +58,6 @@ class PagesView(ConferenceMixin, ListView):
return
context
class
NewPageView
(
ConferenceMixin
,
FormView
):
permission_required
=
(
'
core.static_pages
'
)
form_class
=
StaticPageCreateForm
template_name
=
'
backoffice/staticpage_form.html
'
def
post
(
self
,
request
,
*
args
,
**
kwargs
):
try
:
response
=
super
().
post
(
request
,
*
args
,
**
kwargs
)
except
IntegrityError
:
messages
.
error
(
request
,
_
(
'
StaticPage__slug__duplicate
'
))
response
=
self
.
get
(
request
,
*
args
,
**
kwargs
)
return
response
def
form_valid
(
self
,
form
):
static_page
=
form
.
save
(
commit
=
False
)
static_page
.
conference
=
self
.
conference
static_page
.
save
()
revision
=
StaticPageRevision
(
page
=
static_page
,
title
=
form
.
cleaned_data
[
'
title
'
],
author
=
self
.
request
.
user
,
body
=
form
.
cleaned_data
[
'
body
'
])
revision
.
save
()
revision
.
set_public
()
revision
.
save
()
self
.
object
=
static_page
return
super
().
form_valid
(
form
)
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
().
get_context_data
(
**
kwargs
)
context
[
'
active_page
'
]
=
'
pages
'
return
context
def
get_success_url
(
self
,
*
args
,
**
kwargs
):
return
reverse
(
'
backoffice:page-detail
'
,
kwargs
=
{
'
pk
'
:
self
.
object
.
pk
})
class
PageView
(
ConferenceMixin
,
UpdateView
):
permission_required
=
(
'
core.static_pages
'
)
form_class
=
StaticPageEditForm
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment