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