Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nk20
Manage
Activity
Members
Labels
Plan
Issues
32
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
BDE
nk20
Commits
6242e316
Commit
6242e316
authored
5 years ago
by
ynerant
Browse files
Options
Downloads
Patches
Plain Diff
Update pre-registrations
parent
bdb0f677
No related branches found
No related tags found
1 merge request
!78
WEI
Pipeline
#8149
passed with warnings with stages
in 4 minutes and 1 second
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
apps/wei/tables.py
+1
-1
1 addition, 1 deletion
apps/wei/tables.py
apps/wei/urls.py
+2
-1
2 additions, 1 deletion
apps/wei/urls.py
apps/wei/views.py
+18
-0
18 additions, 0 deletions
apps/wei/views.py
templates/wei/weiclub_tables.html
+1
-1
1 addition, 1 deletion
templates/wei/weiclub_tables.html
with
22 additions
and
3 deletions
apps/wei/tables.py
+
1
−
1
View file @
6242e316
...
@@ -37,7 +37,7 @@ class WEIRegistrationTable(tables.Table):
...
@@ -37,7 +37,7 @@ class WEIRegistrationTable(tables.Table):
)
)
edit
=
tables
.
LinkColumn
(
edit
=
tables
.
LinkColumn
(
'
wei:wei_
detail
'
,
'
wei:wei_
update_registration
'
,
args
=
[
A
(
'
pk
'
)],
args
=
[
A
(
'
pk
'
)],
verbose_name
=
_
(
"
Edit
"
),
verbose_name
=
_
(
"
Edit
"
),
text
=
_
(
"
Edit
"
),
text
=
_
(
"
Edit
"
),
...
...
This diff is collapsed.
Click to expand it.
apps/wei/urls.py
+
2
−
1
View file @
6242e316
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
from
django.urls
import
path
from
django.urls
import
path
from
.views
import
WEIListView
,
WEICreateView
,
WEIDetailView
,
WEIUpdateView
,
WEIRegisterView
from
.views
import
WEIListView
,
WEICreateView
,
WEIDetailView
,
WEIUpdateView
,
WEIRegisterView
,
WEIUpdateRegistrationView
app_name
=
'
wei
'
app_name
=
'
wei
'
...
@@ -13,4 +13,5 @@ urlpatterns = [
...
@@ -13,4 +13,5 @@ urlpatterns = [
path
(
'
detail/<int:pk>/
'
,
WEIDetailView
.
as_view
(),
name
=
"
wei_detail
"
),
path
(
'
detail/<int:pk>/
'
,
WEIDetailView
.
as_view
(),
name
=
"
wei_detail
"
),
path
(
'
update/<int:pk>/
'
,
WEIUpdateView
.
as_view
(),
name
=
"
wei_update
"
),
path
(
'
update/<int:pk>/
'
,
WEIUpdateView
.
as_view
(),
name
=
"
wei_update
"
),
path
(
'
register/<int:wei_pk>/
'
,
WEIRegisterView
.
as_view
(),
name
=
"
wei_register
"
),
path
(
'
register/<int:wei_pk>/
'
,
WEIRegisterView
.
as_view
(),
name
=
"
wei_register
"
),
path
(
'
edit_registration/<int:pk>/
'
,
WEIUpdateRegistrationView
.
as_view
(),
name
=
"
wei_update_registration
"
),
]
]
This diff is collapsed.
Click to expand it.
apps/wei/views.py
+
18
−
0
View file @
6242e316
...
@@ -136,3 +136,21 @@ class WEIRegisterView(ProtectQuerysetMixin, LoginRequiredMixin, CreateView):
...
@@ -136,3 +136,21 @@ class WEIRegisterView(ProtectQuerysetMixin, LoginRequiredMixin, CreateView):
def
get_success_url
(
self
):
def
get_success_url
(
self
):
self
.
object
.
refresh_from_db
()
self
.
object
.
refresh_from_db
()
return
reverse_lazy
(
"
wei:wei_detail
"
,
kwargs
=
{
"
pk
"
:
self
.
object
.
wei
.
pk
})
return
reverse_lazy
(
"
wei:wei_detail
"
,
kwargs
=
{
"
pk
"
:
self
.
object
.
wei
.
pk
})
class
WEIUpdateRegistrationView
(
ProtectQuerysetMixin
,
LoginRequiredMixin
,
UpdateView
):
"""
Update a registration for the WEI
"""
model
=
WEIRegistration
form_class
=
WEIRegistrationForm
def
get_form
(
self
,
form_class
=
None
):
form
=
super
().
get_form
(
form_class
)
del
form
.
fields
[
"
user
"
]
return
form
def
get_success_url
(
self
):
self
.
object
.
refresh_from_db
()
return
reverse_lazy
(
"
wei:wei_detail
"
,
kwargs
=
{
"
pk
"
:
self
.
object
.
wei
.
pk
})
This diff is collapsed.
Click to expand it.
templates/wei/weiclub_tables.html
+
1
−
1
View file @
6242e316
...
@@ -102,7 +102,7 @@
...
@@ -102,7 +102,7 @@
<hr>
<hr>
{% endif %}
{% endif %}
{% if all_registrations.data
or True
%}
{% if all_registrations.data %}
<div
class=
"card"
>
<div
class=
"card"
>
<div
class=
"card-header position-relative"
id=
"historyListHeading"
>
<div
class=
"card-header position-relative"
id=
"historyListHeading"
>
<a
class=
"btn btn-link stretched-link font-weight-bold"
>
<a
class=
"btn btn-link stretched-link font-weight-bold"
>
...
...
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