Opened 3 years ago

Closed 3 years ago

#32974 closed Uncategorized (invalid)

multiple form

Reported by: yusufardabili9 Owned by: nobody
Component: Uncategorized Version: 3.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

models.py

class Pengadu(models.Model):
    STATUS = (
        ("Keluarga","Keluarga"),
        ("Anak","Anak"),
        ("Istri","Istri"),
        ("Suami","Suami"),
        ("PMI","PMI"),
    )
    nama = models.CharField(max_length=255)
    tempat_tgl_lahir = models.DateField()
    alamat = models.TextField()
    no_tlp_hp = models.CharField(max_length=20, null=False)
    status = models.CharField(max_length=50, choices=STATUS)

class Pmi(models.Model):
    nama = models.CharField(max_length=255)
    tempat_tgl_lahir = models.DateField()
    alamat = models.TextField()
    no_tlp_hp = models.CharField(max_length=20, null=False)
    no_paspor = models.CharField(max_length=25, null=True)
    tgl_berangkat = models.DateField(null=True)
    negara_tujuan = models.CharField(max_length=255)
    status = models.ForeignKey("Status", on_delete=models.CASCADE)
    permasalahan = models.TextField()
    id_ppmi = models.ForeignKey("Ppmi", on_delete=models.CASCADE)
    id_sponsor = models.ForeignKey("Sponsor", null=True, on_delete=models.CASCADE)
    id_agensi = models.ForeignKey("Agensi", on_delete=models.CASCADE)
    id_pengguna_jasa = models.ForeignKey('Pengguna_jasa', null=True, on_delete=models.CASCADE)

    def __str__(self):
        return self.nama

lass Kasus(models.Model):
    STATUS=(
        ("Baru","Baru"),
        ("Proses","Proses"),
        ("Pending","Pending"),
        ("Selesai","Selesai"),
    )
    pengadu = models.ForeignKey(Pengadu, on_delete=models.CASCADE)
    pmi = models.OneToOneField(Pmi, on_delete=models.CASCADE)
    status = models.CharField(max_length=50, choices=STATUS)
    tgl_pengaduan = models.DateField()
    tgl_selesai = models.DateField(null=True, blank=True)
    id_staff = models.ForeignKey("Staff", on_delete=models.CASCADE)

my hope, want to make pmi form and case form in 1 form. how do i do it?

Change History (1)

comment:1 by Mariusz Felisiak, 3 years ago

Resolution: invalid
Status: newclosed

Please don't use Trac as a support channel. Closing per TicketClosingReasons/UseSupportChannels.

Note: See TracTickets for help on using tickets.
Back to Top