Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Commits
6c102a9f
Verified
Commit
6c102a9f
authored
4 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into 366-customise-django-colorfield-for-use-with-materialize
parents
9307cad1
99aedb0b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!473
Resolve "Customise django-colorfield for use with Materialize"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/core/mixins.py
+8
-0
8 additions, 0 deletions
aleksis/core/mixins.py
with
8 additions
and
0 deletions
aleksis/core/mixins.py
+
8
−
0
View file @
6c102a9f
...
...
@@ -5,6 +5,7 @@ from typing import Any, Callable, List, Optional, Tuple, Union
from
django.conf
import
settings
from
django.contrib
import
messages
from
django.contrib.auth.views
import
LoginView
,
SuccessURLAllowedHostsMixin
from
django.contrib.contenttypes.models
import
ContentType
from
django.contrib.sites.managers
import
CurrentSiteManager
from
django.contrib.sites.models
import
Site
...
...
@@ -415,6 +416,13 @@ class SuccessMessageMixin(ModelFormMixin):
return
super
().
form_valid
(
form
)
class
SuccessNextMixin
(
SuccessURLAllowedHostsMixin
):
redirect_field_name
=
"
next
"
def
get_success_url
(
self
)
->
str
:
return
LoginView
.
get_redirect_url
(
self
)
or
super
().
get_success_url
()
class
AdvancedCreateView
(
SuccessMessageMixin
,
CreateView
):
pass
...
...
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