├── moviesmanagement ├── movies │ ├── __init__.py │ ├── templates │ │ ├── home.html │ │ ├── ecommerce │ │ │ └── users │ │ │ │ ├── marketPlaces.html │ │ │ │ └── View_product.html │ │ └── users │ │ │ └── View_product.html │ ├── migrations │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-38.pyc │ │ │ └── 0001_initial.cpython-38.pyc │ │ └── 0001_initial.py │ ├── views.py │ ├── tests.py │ ├── urls.py │ ├── apps.py │ ├── __pycache__ │ │ ├── admin.cpython-38.pyc │ │ ├── apps.cpython-38.pyc │ │ ├── urls.cpython-38.pyc │ │ ├── models.cpython-38.pyc │ │ └── __init__.cpython-38.pyc │ ├── api │ │ ├── __pycache__ │ │ │ ├── urls.cpython-38.pyc │ │ │ ├── views.cpython-38.pyc │ │ │ └── serializers.cpython-38.pyc │ │ ├── urls.py │ │ ├── serializers.py │ │ └── views.py │ ├── admin.py │ └── models.py ├── moviesmanagement │ ├── __init__.py │ ├── __pycache__ │ │ ├── urls.cpython-38.pyc │ │ ├── wsgi.cpython-38.pyc │ │ ├── __init__.cpython-38.pyc │ │ └── settings.cpython-38.pyc │ ├── asgi.py │ ├── wsgi.py │ ├── urls.py │ └── settings.py ├── db.sqlite3 ├── requirements.txt └── manage.py └── README.txt /moviesmanagement/movies/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /moviesmanagement/movies/templates/home.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /moviesmanagement/movies/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /moviesmanagement/moviesmanagement/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /moviesmanagement/movies/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | # Create your views here. -------------------------------------------------------------------------------- /moviesmanagement/movies/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /moviesmanagement/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jitendra-meena/Movies-Menagement-System-/HEAD/moviesmanagement/db.sqlite3 -------------------------------------------------------------------------------- /moviesmanagement/movies/urls.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django.urls import path 3 | urlpatterns = [ 4 | 5 | 6 | 7 | ] -------------------------------------------------------------------------------- /moviesmanagement/movies/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class EcommerceConfig(AppConfig): 5 | name = 'movies' 6 | -------------------------------------------------------------------------------- /moviesmanagement/movies/__pycache__/admin.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jitendra-meena/Movies-Menagement-System-/HEAD/moviesmanagement/movies/__pycache__/admin.cpython-38.pyc -------------------------------------------------------------------------------- /moviesmanagement/movies/__pycache__/apps.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jitendra-meena/Movies-Menagement-System-/HEAD/moviesmanagement/movies/__pycache__/apps.cpython-38.pyc -------------------------------------------------------------------------------- /moviesmanagement/movies/__pycache__/urls.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jitendra-meena/Movies-Menagement-System-/HEAD/moviesmanagement/movies/__pycache__/urls.cpython-38.pyc -------------------------------------------------------------------------------- /moviesmanagement/movies/__pycache__/models.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jitendra-meena/Movies-Menagement-System-/HEAD/moviesmanagement/movies/__pycache__/models.cpython-38.pyc -------------------------------------------------------------------------------- /moviesmanagement/movies/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jitendra-meena/Movies-Menagement-System-/HEAD/moviesmanagement/movies/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /moviesmanagement/movies/api/__pycache__/urls.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jitendra-meena/Movies-Menagement-System-/HEAD/moviesmanagement/movies/api/__pycache__/urls.cpython-38.pyc -------------------------------------------------------------------------------- /moviesmanagement/movies/api/__pycache__/views.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jitendra-meena/Movies-Menagement-System-/HEAD/moviesmanagement/movies/api/__pycache__/views.cpython-38.pyc -------------------------------------------------------------------------------- /moviesmanagement/movies/api/__pycache__/serializers.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jitendra-meena/Movies-Menagement-System-/HEAD/moviesmanagement/movies/api/__pycache__/serializers.cpython-38.pyc -------------------------------------------------------------------------------- /moviesmanagement/moviesmanagement/__pycache__/urls.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jitendra-meena/Movies-Menagement-System-/HEAD/moviesmanagement/moviesmanagement/__pycache__/urls.cpython-38.pyc -------------------------------------------------------------------------------- /moviesmanagement/moviesmanagement/__pycache__/wsgi.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jitendra-meena/Movies-Menagement-System-/HEAD/moviesmanagement/moviesmanagement/__pycache__/wsgi.cpython-38.pyc -------------------------------------------------------------------------------- /moviesmanagement/movies/migrations/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jitendra-meena/Movies-Menagement-System-/HEAD/moviesmanagement/movies/migrations/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /moviesmanagement/moviesmanagement/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jitendra-meena/Movies-Menagement-System-/HEAD/moviesmanagement/moviesmanagement/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /moviesmanagement/moviesmanagement/__pycache__/settings.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jitendra-meena/Movies-Menagement-System-/HEAD/moviesmanagement/moviesmanagement/__pycache__/settings.cpython-38.pyc -------------------------------------------------------------------------------- /moviesmanagement/movies/migrations/__pycache__/0001_initial.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jitendra-meena/Movies-Menagement-System-/HEAD/moviesmanagement/movies/migrations/__pycache__/0001_initial.cpython-38.pyc -------------------------------------------------------------------------------- /moviesmanagement/movies/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from movies.models import Movies 3 | 4 | 5 | 6 | @admin.register(Movies) 7 | class MoviesAdmin(admin.ModelAdmin): 8 | list_display = ['id','title','pub_date', 'rating','genres'] 9 | 10 | -------------------------------------------------------------------------------- /moviesmanagement/requirements.txt: -------------------------------------------------------------------------------- 1 | asgiref==3.4.1 2 | backports.zoneinfo==0.2.1 3 | certifi==2021.10.8 4 | charset-normalizer==2.0.9 5 | Django==4.0 6 | django-rest-framework==0.1.0 7 | djangorestframework==3.12.4 8 | idna==3.3 9 | pytz==2021.3 10 | requests==2.26.0 11 | sqlparse==0.4.2 12 | tzdata==2021.5 13 | urllib3==1.26.7 14 | -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Lists Of APIs: 4 | 5 | 1) Search By Id 6 | 2) Search By Year 7 | 3) Search By Rating 8 | 4) Search By Genre 9 | 5) Serach By Title Exact If Not available Search Live API 10 | 11 | Postman Collections - https://www.getpostman.com/collections/f2310bd412de1cd6335c 12 | 13 | Admin Login : 14 | 15 | superadmin 16 | 123 -------------------------------------------------------------------------------- /moviesmanagement/movies/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | # Create your models here. 3 | 4 | class Movies(models.Model): 5 | title = models.CharField(max_length = 50, blank= True) 6 | pub_date = models.DateField() 7 | rating = models.FloatField(default=0) 8 | genres = models.CharField(max_length = 100, blank = True) 9 | 10 | def __str__(self): 11 | return self.title -------------------------------------------------------------------------------- /moviesmanagement/moviesmanagement/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for moviesmanagement project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.0/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'moviesmanagement.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /moviesmanagement/moviesmanagement/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for moviesmanagement 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/4.0/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', 'moviesmanagement.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /moviesmanagement/movies/api/urls.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django.urls import path 3 | from movies.api.views import Search_By_Year, Search_By_Id, Search_By_Rating, Search_By_Genres, Search_By_Title 4 | 5 | urlpatterns = [ 6 | 7 | path('search_by_year/',Search_By_Year.as_view(),name = 'search_by_year'), 8 | path('search_by_id/',Search_By_Id.as_view(),name = 'search_by_id'), 9 | path('search_by_rating/',Search_By_Rating.as_view(),name = 'search_by_rating'), 10 | path('search_by_genres/',Search_By_Genres.as_view(),name = 'search_by_genres'), 11 | path('search_by_title/',Search_By_Title.as_view(),name = 'search_by_title'), 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | ] -------------------------------------------------------------------------------- /moviesmanagement/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 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'moviesmanagement.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /moviesmanagement/movies/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.0 on 2021-12-11 18:08 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.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('title', models.CharField(blank=True, max_length=50)), 19 | ('pub_date', models.DateField()), 20 | ('rating', models.FloatField(default=0)), 21 | ('genres', models.CharField(blank=True, max_length=100)), 22 | ], 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /moviesmanagement/movies/api/serializers.py: -------------------------------------------------------------------------------- 1 | from rest_framework import serializers 2 | from movies.models import Movies 3 | 4 | 5 | class Search_By_YearSerailizer(serializers.ModelSerializer): 6 | class Meta: 7 | model = Movies 8 | fields = '__all__' 9 | 10 | class Search_By_IdSerailizer(serializers.ModelSerializer): 11 | class Meta: 12 | model = Movies 13 | fields ='__all__' 14 | 15 | 16 | class Search_By_RatingSerailizer(serializers.ModelSerializer): 17 | class Meta: 18 | model = Movies 19 | fields =['id','title','rating','genres'] 20 | 21 | 22 | class Search_By_GenresSerailizer(serializers.ModelSerializer): 23 | class Meta: 24 | model = Movies 25 | fields =['id','title','rating','genres'] 26 | 27 | 28 | class Search_By_TitleSerailizer(serializers.ModelSerializer): 29 | class Meta: 30 | model = Movies 31 | fields =['id','title','rating','genres'] -------------------------------------------------------------------------------- /moviesmanagement/moviesmanagement/urls.py: -------------------------------------------------------------------------------- 1 | """moviesmanagement URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/4.0/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,include 18 | 19 | urlpatterns = [ 20 | path('admin/', admin.site.urls), 21 | path('',include('movies.urls')), 22 | path('api/',include('movies.api.urls')), 23 | ] 24 | -------------------------------------------------------------------------------- /moviesmanagement/movies/templates/ecommerce/users/marketPlaces.html: -------------------------------------------------------------------------------- 1 | {% extends 'user/base.html' %} 2 | {% block mkt %} 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | {% endblock mkt %} -------------------------------------------------------------------------------- /moviesmanagement/moviesmanagement/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for moviesmanagement project. 3 | 4 | Generated by 'django-admin startproject' using Django 4.0. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.0/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/4.0/ref/settings/ 11 | """ 12 | 13 | from pathlib import Path 14 | 15 | # Build paths inside the project like this: BASE_DIR / 'subdir'. 16 | BASE_DIR = Path(__file__).resolve().parent.parent 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = 'django-insecure-ty3h09u+k_ukt1@58#m8ligfi7pprp97u++$17nw80w6cnc*l4' 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 = 'moviesmanagement.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 = 'moviesmanagement.wsgi.application' 72 | 73 | 74 | # Database 75 | # https://docs.djangoproject.com/en/4.0/ref/settings/#databases 76 | 77 | DATABASES = { 78 | 'default': { 79 | 'ENGINE': 'django.db.backends.sqlite3', 80 | 'NAME': BASE_DIR / 'db.sqlite3', 81 | } 82 | } 83 | 84 | 85 | # Password validation 86 | # https://docs.djangoproject.com/en/4.0/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/4.0/topics/i18n/ 106 | 107 | LANGUAGE_CODE = 'en-us' 108 | 109 | TIME_ZONE = 'UTC' 110 | 111 | USE_I18N = True 112 | 113 | USE_TZ = True 114 | 115 | 116 | # Static files (CSS, JavaScript, Images) 117 | # https://docs.djangoproject.com/en/4.0/howto/static-files/ 118 | 119 | STATIC_URL = 'static/' 120 | 121 | # Default primary key field type 122 | # https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field 123 | 124 | DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' 125 | -------------------------------------------------------------------------------- /moviesmanagement/movies/api/views.py: -------------------------------------------------------------------------------- 1 | from rest_framework.generics import ListAPIView , ListCreateAPIView 2 | from rest_framework.response import Response 3 | from django.db.models import Q 4 | from django.db.models import Avg ,Sum 5 | from django.shortcuts import get_object_or_404 6 | from datetime import datetime 7 | from datetime import timedelta 8 | import datetime 9 | import requests 10 | from .serializers import ( 11 | Search_By_YearSerailizer, 12 | Search_By_IdSerailizer, 13 | Search_By_RatingSerailizer, 14 | Search_By_GenresSerailizer, 15 | Search_By_TitleSerailizer 16 | ) 17 | from movies.models import Movies 18 | 19 | class Search_By_Year(ListAPIView): 20 | queryset = Movies.objects.all() 21 | serializer_class = Search_By_YearSerailizer 22 | 23 | def get(self, request,year): 24 | movies_obj = Movies.objects.filter(pub_date__year = year) 25 | if movies_obj: 26 | serializer = Search_By_YearSerailizer(movies_obj,many = True) 27 | return Response({'status':'200' , 'msg': 'Movies List by Year','data': serializer.data}) 28 | else: 29 | return Response({'status':'200' , 'msg': 'No result Found By year'}) 30 | 31 | 32 | class Search_By_Id(ListAPIView): 33 | queryset = Movies.objects.all() 34 | serializer_class = Search_By_IdSerailizer 35 | 36 | def get(self, request,id): 37 | movies_obj = Movies.objects.get(id = id) 38 | if movies_obj: 39 | serializer = Search_By_IdSerailizer(movies_obj) 40 | return Response({'status':'200' , 'msg': 'Movies List by Id','data': serializer.data}) 41 | else: 42 | return Response({'status':'200' , 'msg': 'No result Found By Id'}) 43 | 44 | 45 | class Search_By_Rating(ListCreateAPIView): 46 | queryset = Movies.objects.all() 47 | serializer_class = Search_By_RatingSerailizer 48 | 49 | def post(self, request): 50 | rating = request.data.get('rating') 51 | movies_obj = Movies.objects.filter(rating__icontains = rating) 52 | if movies_obj: 53 | print(movies_obj) 54 | serializer = Search_By_RatingSerailizer(movies_obj, many = True) 55 | print(serializer.data) 56 | return Response({'status':'200' , 'msg': 'Movies List by Rating','data': serializer.data}) 57 | else: 58 | return Response({'status':'200' , 'msg': 'No result Found By Rating'}) 59 | 60 | 61 | 62 | class Search_By_Genres(ListCreateAPIView): 63 | queryset = Movies.objects.all() 64 | serializer_class = Search_By_GenresSerailizer 65 | 66 | def post(self, request): 67 | genres = request.data.get('genres') 68 | movies_obj = Movies.objects.filter(Q(genres__contains = genres)) 69 | if movies_obj: 70 | serializer = Search_By_GenresSerailizer(movies_obj,many = True) 71 | return Response({'status':'200' , 'msg': 'Movies List by Genres','data': serializer.data}) 72 | else: 73 | return Response({'status':'200' , 'msg': 'No result Found By Genres'}) 74 | 75 | 76 | 77 | class Search_By_Title(ListCreateAPIView): 78 | queryset = Movies.objects.all() 79 | serializer_class = Search_By_TitleSerailizer 80 | 81 | def post(self, request): 82 | title = request.data.get('title') 83 | movies_obj = Movies.objects.filter(title__exact = title) 84 | if movies_obj: 85 | serializer = Search_By_TitleSerailizer(movies_obj,many = True) 86 | return Response({'status':'200' , 'msg': 'Movies List by Genres','data': serializer.data}) 87 | get_date() 88 | movies_obj = Movies.objects.filter(title__exact = title) 89 | if movies_obj: 90 | serializer = Search_By_TitleSerailizer(movies_obj,many = True) 91 | return Response({'status':'200' , 'msg': 'Movies List by Genres','data': serializer.data}) 92 | else: 93 | return Response({'status':'200' , 'msg': 'No result Found By Genres'}) 94 | 95 | 96 | def get_date(): 97 | 98 | url = 'http://www.omdbapi.com/?i=tt3896198&apikey=2491a6b9' 99 | res = requests.get(url) 100 | data = res.json() 101 | result = data['Year'] 102 | d = datetime.date(int(result), 10, 19) 103 | movies_obj = Movies.objects.create(title = data['Title'] ,pub_date = d,rating = data['imdbRating'],genres = data['Genre']) 104 | print(movies_obj) 105 | movies_obj.save() 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /moviesmanagement/movies/templates/ecommerce/users/View_product.html: -------------------------------------------------------------------------------- 1 | {% extends 'user/base.html' %} 2 | {% block view %} 3 | 4 |
5 | 6 |
7 |
8 | {% for i in product_obj %} 9 | 10 |
11 |
12 |
14 |
15 |
16 | {% for j in i.product_image.all %} 17 | 18 | {% endfor %} 19 |
20 | 21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | 29 | {% for j in i.product_image.all %} 30 | 31 | {% endfor %} 32 | 33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |

