|
|
@ -14,17 +14,17 @@ class Project(Volunteer): |
|
|
|
start = models.DateTimeField('start date') |
|
|
|
# contact = models.ForeignKey(Volonteer, on_delete = models.CASCADE, null = True) |
|
|
|
|
|
|
|
# pid = models.IntegerField(null=True) # automaticly generated |
|
|
|
@property |
|
|
|
def pid(self): |
|
|
|
pid = "hurzel " + self.get_pk |
|
|
|
print(pid) |
|
|
|
return pid |
|
|
|
|
|
|
|
# def save(self,*args,**kwargs): |
|
|
|
# self.pid = |
|
|
|
# super().save(*args,*kwargs) |
|
|
|
# |
|
|
|
pid = models.IntegerField(null=True) # automaticly generated |
|
|
|
# @property |
|
|
|
# def pid(self): |
|
|
|
# pid = "hurzel " + self.get_pk |
|
|
|
# print(pid) |
|
|
|
# return pid |
|
|
|
|
|
|
|
def save(self,*args,**kwargs): |
|
|
|
self.pid = 10000 + self.pk |
|
|
|
super().save(*args,*kwargs) |
|
|
|
|
|
|
|
def __str__(self): |
|
|
|
return self.name |
|
|
|
|
|
|
|