Register Models

Report a typo

You have the Rating model in your application:

class Rating(models.Model):
    film = models.CharField(max_length=128)
    user = models.ForeignKey(User, on_delete=models.CASCADE)
    value = models.IntegerField()

Create the RatingAdmin class and register it for the Rating model.

Write a program in Python 3
from django.contrib import admin
___

Create a free account to access the full topic