I am new to Django. I am planning to a have a demo user account and i want to load data based on demo user's UUID(user's id). Is there another way to load the seed file without using fixtures?
seed file.
User.objects.create(
first_name = "John",
last_name = "Doe",
email = "john.doef@example.com",
gender = "M"
)
u = User.objects.last()
u.set_password("safestpassword")
u.save()
Track.objects.create(
title = 'track1',
description = "some description",
image_url = "image_url",
track_url = "track_url",
artist = "artist",
user_id = User.objects.last()
)
Track.objects.create(
title = 'track2',
description = "some description",
image_url = "image_url",
track_url = "track_url",
artist = "artist",
user_id = User.objects.last()
)
Thank you.