Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. from django.db import models
  2.  
  3. # Create your models here.
  4. from django.db import models
  5. from django.forms import ModelForm
  6.  
  7.  
  8. class PatientRecord(models.Model):
  9. name = models.CharField(max_length=100)
  10. phonenumber = models.CharField(max_length=3)
  11. birth_date = models.DateField(blank=True, null=True)
  12.  
  13. def __unicode__(self):
  14. return self.name
  15.  
  16. class PatientHistory(models.Model):
  17. patientid = PatientRecord
  18. date = models.DateField(blank=True, null=True)
  19. analysis = models.CharField(max_length=100)
  20. prescription = models.CharField(max_length=100)
  21.  
  22. class PatientForm(ModelForm):
  23. class Meta:
  24. model = PatientRecord
  25.  
  26. class PatientHistory(ModelForm):
  27. class Meta:
  28. model = PatientHistory
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement