select realted for foreign key table in django
TravelAgencyCharacteristics.objects.filter(
travel_agency__in=travel_agency_ids).select_related('travel_characteristics')
select realted for foreign key table in django
TravelAgencyCharacteristics.objects.filter(
travel_agency__in=travel_agency_ids).select_related('travel_characteristics')
django create foreignkey from id
### Specify `fk_id` ###
# Create
employee = Employee.objects.create(
first_name='first',
last_name='last',
type_id=4,
)
# Edit
employee = Employee(first_name="Name", last_name="Name")
employee.type_id = 4
employee.save()
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us