1
Am在像EmployerRegistration和PostJob這樣的數據庫中有表。我將這些表與empid(PostJob的外鍵)相關聯。使用這個empid我需要PostJob最多5.我想顯示警報消息,如登錄時可用的帖子數。有人幫助如何看待這種情況。Django限制postjob
models.py
class EmployerRegistration(models.Model):
username=models.CharField(max_length=30)
password=models.CharField(max_length=30)
class PostJob(models.Model):
emp = models.ForeignKey(EmployerRegistration)
jobtitle = models.CharField(max_length=30)
jobsummary = models.TextField()
key_skills = models.CharField(max_length=30)
experince = models.IntegerField(default=0)
salary = models.IntegerField(default=0)
你說的是JavaScript警告?如果沒有JavaScript警報,那麼我建議你看看這個鏈接https://docs.djangoproject.com/en/dev/ref/contrib/messages/ – 2013-04-08 09:00:08