Home > other >  How can two columns of relational table at the same time?
How can two columns of relational table at the same time?

Time:12-05

How can two columns of relational table at the same time?
The class Job_title (models. Model) :
Job=models. CharField (verbose_name='title management, max_length=50)

The class Meta:
Management verbose_name='title'
Management verbose_name_plural='title'

Def the __str__ (self) :
Return the self. The job


The class Employees (models. Model) :
Name=models. CharField (verbose_name='name', max_length=50)
Sex=models. CharField (verbose_name='gender', max_length=50)
Files_id=models. CharField (verbose_name='file number, max_length=50)
Id_number=models. CharField (verbose_name='id', max_length=50)
Native_place=models. CharField (verbose_name='native', max_length=50)
Nation=models. CharField (verbose_name='nation', max_length=50)
The birthdate=models. DateField (verbose_name='date of birth)
Work_date=models. DateField (verbose_name='working time)
Join_date=models. DateField (verbose_name='in hospital time')
O_education=models. CharField (verbose_name='initial degree, max_length=50)
N_education=models. CharField (verbose_name='highest record of formal schooling, max_length=50)

Job_title=models. ForeignKey (job_title, verbose_name='now with the title' on_delete=models. The CASCADE, blank=True, null=True)
Employ_date=models. DateField (verbose_name='time by now the title')

U_job_title=models. ForeignKey (Job_title verbose_name='not by the title, on_delete=models. The CASCADE, blank=True, null=True)
# get_date=models. DateField (verbose_name='made not by time, blank=True, null=True)


How can two columns of relational table at the same time? Any trouble teachers to help give directions
  • Related