Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AKPlanning
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
KIF
AKPlanning
Commits
9a4ba8de
Commit
9a4ba8de
authored
4 years ago
by
Nadja Geisler
Browse files
Options
Downloads
Plain Diff
Merge branch 'unique_fix' into filter_submission_suggestions
parents
81e5c00d
1fbfaa72
No related branches found
Branches containing commit
No related tags found
1 merge request
!13
Aklist
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
AKSubmission/forms.py
+4
-1
4 additions, 1 deletion
AKSubmission/forms.py
AKSubmission/views.py
+4
-8
4 additions, 8 deletions
AKSubmission/views.py
with
8 additions
and
9 deletions
AKSubmission/forms.py
+
4
−
1
View file @
9a4ba8de
...
...
@@ -136,7 +136,10 @@ class AKOwnerForm(forms.ModelForm):
class
Meta
:
model
=
AKOwner
fields
=
[
'
name
'
,
'
institution
'
,
'
link
'
]
fields
=
[
'
name
'
,
'
institution
'
,
'
link
'
,
'
event
'
]
widgets
=
{
'
event
'
:
forms
.
HiddenInput
}
class
AKDurationForm
(
forms
.
ModelForm
):
...
...
This diff is collapsed.
Click to expand it.
AKSubmission/views.py
+
4
−
8
View file @
9a4ba8de
...
...
@@ -8,7 +8,6 @@ from django.views import View
from
django.views.generic
import
ListView
,
DetailView
,
CreateView
,
UpdateView
,
DeleteView
from
AKModel.models
import
AK
,
AKCategory
,
AKTag
,
AKOwner
,
AKSlot
from
AKModel.models
import
Event
from
AKModel.views
import
EventSlugMixin
from
AKModel.views
import
FilterByEventSlugMixin
from
AKSubmission.forms
import
AKWishForm
,
AKOwnerForm
,
AKEditForm
,
AKSubmissionForm
,
AKDurationForm
...
...
@@ -180,13 +179,10 @@ class AKOwnerCreateView(EventSlugMixin, CreateView):
return
reverse_lazy
(
'
submit:submit_ak
'
,
kwargs
=
{
'
event_slug
'
:
self
.
kwargs
[
'
event_slug
'
],
'
owner_slug
'
:
self
.
object
.
slug
})
def
form_valid
(
self
,
form
):
instance
=
form
.
save
(
commit
=
False
)
# Set event
instance
.
event
=
Event
.
get_by_slug
(
self
.
kwargs
[
"
event_slug
"
])
return
super
().
form_valid
(
form
)
def
get_initial
(
self
):
initials
=
super
(
AKOwnerCreateView
,
self
).
get_initial
()
initials
[
'
event
'
]
=
self
.
event
return
initials
class
AKOwnerSelectDispatchView
(
EventSlugMixin
,
View
):
...
...
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