Fakultas Ilmu Komputer UI

Commit 4a220334 authored by Ryan Karyadiputera's avatar Ryan Karyadiputera
Browse files

test3

parent 46bc2c8d
Pipeline #81589 passed with stage
in 2 minutes and 51 seconds
# Generated by Django 3.1.3 on 2021-06-06 14:05
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('lembaga', '0006_lembaga_last_activity'),
]
operations = [
migrations.RemoveField(
model_name='lembaga',
name='last_activity',
),
]
......@@ -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_activity = models.IntegerField('last activity', blank=True, null=True)
def __str__(self):
return self.nama
......
......@@ -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_activity = validated_data.pop('last_activity')
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_activity = last_activity
lembaga.save()
......
......@@ -18,7 +18,7 @@ def get_lembaga(request, time):
# # supervisor_lembaga2 = Lembaga.objects.filter(last_activity = None)
# # supervisor_lembaga = supervisor_lembaga1 | supervisor_lembaga2
# elif (time == "older"):
supervisor_lembaga = Lembaga.objects.filter(last_activity = None)
supervisor_lembaga = Lembaga.objects.all()
serializer = LembagaSerializer(supervisor_lembaga, context={'request': request}, many=True)
response = serializer.data
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment