Application setup
We create and start Django as usual:
django-admin startproject server_movierecsys
and from the server_movierecsys
folder we start the application:
python manage.py startapp books_recsys_app
Now the settings.py
needs to be configured. As we see in Chapter 6, Basics of Django: a simple web framework we set the installed apps, HTML templates, a layout formatting folder, and an SQLite database:
INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', 'rest_framework_swagger', 'books_recsys_app', ) TEMPLATE_DIRS = ( os.path.join(BASE_DIR, 'templates'), ) STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, "static"), ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } }
Apart from the standard apps...