{{i.title}}

42 |
43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 59 | 60 | 61 | 62 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 86 | 87 | 88 | 89 | 92 | 93 | 94 | 95 | 99 | 100 | 101 | 102 | 105 | 106 | 107 |
Condition:{{i.condition}}
Weight & Length: 52 | 58 |
Color: 63 | 69 |
Type:{{i.product_type}}
Delivery Method: 79 | 85 |
Quantity: 90 | 91 |
96 | 3 Available / 5001 97 | Sold 98 |
Price: 103 | US ${{i.item_price}}/ea 104 |
108 | 111 |
112 | Buy Now 113 | 115 |
116 |
117 |
118 | {% endfor %} 119 |
120 |
121 | 122 | {% endblock view %} -------------------------------------------------------------------------------- /moviesmanagement/movies/templates/users/View_product.html: -------------------------------------------------------------------------------- 1 | {% extends 'user/base.html' %} 2 | {% block view %} 3 | 4 | 5 |
6 | 7 |
8 |
9 |
10 |
11 |
13 |
14 |
15 | 16 |
17 |
18 | 19 |
20 |
21 | 22 |
23 |
24 | 25 |
26 |
27 | 28 |
29 |
30 | 31 |
32 |
33 | 34 |
35 |
36 | 37 |
38 |
39 | 40 |
41 |
42 | 43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | 52 |
53 |
54 | 55 |
56 |
57 | 58 |
59 |
60 | 61 |
62 |
63 | 64 |
65 |
66 | 67 |
68 |
69 | 70 |
71 |
72 | 73 |
74 |
75 | 76 |
77 |
78 | 79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |

Thick 200g 80pcs Tape in Remy Human Hair Extensions Skin Weft FULL HEAD BLONDE F

88 |
89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 105 | 106 | 107 | 108 | 116 | 117 | 118 | 119 | 127 | 128 | 129 | 130 | 138 | 139 | 140 | 141 | 144 | 145 | 146 | 147 | 151 | 152 | 153 | 154 | 157 | 158 | 159 |
Condition:New
Weight & Length: 98 | 104 |
Color: 109 | 115 |
Type: 120 | 126 |
Delivery Method: 131 | 137 |
Quantity: 142 | 143 |
148 | 3 Available / 5001 149 | Sold 150 |
Price: 155 | US $19.87/ea 156 |
160 | 163 |
164 | Buy it Now 165 | Add to cart 166 | Add to Watchlist 167 |
168 |
169 |
170 |
171 |
172 | 173 | 174 | 194 | 195 | {% endblock view %} --------------------------------------------------------------------------------