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
3dd56b74
Verified
Commit
3dd56b74
authored
3 years ago
by
Tom Teichler
Browse files
Options
Downloads
Patches
Plain Diff
Allow to invite person by id
parent
fb0bf2e5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!450
User invitations
Pipeline
#45096
failed
3 years ago
Stage: test
Stage: build
Stage: publish
Stage: docker
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
aleksis/core/forms.py
+1
-1
1 addition, 1 deletion
aleksis/core/forms.py
aleksis/core/urls.py
+1
-0
1 addition, 0 deletions
aleksis/core/urls.py
aleksis/core/views.py
+13
-0
13 additions, 0 deletions
aleksis/core/views.py
with
15 additions
and
1 deletion
aleksis/core/forms.py
+
1
−
1
View file @
3dd56b74
...
...
@@ -3,6 +3,7 @@ from typing import Any, Callable, Dict, Sequence
from
django
import
forms
from
django.conf
import
settings
from
django.contrib.auth
import
get_user_model
from
django.contrib.auth.models
import
Permission
from
django.contrib.sites.models
import
Site
from
django.core.exceptions
import
ValidationError
...
...
@@ -11,7 +12,6 @@ from django.http import HttpRequest
from
django.utils.translation
import
gettext_lazy
as
_
from
allauth.account.forms
import
SignupForm
from
allauth.account.utils
import
get_user_model
from
dj_cleavejs
import
CleaveWidget
from
django_select2.forms
import
ModelSelect2MultipleWidget
,
ModelSelect2Widget
,
Select2Widget
from
dynamic_preferences.forms
import
PreferenceForm
...
...
This diff is collapsed.
Click to expand it.
aleksis/core/urls.py
+
1
−
0
View file @
3dd56b74
...
...
@@ -62,6 +62,7 @@ urlpatterns = [
path
(
"
person/<int:id_>/
"
,
views
.
person
,
name
=
"
person_by_id
"
),
path
(
"
person/<int:pk>/edit/
"
,
views
.
EditPersonView
.
as_view
(),
name
=
"
edit_person_by_id
"
),
path
(
"
person/<int:id_>/delete/
"
,
views
.
delete_person
,
name
=
"
delete_person_by_id
"
),
path
(
"
person/<int:id_>/invite/
"
,
views
.
invite_person
,
name
=
"
invite_person_by_id
"
),
path
(
"
groups
"
,
views
.
groups
,
name
=
"
groups
"
),
path
(
"
groups/additional_fields
"
,
views
.
additional_fields
,
name
=
"
additional_fields
"
),
path
(
"
groups/child_groups/
"
,
views
.
groups_child_groups
,
name
=
"
groups_child_groups
"
),
...
...
This diff is collapsed.
Click to expand it.
aleksis/core/views.py
+
13
−
0
View file @
3dd56b74
...
...
@@ -1404,3 +1404,16 @@ class AccountRegisterView(SignupView):
kwargs
=
super
(
AccountRegisterView
,
self
).
get_form_kwargs
()
kwargs
[
"
request
"
]
=
self
.
request
return
kwargs
def
invite_person_by_id
(
request
:
HttpRequest
,
id_
:
int
)
->
HttpResponse
:
context
=
{}
person
=
Person
.
objects
.
get
(
id
=
id_
)
invite
=
PersonInvitation
.
objects
.
create
(
inviter
=
request
.
user
,
person
=
person
,
email
=
person
.
email
,
)
invite
.
send_invitation
()
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