Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Paweljong
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
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
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
Teckids
Projekt Hack-n-Fun
AlekSIS-App-Paweljong
Commits
4434211d
Commit
4434211d
authored
3 years ago
by
Tom Teichler
Browse files
Options
Downloads
Patches
Plain Diff
Fix syntax
parent
ea7fb0a9
No related branches found
No related tags found
1 merge request
!6
Resolve "Slug for event must not be the short_name of the group"
Pipeline
#56300
failed
3 years ago
Stage: prepare
Stage: test
Stage: build
Stage: publish
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/apps/paweljong/forms.py
+2
-1
2 additions, 1 deletion
aleksis/apps/paweljong/forms.py
aleksis/apps/paweljong/models.py
+2
-2
2 additions, 2 deletions
aleksis/apps/paweljong/models.py
with
4 additions
and
3 deletions
aleksis/apps/paweljong/forms.py
+
2
−
1
View file @
4434211d
...
...
@@ -378,7 +378,8 @@ class RegisterEventConsent(ExtensibleForm):
field_instance
=
forms
.
BooleanField
(
required
=
True
,
label
=
_
(
"
I confirm that the retraction of the registration is not possible anymore after {}
"
"
I confirm that the retraction of the registration is not possible anymore
"
"
after {}
"
).
format
(
event
.
date_retraction
),
)
self
.
fields
[
"
retraction_deadline
"
]
=
field_instance
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/paweljong/models.py
+
2
−
2
View file @
4434211d
...
...
@@ -2,9 +2,9 @@ from datetime import datetime
from
django.db
import
models
from
django.urls
import
reverse
from
django.utils.text
import
slugify
from
django.utils.timezone
import
now
from
django.utils.translation
import
gettext_lazy
as
_
from
django.utils.text
import
slugify
from
ckeditor.fields
import
RichTextField
from
django_iban.fields
import
IBANField
...
...
@@ -45,7 +45,7 @@ class Event(ExtensibleModel):
information
=
RichTextField
(
verbose_name
=
_
(
"
Information about the event
"
))
terms
=
models
.
ManyToManyField
(
Terms
,
verbose_name
=
_
(
"
Terms
"
),
related_name
=
"
event
"
,
blank
=
True
)
def
save
(
self
.
*
args
,
**
kwargs
):
def
save
(
self
,
*
args
,
**
kwargs
):
if
not
self
.
slug
:
if
self
.
linked_group
.
short_name
:
self
.
slug
=
slugify
(
self
.
linked_group
.
short_name
)
...
...
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