Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Ryan Karyadiputera
ppl-berkah-back
Commits
d9a39306
Commit
d9a39306
authored
Jun 06, 2021
by
Ryan Karyadiputera
Browse files
test3
parent
e230ae1a
Pipeline
#81595
passed with stage
in 2 minutes and 27 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lembaga/migrations/0006_lembaga_last_insertion.py
0 → 100644
View file @
d9a39306
# Generated by Django 3.1.3 on 2021-06-06 14:22
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'lembaga'
,
'0005_errormessage'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'lembaga'
,
name
=
'last_insertion'
,
field
=
models
.
IntegerField
(
blank
=
True
,
null
=
True
,
verbose_name
=
'last insertion'
),
),
]
lembaga/models.py
View file @
d9a39306
...
...
@@ -35,7 +35,7 @@ class Lembaga(models.Model):
beneficaries
=
models
.
CharField
(
max_length
=
1024
)
alamat
=
models
.
CharField
(
max_length
=
1024
)
praktikum_ke
=
models
.
IntegerField
()
#
last_
activity
= models.IntegerField('last
activity
', blank=True, null=True)
last_
insertion
=
models
.
IntegerField
(
'last
insertion
'
,
blank
=
True
,
null
=
True
)
def
__str__
(
self
):
return
self
.
nama
...
...
lembaga/serializers.py
View file @
d9a39306
...
...
@@ -75,7 +75,7 @@ class LembagaSerializer(serializers.ModelSerializer):
praktikum_ke
=
validated_data
.
pop
(
'praktikum_ke'
)
beneficaries
=
validated_data
.
pop
(
'beneficaries'
)
alamat
=
validated_data
.
pop
(
'alamat'
)
#
last_
activity
= validated_data.pop('last_
activity
')
last_
insertion
=
validated_data
.
pop
(
'last_
insertion
'
)
nama_tema
=
validated_data
.
pop
(
'tema'
)[
'nama'
]
...
...
@@ -99,7 +99,7 @@ class LembagaSerializer(serializers.ModelSerializer):
lembaga
.
praktikum_ke
=
praktikum_ke
lembaga
.
beneficaries
=
beneficaries
lembaga
.
alamat
=
alamat
#
lembaga.last_
activity = last_activity
lembaga
.
last_
insertion
=
last_insertion
lembaga
.
save
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment