Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Maják
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Maják
Commits
6830065c
Commit
6830065c
authored
3 years ago
by
jan.bednarik
Browse files
Options
Downloads
Patches
Plain Diff
donate: Redirect to homepage on 404
parent
4e9d29e6
No related branches found
No related tags found
2 merge requests
!411
release
,
!410
Dary
Pipeline
#5673
passed
3 years ago
Stage: build
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
donate/models.py
+4
-0
4 additions, 0 deletions
donate/models.py
with
4 additions
and
0 deletions
donate/models.py
+
4
−
0
View file @
6830065c
...
@@ -4,6 +4,7 @@ from django.conf import settings
...
@@ -4,6 +4,7 @@ from django.conf import settings
from
django.core.cache
import
cache
from
django.core.cache
import
cache
from
django.core.paginator
import
EmptyPage
,
PageNotAnInteger
,
Paginator
from
django.core.paginator
import
EmptyPage
,
PageNotAnInteger
,
Paginator
from
django.db
import
models
from
django.db
import
models
from
django.http
import
HttpResponseRedirect
from
django.shortcuts
import
redirect
from
django.shortcuts
import
redirect
from
django.utils.translation
import
gettext_lazy
from
django.utils.translation
import
gettext_lazy
from
modelcluster.fields
import
ParentalKey
from
modelcluster.fields
import
ParentalKey
...
@@ -194,6 +195,9 @@ class DonateHomePage(DonateFormMixin, DonateFormAmountsMixin, Page, MetadataPage
...
@@ -194,6 +195,9 @@ class DonateHomePage(DonateFormMixin, DonateFormAmountsMixin, Page, MetadataPage
def
root_page
(
self
):
def
root_page
(
self
):
return
self
return
self
def
get_404_response
(
self
,
request
):
return
HttpResponseRedirect
(
self
.
full_url
)
@cached_property
@cached_property
def
info_page_url
(
self
):
def
info_page_url
(
self
):
return
get_subpage_url
(
self
,
DonateInfoPage
)
return
get_subpage_url
(
self
,
DonateInfoPage
)
...
...
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