Admin interface and API

In order to manage the data of the application, the admin interface and an API point can be set. From the admin panel we can see both the movie's data, and the user registered, writing the following admin.py file:

from django.contrib import admin
from books_recsys_app.models import MovieData,UserProfile
      
class MoviesAdmin(admin.ModelAdmin):
      list_display = ['title', 'description']

admin.site.register(UserProfile)
admin.site.register(MovieData,MoviesAdmin)

After setting the corresponding admin URL on the urls.py file:

url(r'^admin/', include(admin.site.urls))

We should see our admin panel (at http://localhost:8000/admin/) with the two models and the data within the models resembles the fields specified in the admin.py file:

To ...

Get Machine Learning for the Web now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.