Skip to content

muhammet-mucahit/IMDB-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IMDB-App

@ZeoAgency IMDB App Challenge with Django, Dgraph and Auth0

Auth0

Requirements.txt

Django~=2.0.6
python-jose
social-auth-app-django
pydgraph
nltk
snowballstemmer

Initial Requirements

  • Complete Auth0 and Dgraph tutorial
  • Understand Auth0 and Dgraph
  • Add the script to your auth0 rules of dashboard (Auth0 Tutorial Link includes this)
function (user, context, callback) {
  // role should only be set to verified users.
  if (!user.email || !user.email_verified) {
    return callback(null, user, context);
  }

  user.app_metadata = user.app_metadata || {};

  // set the 'admin' role to the following user
  const adminEmail = '<YOUR-OWN-EMAIL-ADDRESS>';
  user.app_metadata.role = user.email === adminEmail ? 'admin' : 'user';

  auth0.users.updateAppMetadata(user.user_id, user.app_metadata).then(() => {
    context.idToken['https://django-webapp/role'] = user.app_metadata.role;
    callback(null, user, context);
  }).catch((err) => {
    callback(err);
  });
}

Setup Repo

git clone https://github.com/muhammet-mucahit/IMDB-App.git
cd IMDB-App
Find **# FILL IT** comments in code and change some informations with yours
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate
python manage.py runserver

Tasks

  • Task 0. Login, signup, admin panel and email verification with Auth0.

  • Task 1. (Basic Details Query) List the details of cast and director of the film called "X-Men 2".

  • Task 2. (Group by and Aggregate) List all genre values ​​in the system and list the average of years they were released.

  • Task 3. (Get Details from App and Query) List actors and movies which have the same name as the logged-in user's name or surname.

  • Task 4. (Basic Query + Full Text + Aggregation of Strings) Find the films directed by "Bryan Singer" and make full text search to list the most important actors in the films.

  • Task 5. (Python Text Operation + Query) Clear the suffixes of words in the "Atatürk’ün Gençliğe Hitabesi" by using NLTK and Turkish Stemming. Then list all movie names that contain these words, even if they are additional.

  • Task 6. (Complex Query + Regex + Extra Iteration) List the names of the actors who played the most in the films which include "man" in their names but not "woman" and the list the other films in which they acted.

  • Task 7. (Getting Input from User to Run Basic Query) List films made before 2013 related to any genre value that user will provide.

  • Task 8. (Advanced Query Builder to Run Basic Queries)

Screenshots

Dgraph

Home Without Login

Login

Home With Login

Profile

Admin