[Answer]-Django model's value depending on other model's value

1👍

To provide code implementing what @ozgur suggested:

from django.db import models
from django.contrib.auth.models import User

class UserProfile(models.Model):
    godzina = models.ForeignKey('Godzina')

More info here: https://docs.djangoproject.com/en/1.7/ref/models/fields/#foreignkey

👤dylrei

Leave a comment