i want make an extend of the User Model with field from another class (structure in models.py in immob app) in django ,i will show you my project this is my project structure
+INVEST_APP
settings.py
urls.py
views.py
wsgi.py
>compte
>immob
>static
>staticfiles
>templates
__init__.py
manage.py
and this is my immob model
class structure(models.Model):
structure_code=models.CharField(max_length=1)
structure_desig=models.CharField(max_length=350)
class service(models.Model):
structure_id=models.ForeignKey(structure,
on_delete=models.CASCADE,default=0)
service_desig=models.CharField(max_length=350)
class immob(models.Model):
immo_code=models.CharField(max_length=7)
immo_desig=models.CharField(max_length=150)
immo_qte=models.FloatField(default=1)
immo_datemes=models.DateTimeField()
immo_cptimmob=models.CharField(max_length=10)
immo_dureevie=models.IntegerField(default=7)
immo_numaut=models.CharField(max_length=4)
immo_origine=models.CharField(max_length=1)
immo_fournisseur=models.CharField(max_length=150)
immo_nufact=models.CharField(max_length=20)
immo_datefact=models.DateTimeField()
immo_valht=models.DecimalField(max_digits=18,decimal_places=2)
immo_monaie=models.CharField(max_length=3)
immo_tauxcvt=models.DecimalField(max_digits=18,decimal_places=2)
immo_tauxctrval=models.DecimalField(max_digits=18,decimal_places=2)
immo_frais=models.DecimalField(max_digits=18,decimal_places=2)
immo_coutacq=models.DecimalField(max_digits=18,decimal_places=2)
immo_refcmde=models.CharField(max_length=35)
immo_datecmde=models.DateField()
immo_journee=models.CharField(max_length=10)
immo_cptanal=models.CharField(max_length=9)
immo_local=models.CharField(max_length=45)
immo_mode_amort=models.CharField(max_length=1)
immo_code_r=models.CharField(max_length=2)
immo_val_amort=models.DecimalField(max_digits=18,decimal_places=2)
immo_status=models.CharField(max_length=1)
immo_code_bar=models.CharField(max_length=25)
service_id=models.ForeignKey(service, on_delete=models.CASCADE,default=0)
finaly i want get this in signup.html
username:........
password:.......
structure:......
(the field structure is dblookup combobox it means i want read it from database) thank you