Django : Get specific columns from multiple tables
Try this:
UserLog.objects.filter(event_id=1).values('log_id',
'time',
'user_id',
'event_id',
'event__description')
Alternately, you could use select_related:
UserLog.objects.filter(event__id=1).select_related('event')
then you'll get UserLog
objects, with the event pre-fetched, so you can access the event without triggering another query.
(Also, standard naming convention would be to call the model Event
, not Events
)