├── .gitignore ├── netflix_clone ├── gladiator._V1_.jpg ├── manage.py ├── media │ ├── Screen-Shot-2019-04-23-at-4.57.50-PM.png │ ├── gladiator-e1541103171671.jpg │ └── xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg ├── movies │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── 0002_auto_20191020_0533.py │ │ ├── 0003_auto_20191020_0541.py │ │ └── __init__.py │ ├── models.py │ ├── static │ │ ├── .DS_Store │ │ └── movies │ │ │ ├── assets │ │ │ └── logo.svg │ │ │ └── style.css │ ├── templates │ │ └── movies │ │ │ ├── base.html │ │ │ ├── index.html │ │ │ └── movie.html │ ├── tests.py │ └── views.py └── netflix_clone │ ├── __init__.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py └── requirements.txt /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### Python template 3 | # Byte-compiled / optimized / DLL files 4 | __pycache__/ 5 | *.py[cod] 6 | *$py.class 7 | 8 | # C extensions 9 | *.so 10 | 11 | # Distribution / packaging 12 | .Python 13 | build/ 14 | develop-eggs/ 15 | dist/ 16 | downloads/ 17 | eggs/ 18 | .eggs/ 19 | lib/ 20 | lib64/ 21 | parts/ 22 | sdist/ 23 | var/ 24 | wheels/ 25 | pip-wheel-metadata/ 26 | share/python-wheels/ 27 | *.egg-info/ 28 | .installed.cfg 29 | *.egg 30 | MANIFEST 31 | 32 | # PyInstaller 33 | # Usually these files are written by a python script from a template 34 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 35 | *.manifest 36 | *.spec 37 | 38 | # Installer logs 39 | pip-log.txt 40 | pip-delete-this-directory.txt 41 | 42 | # Unit test / coverage reports 43 | htmlcov/ 44 | .tox/ 45 | .nox/ 46 | .coverage 47 | .coverage.* 48 | .cache 49 | nosetests.xml 50 | coverage.xml 51 | *.cover 52 | .hypothesis/ 53 | .pytest_cache/ 54 | 55 | # Translations 56 | *.mo 57 | *.pot 58 | 59 | # Django stuff: 60 | *.log 61 | local_settings.py 62 | db.sqlite3 63 | db.sqlite3-journal 64 | 65 | # Flask stuff: 66 | instance/ 67 | .webassets-cache 68 | 69 | # Scrapy stuff: 70 | .scrapy 71 | 72 | # Sphinx documentation 73 | docs/_build/ 74 | 75 | # PyBuilder 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | .python-version 87 | 88 | # pipenv 89 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 90 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 91 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 92 | # install all needed dependencies. 93 | #Pipfile.lock 94 | 95 | # celery beat schedule file 96 | celerybeat-schedule 97 | 98 | # SageMath parsed files 99 | *.sage.py 100 | 101 | # Environments 102 | .env 103 | .venv 104 | env/ 105 | venv/ 106 | ENV/ 107 | env.bak/ 108 | venv.bak/ 109 | 110 | # Spyder project settings 111 | .spyderproject 112 | .spyproject 113 | 114 | # Rope project settings 115 | .ropeproject 116 | 117 | # mkdocs documentation 118 | /site 119 | 120 | # mypy 121 | .mypy_cache/ 122 | .dmypy.json 123 | dmypy.json 124 | 125 | # Pyre type checker 126 | .pyre/ 127 | 128 | ### JetBrains template 129 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm 130 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 131 | 132 | # User-specific stuff 133 | .idea/**/workspace.xml 134 | .idea/**/tasks.xml 135 | .idea/**/usage.statistics.xml 136 | .idea/**/dictionaries 137 | .idea/**/shelf 138 | 139 | # Generated files 140 | .idea/**/contentModel.xml 141 | 142 | # Sensitive or high-churn files 143 | .idea/**/dataSources/ 144 | .idea/**/dataSources.ids 145 | .idea/**/dataSources.local.xml 146 | .idea/**/sqlDataSources.xml 147 | .idea/**/dynamic.xml 148 | .idea/**/uiDesigner.xml 149 | .idea/**/dbnavigator.xml 150 | 151 | # Gradle 152 | .idea/**/gradle.xml 153 | .idea/**/libraries 154 | 155 | # Gradle and Maven with auto-import 156 | # When using Gradle or Maven with auto-import, you should exclude module files, 157 | # since they will be recreated, and may cause churn. Uncomment if using 158 | # auto-import. 159 | # .idea/modules.xml 160 | # .idea/*.iml 161 | # .idea/modules 162 | # *.iml 163 | # *.ipr 164 | 165 | # CMake 166 | cmake-build-*/ 167 | 168 | # Mongo Explorer plugin 169 | .idea/**/mongoSettings.xml 170 | 171 | # File-based project format 172 | *.iws 173 | 174 | # IntelliJ 175 | out/ 176 | 177 | # mpeltonen/sbt-idea plugin 178 | .idea_modules/ 179 | 180 | # JIRA plugin 181 | atlassian-ide-plugin.xml 182 | 183 | # Cursive Clojure plugin 184 | .idea/replstate.xml 185 | 186 | # Crashlytics plugin (for Android Studio and IntelliJ) 187 | com_crashlytics_export_strings.xml 188 | crashlytics.properties 189 | crashlytics-build.properties 190 | fabric.properties 191 | 192 | # Editor-based Rest Client 193 | .idea/httpRequests 194 | 195 | # Android studio 3.1+ serialized cache file 196 | .idea/caches/build_file_checksums.ser 197 | 198 | *.idea/ 199 | -------------------------------------------------------------------------------- /netflix_clone/gladiator._V1_.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverProgrammer/netflix_clone/49c36c007312951803b2045eb66cccdcd591d464/netflix_clone/gladiator._V1_.jpg -------------------------------------------------------------------------------- /netflix_clone/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'netflix_clone.settings') 9 | try: 10 | from django.core.management import execute_from_command_line 11 | except ImportError as exc: 12 | raise ImportError( 13 | "Couldn't import Django. Are you sure it's installed and " 14 | "available on your PYTHONPATH environment variable? Did you " 15 | "forget to activate a virtual environment?" 16 | ) from exc 17 | execute_from_command_line(sys.argv) 18 | 19 | 20 | if __name__ == '__main__': 21 | main() 22 | -------------------------------------------------------------------------------- /netflix_clone/media/Screen-Shot-2019-04-23-at-4.57.50-PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverProgrammer/netflix_clone/49c36c007312951803b2045eb66cccdcd591d464/netflix_clone/media/Screen-Shot-2019-04-23-at-4.57.50-PM.png -------------------------------------------------------------------------------- /netflix_clone/media/gladiator-e1541103171671.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverProgrammer/netflix_clone/49c36c007312951803b2045eb66cccdcd591d464/netflix_clone/media/gladiator-e1541103171671.jpg -------------------------------------------------------------------------------- /netflix_clone/media/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverProgrammer/netflix_clone/49c36c007312951803b2045eb66cccdcd591d464/netflix_clone/media/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg -------------------------------------------------------------------------------- /netflix_clone/movies/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverProgrammer/netflix_clone/49c36c007312951803b2045eb66cccdcd591d464/netflix_clone/movies/__init__.py -------------------------------------------------------------------------------- /netflix_clone/movies/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Movie 4 | 5 | # Register your models here. 6 | admin.site.register(Movie) 7 | -------------------------------------------------------------------------------- /netflix_clone/movies/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class MoviesConfig(AppConfig): 5 | name = 'movies' 6 | -------------------------------------------------------------------------------- /netflix_clone/movies/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.6 on 2019-10-20 05:27 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [ 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='Movies', 16 | fields=[ 17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('title', models.CharField(max_length=100)), 19 | ('synopsis', models.TextField(blank=True, null=True)), 20 | ], 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /netflix_clone/movies/migrations/0002_auto_20191020_0533.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.6 on 2019-10-20 05:33 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('movies', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='movies', 15 | name='thumbnail', 16 | field=models.ImageField(null=True, upload_to=''), 17 | ), 18 | migrations.AddField( 19 | model_name='movies', 20 | name='video_link', 21 | field=models.URLField(max_length=1000, null=True), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /netflix_clone/movies/migrations/0003_auto_20191020_0541.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.2.6 on 2019-10-20 05:41 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('movies', '0002_auto_20191020_0533'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RenameModel( 14 | old_name='Movies', 15 | new_name='Movie', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /netflix_clone/movies/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverProgrammer/netflix_clone/49c36c007312951803b2045eb66cccdcd591d464/netflix_clone/movies/migrations/__init__.py -------------------------------------------------------------------------------- /netflix_clone/movies/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here 4 | class Movie(models.Model): 5 | title = models.CharField(max_length=100, null=False, blank=False) 6 | synopsis = models.TextField(null=True, blank=True) 7 | thumbnail = models.ImageField(null=True) 8 | video_link = models.URLField(max_length=1000, null=True) 9 | 10 | def __str__(self): 11 | return self.title 12 | 13 | -------------------------------------------------------------------------------- /netflix_clone/movies/static/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverProgrammer/netflix_clone/49c36c007312951803b2045eb66cccdcd591d464/netflix_clone/movies/static/.DS_Store -------------------------------------------------------------------------------- /netflix_clone/movies/static/movies/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /netflix_clone/movies/static/movies/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #141414; 3 | } 4 | 5 | nav { 6 | background-color: transparent; 7 | padding-left: 0.75rem; 8 | } 9 | 10 | nav .brand-logo img { 11 | max-width: 92px; 12 | } 13 | 14 | .home-movies-container { 15 | display: flex; 16 | flex-wrap: wrap; 17 | } 18 | 19 | .home-movie { 20 | flex: 1 0 21%; 21 | margin-left: 2px; 22 | margin-right: 2px; 23 | } -------------------------------------------------------------------------------- /netflix_clone/movies/templates/movies/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Home 6 | 7 | 8 | 9 | 10 | {% load static %} 11 | 12 | 13 | 14 | 15 | 16 | 26 |
27 |
28 | {% block content %} 29 | {% endblock content %} 30 |
31 |
32 | 33 | -------------------------------------------------------------------------------- /netflix_clone/movies/templates/movies/index.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block content %} 3 |
4 | {% for movie in movies %} 5 |
6 | 7 |
8 | 9 | {{ movie.title }} 10 |
11 |
12 |
13 | {% endfor %} 14 |
15 | 16 |
17 | 18 | Card Title 19 |
20 |
21 |
22 |
23 | 24 |
25 | 26 | Card Title 27 |
28 |
29 |
30 |
31 | 32 |
33 | 34 | Card Title 35 |
36 |
37 |
38 |
39 | 40 |
41 | 42 | Card Title 43 |
44 |
45 |
46 |
47 | 48 |
49 | 50 | Card Title 51 |
52 |
53 |
54 |
55 | 56 |
57 | 58 | Card Title 59 |
60 |
61 |
62 |
63 | 64 |
65 | 66 | Card Title 67 |
68 |
69 |
70 |
71 | 72 |
73 | 74 | Card Title 75 |
76 |
77 |
78 |
79 | {% endblock content%} -------------------------------------------------------------------------------- /netflix_clone/movies/templates/movies/movie.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Home 6 | 7 | 8 | 9 | 10 | {% load static %} 11 | 12 | 13 | 14 | 15 | 16 | 26 | 27 |
28 |
29 | 105 |
106 |
107 | 108 | 109 | -------------------------------------------------------------------------------- /netflix_clone/movies/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /netflix_clone/movies/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | from .models import Movie 3 | 4 | # Create your views here. 5 | def home(request): 6 | movies = Movie.objects.all() 7 | return render(request, 'movies/index.html', { 8 | 'movies': movies 9 | }) -------------------------------------------------------------------------------- /netflix_clone/netflix_clone/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverProgrammer/netflix_clone/49c36c007312951803b2045eb66cccdcd591d464/netflix_clone/netflix_clone/__init__.py -------------------------------------------------------------------------------- /netflix_clone/netflix_clone/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for netflix_clone project. 3 | 4 | Generated by 'django-admin startproject' using Django 2.2.6. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.2/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/2.2/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = 'jwz6))2cke@=w1k%tyqdet(1=g0p!yhlbb14k^#o2zy36gg7)u' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = [] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = [ 34 | 'django.contrib.admin', 35 | 'django.contrib.auth', 36 | 'django.contrib.contenttypes', 37 | 'django.contrib.sessions', 38 | 'django.contrib.messages', 39 | 'django.contrib.staticfiles', 40 | 'movies' 41 | ] 42 | 43 | MIDDLEWARE = [ 44 | 'django.middleware.security.SecurityMiddleware', 45 | 'django.contrib.sessions.middleware.SessionMiddleware', 46 | 'django.middleware.common.CommonMiddleware', 47 | 'django.middleware.csrf.CsrfViewMiddleware', 48 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 49 | 'django.contrib.messages.middleware.MessageMiddleware', 50 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 51 | ] 52 | 53 | ROOT_URLCONF = 'netflix_clone.urls' 54 | 55 | TEMPLATES = [ 56 | { 57 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 58 | 'DIRS': [], 59 | 'APP_DIRS': True, 60 | 'OPTIONS': { 61 | 'context_processors': [ 62 | 'django.template.context_processors.debug', 63 | 'django.template.context_processors.request', 64 | 'django.contrib.auth.context_processors.auth', 65 | 'django.contrib.messages.context_processors.messages', 66 | ], 67 | }, 68 | }, 69 | ] 70 | 71 | WSGI_APPLICATION = 'netflix_clone.wsgi.application' 72 | 73 | 74 | # Database 75 | # https://docs.djangoproject.com/en/2.2/ref/settings/#databases 76 | 77 | DATABASES = { 78 | 'default': { 79 | 'ENGINE': 'django.db.backends.sqlite3', 80 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 81 | } 82 | } 83 | 84 | 85 | # Password validation 86 | # https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators 87 | 88 | AUTH_PASSWORD_VALIDATORS = [ 89 | { 90 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 91 | }, 92 | { 93 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 94 | }, 95 | { 96 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 97 | }, 98 | { 99 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 100 | }, 101 | ] 102 | 103 | 104 | # Internationalization 105 | # https://docs.djangoproject.com/en/2.2/topics/i18n/ 106 | 107 | LANGUAGE_CODE = 'en-us' 108 | 109 | TIME_ZONE = 'UTC' 110 | 111 | USE_I18N = True 112 | 113 | USE_L10N = True 114 | 115 | USE_TZ = True 116 | 117 | 118 | # Static files (CSS, JavaScript, Images) 119 | # https://docs.djangoproject.com/en/2.2/howto/static-files/ 120 | 121 | STATIC_URL = '/static/' 122 | 123 | MEDIA_ROOT = os.path.join(BASE_DIR, "media/") 124 | MEDIA_URL = 'media/' 125 | -------------------------------------------------------------------------------- /netflix_clone/netflix_clone/urls.py: -------------------------------------------------------------------------------- 1 | """netflix_clone URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/2.2/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.urls import include, path 14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 15 | """ 16 | from django.contrib import admin 17 | from django.urls import path 18 | 19 | from django.conf import settings 20 | from movies import views 21 | from django.conf.urls.static import static 22 | 23 | urlpatterns = [ 24 | path('admin/', admin.site.urls), 25 | path('', views.home), 26 | ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 27 | -------------------------------------------------------------------------------- /netflix_clone/netflix_clone/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for netflix_clone project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'netflix_clone.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | certifi==2019.9.11 2 | Django==2.2.6 3 | pytz==2019.3 4 | sqlparse==0.3.0 5 | --------------------------------------------------------------------------------