diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..03bd412 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.env diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/__init__.py b/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/__pycache__/__init__.cpython-39.pyc b/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000..2ab37ad Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/__pycache__/__init__.cpython-39.pyc differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/__pycache__/settings.cpython-39.pyc b/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/__pycache__/settings.cpython-39.pyc new file mode 100644 index 0000000..e85e455 Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/__pycache__/settings.cpython-39.pyc differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/__pycache__/urls.cpython-39.pyc b/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/__pycache__/urls.cpython-39.pyc new file mode 100644 index 0000000..99301b2 Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/__pycache__/urls.cpython-39.pyc differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/__pycache__/wsgi.cpython-39.pyc b/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/__pycache__/wsgi.cpython-39.pyc new file mode 100644 index 0000000..cc6dac3 Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/__pycache__/wsgi.cpython-39.pyc differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/asgi.py b/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/asgi.py new file mode 100644 index 0000000..56540f3 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for DBMSProjectMovieBookingSystem project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'DBMSProjectMovieBookingSystem.settings') + +application = get_asgi_application() diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/settings.py b/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/settings.py new file mode 100644 index 0000000..8cb441e --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/settings.py @@ -0,0 +1,145 @@ +""" + +Generated by 'django-admin startproject' using Django 2.2.3. + +For more information on this file, see +https://docs.djangoproject.com/en/2.2/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/2.2/ref/settings/ +""" + +import os +import django_heroku +from decouple import config + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = config('SECRET_KEY') + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'accounts.apps.AccountsConfig', + 'main.apps.MainConfig', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'DBMSProjectMovieBookingSystem.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [BASE_DIR,'templates'], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'DBMSProjectMovieBookingSystem.wsgi.application' + +#Messages custom +from django.contrib.messages import constants as message_constants +MESSAGE_TAGS = {message_constants.DEBUG: 'debug', + message_constants.INFO: 'info', + message_constants.SUCCESS: 'success', + message_constants.WARNING: 'warning', + message_constants.ERROR: 'danger', + } + +# Database +# https://docs.djangoproject.com/en/2.2/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.mysql', + 'NAME': config('DB_NAME'), + 'USER': config('DB_USER'), + 'PASSWORD': config('DB_PASSWORD'), + 'HOST': config('DB_HOST'), + 'PORT': config('DB_PORT'), + } +} + + +# Password validation +# https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/2.2/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/2.2/howto/static-files/ + +STATIC_ROOT = os.path.join(BASE_DIR, 'static') +STATIC_URL = '/static/' +STATICFILES_DIRS = [ + os.path.join(BASE_DIR, 'static'), +] + +#for MEDIA +MEDIA_ROOT = os.path.join(BASE_DIR, 'media') +MEDIA_URL = '/media/' + +django_heroku.settings(locals()) \ No newline at end of file diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/urls.py b/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/urls.py new file mode 100644 index 0000000..fea67a9 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/urls.py @@ -0,0 +1,24 @@ +"""" +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/2.2/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: path('', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.urls import include, path + 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) +""" +from django.contrib import admin +from django.urls import path,include +from django.conf import settings +from django.conf.urls.static import static + +urlpatterns = [ + path('admin/', admin.site.urls), + path('',include('main.urls')), + path('accounts/',include('accounts.urls')), +] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/wsgi.py b/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/wsgi.py new file mode 100644 index 0000000..2d335f9 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/DBMSProjectMovieBookingSystem/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for DBMSProjectMovieBookingSystem project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'DBMSProjectMovieBookingSystem.settings') + +application = get_wsgi_application() diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/accounts/__init__.py b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/accounts/__pycache__/__init__.cpython-39.pyc b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000..778486a Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/__pycache__/__init__.cpython-39.pyc differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/accounts/__pycache__/admin.cpython-39.pyc b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/__pycache__/admin.cpython-39.pyc new file mode 100644 index 0000000..6d7bfb5 Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/__pycache__/admin.cpython-39.pyc differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/accounts/__pycache__/apps.cpython-39.pyc b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/__pycache__/apps.cpython-39.pyc new file mode 100644 index 0000000..09d1ab0 Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/__pycache__/apps.cpython-39.pyc differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/accounts/__pycache__/models.cpython-39.pyc b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/__pycache__/models.cpython-39.pyc new file mode 100644 index 0000000..4ebfc53 Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/__pycache__/models.cpython-39.pyc differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/accounts/__pycache__/urls.cpython-39.pyc b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/__pycache__/urls.cpython-39.pyc new file mode 100644 index 0000000..32edc9b Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/__pycache__/urls.cpython-39.pyc differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/accounts/__pycache__/views.cpython-39.pyc b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/__pycache__/views.cpython-39.pyc new file mode 100644 index 0000000..f20a572 Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/__pycache__/views.cpython-39.pyc differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/accounts/admin.py b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/admin.py new file mode 100644 index 0000000..fb2f8e5 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/admin.py @@ -0,0 +1,7 @@ +from django.contrib import admin +from . models import * +# Register your models here. +admin.site.register(Cinema), +admin.site.register(Movie), +admin.site.register(Shows), +admin.site.register(Bookings), \ No newline at end of file diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/accounts/apps.py b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/apps.py new file mode 100644 index 0000000..3e3c765 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class AccountsConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'accounts' diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/accounts/migrations/0001_initial.py b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/migrations/0001_initial.py new file mode 100644 index 0000000..b6821b5 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/migrations/0001_initial.py @@ -0,0 +1,64 @@ +# Generated by Django 3.2.9 on 2021-12-08 14:50 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Cinema', + fields=[ + ('cinema', models.AutoField(primary_key=True, serialize=False)), + ('role', models.CharField(default='cinema_manager', max_length=30)), + ('cinema_name', models.CharField(max_length=50)), + ('phoneno', models.CharField(max_length=15)), + ('city', models.CharField(max_length=100)), + ('address', models.CharField(max_length=100)), + ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='Movie', + fields=[ + ('movie', models.AutoField(primary_key=True, serialize=False)), + ('movie_name', models.CharField(max_length=50)), + ('movie_trailer', models.CharField(default='null', max_length=300)), + ('movie_rdate', models.CharField(default='null', max_length=20)), + ('movie_des', models.TextField()), + ('movie_rating', models.DecimalField(decimal_places=1, max_digits=3)), + ('movie_poster', models.ImageField(default='movies/poster/not.jpg', upload_to='movies/poster')), + ('movie_genre', models.CharField(default='Action | Comedy | Romance', max_length=50)), + ('movie_duration', models.CharField(default='2hr 45min', max_length=10)), + ], + ), + migrations.CreateModel( + name='Shows', + fields=[ + ('shows', models.AutoField(primary_key=True, serialize=False)), + ('time', models.CharField(max_length=100)), + ('date', models.CharField(default='', max_length=15)), + ('price', models.IntegerField()), + ('cinema', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cinema_show', to='accounts.cinema')), + ('movie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='movie_show', to='accounts.movie')), + ], + ), + migrations.CreateModel( + name='Bookings', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('useat', models.CharField(max_length=100)), + ('total_seats', models.IntegerField()), + ('shows', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='accounts.shows')), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + ), + ] diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/accounts/migrations/__init__.py b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/accounts/migrations/__pycache__/0001_initial.cpython-39.pyc b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/migrations/__pycache__/0001_initial.cpython-39.pyc new file mode 100644 index 0000000..a0cbd29 Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/migrations/__pycache__/0001_initial.cpython-39.pyc differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/accounts/migrations/__pycache__/__init__.cpython-39.pyc b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/migrations/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000..90f5165 Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/migrations/__pycache__/__init__.cpython-39.pyc differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/accounts/models.py b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/models.py new file mode 100644 index 0000000..132c1c8 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/models.py @@ -0,0 +1,53 @@ +from django.db import models +from django.contrib.auth.models import User + + +# Create your models here + +class Cinema(models.Model): + cinema=models.AutoField(primary_key=True) + role=models.CharField(max_length=30,default='cinema_manager') + cinema_name=models.CharField(max_length=50) + phoneno=models.CharField(max_length=15) + city=models.CharField(max_length=100) + address=models.CharField(max_length=100) + user = models.OneToOneField(User,on_delete=models.CASCADE) + + def __str__(self): + return self.cinema_name + +class Movie(models.Model): + movie=models.AutoField(primary_key=True) + movie_name=models.CharField(max_length=50) + movie_trailer=models.CharField(max_length=300, default="null") + movie_rdate=models.CharField(max_length=20, default="null") + movie_des=models.TextField() + movie_rating=models.DecimalField(max_digits=3, decimal_places=1) + movie_poster=models.ImageField(upload_to='movies/poster', default="movies/poster/not.jpg") + movie_genre=models.CharField(max_length=50,default="Action | Comedy | Romance") + movie_duration=models.CharField(max_length=10, default="2hr 45min") + + def __str__(self): + return self.movie_name + +class Shows(models.Model): + shows=models.AutoField(primary_key=True) + cinema=models.ForeignKey('Cinema',on_delete=models.CASCADE, related_name='cinema_show') + movie=models.ForeignKey('Movie',on_delete=models.CASCADE, related_name='movie_show') + time=models.CharField(max_length=100) + date=models.CharField(max_length=15, default="") + price=models.IntegerField() + + def __str__(self): + return self.cinema.cinema_name +" | "+ self.movie.movie_name +" | "+ self.time + +class Bookings(models.Model): + user = models.ForeignKey(User, on_delete=models.CASCADE) + shows = models.ForeignKey(Shows, on_delete=models.CASCADE) + useat = models.CharField(max_length=100) + total_seats = models.IntegerField() + @property + + def __str__(self): + return self.user.username +" | "+ self.shows.movie.movie_name +" | "+ self.useat + diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/accounts/tests.py b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/accounts/urls.py b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/urls.py new file mode 100644 index 0000000..545590a --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/urls.py @@ -0,0 +1,16 @@ +from django.contrib import admin +from django.urls import path,include +from . import views +from django.conf import settings +from django.conf.urls.static import static + +urlpatterns=[ + path('login',views.login,name='login'), + path('logout',views.logout,name='logout'), + path('register',views.register,name='register'), + path('register_cinema',views.register_cinema, name='register_cinema'), + path('bookings',views.bookings, name='bookings'), + path('profile',views.profile, name='profile'), + path('dashboard',views.dashboard, name='dashboard'), + path('add_shows',views.add_shows, name='add_shows'), +] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) \ No newline at end of file diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/accounts/views.py b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/views.py new file mode 100644 index 0000000..0e6b834 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/accounts/views.py @@ -0,0 +1,163 @@ +from django.shortcuts import render + +# Create your views here. +from django.shortcuts import render,redirect +from django.contrib import messages +from django.contrib.auth.models import User, auth +from django.contrib.auth import update_session_auth_hash +from . models import * +from django.db.models import Sum + + + +# Create your views here. +def login(request): + if request.method=='POST': + username = request.POST['username'] + password = request.POST['password'] + user = auth.authenticate(username= username, password= password) + + if user is not None: + auth.login(request,user) + return redirect('/') + else: + messages.error(request,'Username/Password is incorrect') + return redirect('login') + else: + return render(request,"login.html") + + +def register(request): + + if request.method == 'POST': + username = request.POST['username'] + first_name = request.POST['firstname'] + last_name = request.POST['lastname'] + email = request.POST['email'] + password1 = request.POST['password1'] + password2 = request.POST['password2'] + + if password1==password2: + if User.objects.filter(username=username).exists(): + messages.info(request,'username already exist') + elif User.objects.filter(email=email).exists(): + messages.info(request,'email already exist') + else: + user = User.objects.create_user(username = username, first_name= first_name, last_name= last_name, email=email,password=password1) + user.save() + messages.info(request,'User created') + return redirect('login') + else: + messages.info(request, 'Password not match') + return redirect('register') + else: + return render(request,"register.html") + + +def register_cinema(request): + + if request.method == 'POST': + username = request.POST['username'] + first_name = request.POST['firstname'] + last_name = request.POST['lastname'] + email = request.POST['email'] + password1 = request.POST['password1'] + password2 = request.POST['password2'] + + cinema_name = request.POST['cinema'] + phone = request.POST['phone'] + city = request.POST['city'] + address = request.POST['address'] + + if password1==password2: + if User.objects.filter(username=username).exists(): + messages.info(request,'username already exist') + elif User.objects.filter(email=email).exists(): + messages.info(request,'email already exist') + else: + user = User.objects.create_user(username = username, first_name= first_name, last_name= last_name, email=email,password=password1) + cin_user = Cinema(cinema_name = cinema_name, phoneno = phone, city = city, address = address, user = user) + cin_user.save() + messages.info(request,'User created') + return redirect('login') + else: + messages.info(request, 'Password not match') + return redirect('register_cinema') + else: + return render(request,"register_cinema.html") + +def logout(request): + auth.logout(request) + return redirect('/') + +def profile(request): + u = request.user + if request.method == 'POST': + username = request.POST['username'] + first_name = request.POST['fn'] + last_name = request.POST['ln'] + email = request.POST['email'] + old = request.POST['old'] + new = request.POST['new'] + user = User.objects.get(pk = u.pk) + + if User.objects.filter(username=username).exclude(pk=u.pk).exists(): + messages.error(request,'Username already exists') + + elif User.objects.filter(email=email).exclude(pk=u.pk).exists(): + messages.error(request,'Email already exists') + + elif user.check_password(old): + user.username = username + user.first_name = first_name + user.last_name = last_name + user.email = email + user.set_password(new) + user.save() + #update session + update_session_auth_hash(request, user) + + messages.success(request,'Profile updated') + else: + messages.error(request,'Wrong Old Password') + + return redirect('profile') + + else: + user = request.user + return render(request,"profile.html") + +def bookings(request): + user = request.user + book = Bookings.objects.filter(user=user.pk) + return render(request,"bookings.html", {'book':book} ) + +def dashboard(request): + user = request.user + m = Shows.objects.filter(cinema=user.cinema).values('movie','movie__movie_name','movie__movie_poster').distinct() + print(m) + return render(request,"dashboard.html", {'list':m}) + +def add_shows(request): + user = request.user + + if request.method == 'POST': + m = request.POST['m'] + t = request.POST['t'] + d = request.POST['d'] + p = request.POST['p'] + i = user.cinema.pk + + show = Shows(cinema_id = i, movie_id = m, date = d, time = t, price = p) + show.save() + messages.success(request,'Show Added') + return redirect('add_shows') + + else: + m = Movie.objects.all() + sh = Shows.objects.filter(cinema=user.cinema) + data = { + 'mov':m, + 's':sh + } + return render(request,"add_shows.html", data) \ No newline at end of file diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_accounts_bookings.sql b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_accounts_bookings.sql new file mode 100644 index 0000000..9743d27 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_accounts_bookings.sql @@ -0,0 +1,58 @@ +-- MySQL dump 10.13 Distrib 8.0.27, for Win64 (x86_64) +-- +-- Host: localhost Database: dbmsproject +-- ------------------------------------------------------ +-- Server version 8.0.27 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `accounts_bookings` +-- + +DROP TABLE IF EXISTS `accounts_bookings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `accounts_bookings` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `useat` varchar(100) NOT NULL, + `total_seats` int NOT NULL, + `shows_id` int NOT NULL, + `user_id` int NOT NULL, + PRIMARY KEY (`id`), + KEY `accounts_bookings_shows_id_ce920ea8_fk_accounts_shows_shows` (`shows_id`), + KEY `accounts_bookings_user_id_dd095ae2_fk_auth_user_id` (`user_id`), + CONSTRAINT `accounts_bookings_shows_id_ce920ea8_fk_accounts_shows_shows` FOREIGN KEY (`shows_id`) REFERENCES `accounts_shows` (`shows`), + CONSTRAINT `accounts_bookings_user_id_dd095ae2_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `accounts_bookings` +-- + +LOCK TABLES `accounts_bookings` WRITE; +/*!40000 ALTER TABLE `accounts_bookings` DISABLE KEYS */; +INSERT INTO `accounts_bookings` VALUES (1,'#D4,#D5,#D6,#D7',4,9,2),(2,'#C3,#C4,#C5',3,8,3),(3,'#B5,#B6,#B4,#B7,#B8',5,15,5),(4,'#D4,#D5,#D6,#D7,#D9',5,10,4); +/*!40000 ALTER TABLE `accounts_bookings` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2021-12-08 22:41:38 diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_accounts_cinema.sql b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_accounts_cinema.sql new file mode 100644 index 0000000..8cac15a --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_accounts_cinema.sql @@ -0,0 +1,58 @@ +-- MySQL dump 10.13 Distrib 8.0.27, for Win64 (x86_64) +-- +-- Host: localhost Database: dbmsproject +-- ------------------------------------------------------ +-- Server version 8.0.27 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `accounts_cinema` +-- + +DROP TABLE IF EXISTS `accounts_cinema`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `accounts_cinema` ( + `cinema` int NOT NULL AUTO_INCREMENT, + `role` varchar(30) NOT NULL, + `cinema_name` varchar(50) NOT NULL, + `phoneno` varchar(15) NOT NULL, + `city` varchar(100) NOT NULL, + `address` varchar(100) NOT NULL, + `user_id` int NOT NULL, + PRIMARY KEY (`cinema`), + UNIQUE KEY `user_id` (`user_id`), + CONSTRAINT `accounts_cinema_user_id_66116bb2_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `accounts_cinema` +-- + +LOCK TABLES `accounts_cinema` WRITE; +/*!40000 ALTER TABLE `accounts_cinema` DISABLE KEYS */; +INSERT INTO `accounts_cinema` VALUES (1,'cinema_manager','IMAX','7789456285','Pune','Sinhagad Road,Pune.',6),(2,'cinema_manager','PVR-Cinemas','8148413518','Pune','Kondhwa,Pune.',7),(3,'cinema_manager','VIIT-Cinemas','9553841984','Pune','Kondhwa(Bk.),Pune.',8); +/*!40000 ALTER TABLE `accounts_cinema` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2021-12-08 22:41:35 diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_accounts_movie.sql b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_accounts_movie.sql new file mode 100644 index 0000000..005266d --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_accounts_movie.sql @@ -0,0 +1,58 @@ +-- MySQL dump 10.13 Distrib 8.0.27, for Win64 (x86_64) +-- +-- Host: localhost Database: dbmsproject +-- ------------------------------------------------------ +-- Server version 8.0.27 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `accounts_movie` +-- + +DROP TABLE IF EXISTS `accounts_movie`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `accounts_movie` ( + `movie` int NOT NULL AUTO_INCREMENT, + `movie_name` varchar(50) NOT NULL, + `movie_trailer` varchar(300) NOT NULL, + `movie_rdate` varchar(20) NOT NULL, + `movie_des` longtext NOT NULL, + `movie_rating` decimal(3,1) NOT NULL, + `movie_poster` varchar(100) NOT NULL, + `movie_genre` varchar(50) NOT NULL, + `movie_duration` varchar(10) NOT NULL, + PRIMARY KEY (`movie`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `accounts_movie` +-- + +LOCK TABLES `accounts_movie` WRITE; +/*!40000 ALTER TABLE `accounts_movie` DISABLE KEYS */; +INSERT INTO `accounts_movie` VALUES (1,'Spider Man - No Way Home','https://www.youtube.com/watch?v=JfVOs4VSpmA','16-12-2021','For the first time in the cinematic history of Spider-Man, our friendly neighborhood hero\'s identity is revealed, bringing his Super Hero responsibilities into conflict with his normal life and putting those he cares about most at risk. When he enlists Doctor Strange’s help to restore his secret, the spell tears a hole in their world, releasing the most powerful villains who’ve ever fought a Spider-Man in any universe. Now, Peter will have to overcome his greatest challenge yet, which will not only forever alter his own future but the future of the Multiverse.',9.0,'movies/poster/2Q.png','Action | Comedy | Romance','2hr 00min'),(2,'Sooryavanshi','https://www.youtube.com/watch?v=u5r77-OQwa8','5-11-2021','Sooryavanshi traces the acts and serious antics of DCP Veer Sooryavanshi, the chief of the Anti-Terrorism Squad in India.',8.7,'movies/poster/soryavanshi-app-780c98c0-36fd-11ec-b83e-0f984fa97b41.png','Action | Comedy','2hr 39min'),(3,'Baahubali- The Conclusion','https://www.youtube.com/watch?v=G62HrubdD6o','28-04-2017','When Shiva, the son of Bahubali, learns about his heritage, he begins to look for answers. His story is juxtaposed with past events that unfolded in the Mahishmati Kingdom.',9.8,'movies/poster/3444_Prabhas.png','Action | Comedy | Romance | Thriller','3hr 10min'),(4,'Satyamev Jayate -2','https://www.youtube.com/watch?v=e6VZiwlzhSw','26-11-2021','Satyameva Jayate 2 is a 2021 Indian Hindi-language vigilante action film written and directed by Milap Zaveri with production by T-Series and Emmay Entertainment.[4] Based on the fight against injustice and misuse of power, it is an official spiritual sequel of the 2018 film Satyameva Jayate and stars John Abraham in a triple role alongside Divya Khosla Kumar, Rajeev Pillai and Anup Soni in important characters.[5] The release date was postponed due to rise in COVID-19 cases.[6] The film released on 25 November 2021.[1]',8.4,'movies/poster/WhatsApp-Image-2021-03-17-at-10.png','Action | Comedy','2hr 50min'),(5,'F9','https://www.youtube.com/watch?v=RMmLTmjXKH8','25-06-2021','Dom and the crew must take on an international terrorist who turns out to be Dom and Mia\'s estranged brother.',8.9,'movies/poster/maxresdefault.png','Action | Racing','2hr 5min'),(6,'Mimi','https://youtu.be/_sc3HyeNxPs','30-07-2021','Experience the most unexpected journey with Mimi, it will leave you and your family in splits because it is nothing like what you are expecting!',8.7,'movies/poster/mimi.jpg','Comedy | Romance','2hr 25min'),(7,'Jolly LLB-2','https://youtu.be/uhiWdRBwSQo','10-02-2017','It is the year 2016, Jagdishwar \"Jolly\" Mishra (Akshay Kumar) is a Lucknow based lawyer, who stays with his wife Pushpa (Huma Qureshi) and son. Despite being a lawyer, he works as a menial assistant to one of the most famous lawyers of Lucknow, Mr. Rizvi, for whom his father had worked as an assistant for 30 years. He is street smart and dreams of his own law practice. To arrange money for his own chamber, Jolly lies to a widow, Hina Qasim, telling her that Mr. Rizvi will take her case and that the fee is 200,000 rupees. When Hina finds out that she had been lied to by Jolly, she commits suicide. Jolly soon discovers that Hina\'s husband Iqbal Qasim was killed in a fake encounter on 13 August 2015, the very next day of their marriage by Inspector Suryaveer Singh, who depicted him as Mohammed Iqbal Quadri, a terrorist in official documents. Singh also shot a fellow constable, Bhadouria, in order to show the encounter as genuine, leading to his death.',9.2,'movies/poster/th.jpg','Action | Comedy','2hr 30min'); +/*!40000 ALTER TABLE `accounts_movie` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2021-12-08 22:41:40 diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_accounts_shows.sql b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_accounts_shows.sql new file mode 100644 index 0000000..d4a12fd --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_accounts_shows.sql @@ -0,0 +1,59 @@ +-- MySQL dump 10.13 Distrib 8.0.27, for Win64 (x86_64) +-- +-- Host: localhost Database: dbmsproject +-- ------------------------------------------------------ +-- Server version 8.0.27 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `accounts_shows` +-- + +DROP TABLE IF EXISTS `accounts_shows`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `accounts_shows` ( + `shows` int NOT NULL AUTO_INCREMENT, + `time` varchar(100) NOT NULL, + `date` varchar(15) NOT NULL, + `price` int NOT NULL, + `cinema_id` int NOT NULL, + `movie_id` int NOT NULL, + PRIMARY KEY (`shows`), + KEY `accounts_shows_cinema_id_a9c57c57_fk_accounts_cinema_cinema` (`cinema_id`), + KEY `accounts_shows_movie_id_68d70362_fk_accounts_movie_movie` (`movie_id`), + CONSTRAINT `accounts_shows_cinema_id_a9c57c57_fk_accounts_cinema_cinema` FOREIGN KEY (`cinema_id`) REFERENCES `accounts_cinema` (`cinema`), + CONSTRAINT `accounts_shows_movie_id_68d70362_fk_accounts_movie_movie` FOREIGN KEY (`movie_id`) REFERENCES `accounts_movie` (`movie`) +) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `accounts_shows` +-- + +LOCK TABLES `accounts_shows` WRITE; +/*!40000 ALTER TABLE `accounts_shows` DISABLE KEYS */; +INSERT INTO `accounts_shows` VALUES (1,'20:30','2021-12-11',700,1,2),(2,'21:38','2021-12-10',650,1,2),(3,'18:25','2021-12-10',750,1,4),(4,'16:50','2021-12-09',700,1,6),(5,'09:25','2021-12-12',500,1,5),(6,'14:00','2021-12-16',950,1,3),(7,'18:30','2021-12-09',800,1,1),(8,'16:30','2021-12-10',670,2,1),(9,'10:00','2021-12-12',630,2,2),(10,'18:25','2021-12-13',740,2,3),(11,'20:00','2021-12-10',600,2,7),(12,'17:30','2021-12-15',800,2,4),(13,'18:30','2021-12-11',800,2,2),(14,'17:40','2021-12-10',750,2,2),(15,'15:40','2021-12-10',530,3,4),(16,'18:35','2021-12-11',560,3,4),(17,'21:30','2021-12-13',650,3,2),(18,'18:40','2021-12-13',660,3,2),(19,'07:30','2021-12-10',690,3,5),(20,'18:30','2021-12-10',750,3,7); +/*!40000 ALTER TABLE `accounts_shows` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2021-12-08 22:41:39 diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_auth_group.sql b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_auth_group.sql new file mode 100644 index 0000000..99bdd13 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_auth_group.sql @@ -0,0 +1,51 @@ +-- MySQL dump 10.13 Distrib 8.0.27, for Win64 (x86_64) +-- +-- Host: localhost Database: dbmsproject +-- ------------------------------------------------------ +-- Server version 8.0.27 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `auth_group` +-- + +DROP TABLE IF EXISTS `auth_group`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `auth_group` ( + `id` int NOT NULL AUTO_INCREMENT, + `name` varchar(150) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `auth_group` +-- + +LOCK TABLES `auth_group` WRITE; +/*!40000 ALTER TABLE `auth_group` DISABLE KEYS */; +/*!40000 ALTER TABLE `auth_group` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2021-12-08 22:41:36 diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_auth_group_permissions.sql b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_auth_group_permissions.sql new file mode 100644 index 0000000..c3ac9c1 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_auth_group_permissions.sql @@ -0,0 +1,55 @@ +-- MySQL dump 10.13 Distrib 8.0.27, for Win64 (x86_64) +-- +-- Host: localhost Database: dbmsproject +-- ------------------------------------------------------ +-- Server version 8.0.27 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `auth_group_permissions` +-- + +DROP TABLE IF EXISTS `auth_group_permissions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `auth_group_permissions` ( + `id` int NOT NULL AUTO_INCREMENT, + `group_id` int NOT NULL, + `permission_id` int NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `auth_group_permissions_group_id_permission_id_0cd325b0_uniq` (`group_id`,`permission_id`), + KEY `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` (`permission_id`), + CONSTRAINT `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`), + CONSTRAINT `auth_group_permissions_group_id_b120cbf9_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `auth_group_permissions` +-- + +LOCK TABLES `auth_group_permissions` WRITE; +/*!40000 ALTER TABLE `auth_group_permissions` DISABLE KEYS */; +/*!40000 ALTER TABLE `auth_group_permissions` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2021-12-08 22:41:39 diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_auth_permission.sql b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_auth_permission.sql new file mode 100644 index 0000000..2f99b26 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_auth_permission.sql @@ -0,0 +1,55 @@ +-- MySQL dump 10.13 Distrib 8.0.27, for Win64 (x86_64) +-- +-- Host: localhost Database: dbmsproject +-- ------------------------------------------------------ +-- Server version 8.0.27 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `auth_permission` +-- + +DROP TABLE IF EXISTS `auth_permission`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `auth_permission` ( + `id` int NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `content_type_id` int NOT NULL, + `codename` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `auth_permission_content_type_id_codename_01ab375a_uniq` (`content_type_id`,`codename`), + CONSTRAINT `auth_permission_content_type_id_2f476e4b_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `auth_permission` +-- + +LOCK TABLES `auth_permission` WRITE; +/*!40000 ALTER TABLE `auth_permission` DISABLE KEYS */; +INSERT INTO `auth_permission` VALUES (1,'Can add log entry',1,'add_logentry'),(2,'Can change log entry',1,'change_logentry'),(3,'Can delete log entry',1,'delete_logentry'),(4,'Can view log entry',1,'view_logentry'),(5,'Can add permission',2,'add_permission'),(6,'Can change permission',2,'change_permission'),(7,'Can delete permission',2,'delete_permission'),(8,'Can view permission',2,'view_permission'),(9,'Can add group',3,'add_group'),(10,'Can change group',3,'change_group'),(11,'Can delete group',3,'delete_group'),(12,'Can view group',3,'view_group'),(13,'Can add user',4,'add_user'),(14,'Can change user',4,'change_user'),(15,'Can delete user',4,'delete_user'),(16,'Can view user',4,'view_user'),(17,'Can add content type',5,'add_contenttype'),(18,'Can change content type',5,'change_contenttype'),(19,'Can delete content type',5,'delete_contenttype'),(20,'Can view content type',5,'view_contenttype'),(21,'Can add session',6,'add_session'),(22,'Can change session',6,'change_session'),(23,'Can delete session',6,'delete_session'),(24,'Can view session',6,'view_session'),(25,'Can add cinema',7,'add_cinema'),(26,'Can change cinema',7,'change_cinema'),(27,'Can delete cinema',7,'delete_cinema'),(28,'Can view cinema',7,'view_cinema'),(29,'Can add movie',8,'add_movie'),(30,'Can change movie',8,'change_movie'),(31,'Can delete movie',8,'delete_movie'),(32,'Can view movie',8,'view_movie'),(33,'Can add shows',9,'add_shows'),(34,'Can change shows',9,'change_shows'),(35,'Can delete shows',9,'delete_shows'),(36,'Can view shows',9,'view_shows'),(37,'Can add bookings',10,'add_bookings'),(38,'Can change bookings',10,'change_bookings'),(39,'Can delete bookings',10,'delete_bookings'),(40,'Can view bookings',10,'view_bookings'); +/*!40000 ALTER TABLE `auth_permission` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2021-12-08 22:41:38 diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_auth_user.sql b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_auth_user.sql new file mode 100644 index 0000000..7999079 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_auth_user.sql @@ -0,0 +1,61 @@ +-- MySQL dump 10.13 Distrib 8.0.27, for Win64 (x86_64) +-- +-- Host: localhost Database: dbmsproject +-- ------------------------------------------------------ +-- Server version 8.0.27 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `auth_user` +-- + +DROP TABLE IF EXISTS `auth_user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `auth_user` ( + `id` int NOT NULL AUTO_INCREMENT, + `password` varchar(128) NOT NULL, + `last_login` datetime(6) DEFAULT NULL, + `is_superuser` tinyint(1) NOT NULL, + `username` varchar(150) NOT NULL, + `first_name` varchar(150) NOT NULL, + `last_name` varchar(150) NOT NULL, + `email` varchar(254) NOT NULL, + `is_staff` tinyint(1) NOT NULL, + `is_active` tinyint(1) NOT NULL, + `date_joined` datetime(6) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `username` (`username`) +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `auth_user` +-- + +LOCK TABLES `auth_user` WRITE; +/*!40000 ALTER TABLE `auth_user` DISABLE KEYS */; +INSERT INTO `auth_user` VALUES (1,'pbkdf2_sha256$260000$9pBwdnmhrE2Oh3aF0ERIqg$wtoeg/0rvWhnF0kBFIHfhSds8mPTXRsZZRxmRwFQefQ=','2021-12-08 15:04:22.797067',1,'Admin','','','admin@gmail.com',1,1,'2021-12-08 14:52:25.303773'),(2,'pbkdf2_sha256$260000$RlgJsT7o8Z5nMj7V3Ga1uJ$rk7A5qUyurtZpu4/92fMX29neeZAhw6NjM26L3o9o64=','2021-12-08 16:41:08.972045',0,'neemeesh','Neemeesh','Khanzode','neemeesh.22010929@viit.ac.in',0,1,'2021-12-08 14:57:13.251586'),(3,'pbkdf2_sha256$260000$otoOK1i7DCK4BmRc0j4SjY$kLk68kIY1FbDRtTtRn06OZAw6EVhQh9U6WqAjLqzlkQ=','2021-12-08 16:43:16.747359',0,'jyotirmay','Jyotirmay','Khavasi','jyotirmay.22010699@viit.ac.in',0,1,'2021-12-08 14:58:28.150805'),(4,'pbkdf2_sha256$260000$Qrj0TK74F3Dvn9N7iRaaWa$NsQlmUlWEh7MK1QxMHARLzKknAc4zqAo9lJy2cTDrsI=','2021-12-08 16:48:40.344721',0,'suraj','Suraj','Raskar','suraj.22010472@viit.ac.in',0,1,'2021-12-08 14:59:08.050201'),(5,'pbkdf2_sha256$260000$dRxAZMkf9vhPBRJlg826af$nraUu09hip4c9dN2ArZZnYt/nd73OZ3t1m7UtQsYsbw=','2021-12-08 16:44:17.185883',0,'shardul','Shardul','Khandebharad','shardul.22010207@viit.ac.in',0,1,'2021-12-08 14:59:48.232820'),(6,'pbkdf2_sha256$260000$pGXoDUX7CqzgmS7h1aD7aZ$CLU/ejkJOddqiQODT6Gske8TtZH3KjcsVcyzFK0QApA=','2021-12-08 16:04:35.257743',0,'imax','imax','imax','imax@gmail.com',0,1,'2021-12-08 15:01:29.915435'),(7,'pbkdf2_sha256$260000$TwFRdTa8SULedC8Ex5xZPf$ZkHdc+BsyI8kIYPZCUW64LAr2P9IIZ8GUC8SF0Enxe4=','2021-12-08 16:18:52.381914',0,'pvr','PVR','PVR','pvr@gmail.com',0,1,'2021-12-08 15:02:35.772488'),(8,'pbkdf2_sha256$260000$myjGnhmRv5jlNirL1iTvRr$IGuGm+57gomrFO//9qCOsBaGDunJyQ8FHzSHa4EHQpQ=','2021-12-08 16:33:47.326518',0,'viit','VIIT','VIIT','viit@gmail.com',0,1,'2021-12-08 15:03:46.933965'); +/*!40000 ALTER TABLE `auth_user` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2021-12-08 22:41:41 diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_auth_user_groups.sql b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_auth_user_groups.sql new file mode 100644 index 0000000..4688b2b --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_auth_user_groups.sql @@ -0,0 +1,55 @@ +-- MySQL dump 10.13 Distrib 8.0.27, for Win64 (x86_64) +-- +-- Host: localhost Database: dbmsproject +-- ------------------------------------------------------ +-- Server version 8.0.27 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `auth_user_groups` +-- + +DROP TABLE IF EXISTS `auth_user_groups`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `auth_user_groups` ( + `id` int NOT NULL AUTO_INCREMENT, + `user_id` int NOT NULL, + `group_id` int NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `auth_user_groups_user_id_group_id_94350c0c_uniq` (`user_id`,`group_id`), + KEY `auth_user_groups_group_id_97559544_fk_auth_group_id` (`group_id`), + CONSTRAINT `auth_user_groups_group_id_97559544_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`), + CONSTRAINT `auth_user_groups_user_id_6a12ed8b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `auth_user_groups` +-- + +LOCK TABLES `auth_user_groups` WRITE; +/*!40000 ALTER TABLE `auth_user_groups` DISABLE KEYS */; +/*!40000 ALTER TABLE `auth_user_groups` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2021-12-08 22:41:40 diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_auth_user_user_permissions.sql b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_auth_user_user_permissions.sql new file mode 100644 index 0000000..095d7e5 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_auth_user_user_permissions.sql @@ -0,0 +1,55 @@ +-- MySQL dump 10.13 Distrib 8.0.27, for Win64 (x86_64) +-- +-- Host: localhost Database: dbmsproject +-- ------------------------------------------------------ +-- Server version 8.0.27 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `auth_user_user_permissions` +-- + +DROP TABLE IF EXISTS `auth_user_user_permissions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `auth_user_user_permissions` ( + `id` int NOT NULL AUTO_INCREMENT, + `user_id` int NOT NULL, + `permission_id` int NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `auth_user_user_permissions_user_id_permission_id_14a6b632_uniq` (`user_id`,`permission_id`), + KEY `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm` (`permission_id`), + CONSTRAINT `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`), + CONSTRAINT `auth_user_user_permissions_user_id_a95ead1b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `auth_user_user_permissions` +-- + +LOCK TABLES `auth_user_user_permissions` WRITE; +/*!40000 ALTER TABLE `auth_user_user_permissions` DISABLE KEYS */; +/*!40000 ALTER TABLE `auth_user_user_permissions` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2021-12-08 22:41:36 diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_django_admin_log.sql b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_django_admin_log.sql new file mode 100644 index 0000000..12b0608 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_django_admin_log.sql @@ -0,0 +1,62 @@ +-- MySQL dump 10.13 Distrib 8.0.27, for Win64 (x86_64) +-- +-- Host: localhost Database: dbmsproject +-- ------------------------------------------------------ +-- Server version 8.0.27 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `django_admin_log` +-- + +DROP TABLE IF EXISTS `django_admin_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `django_admin_log` ( + `id` int NOT NULL AUTO_INCREMENT, + `action_time` datetime(6) NOT NULL, + `object_id` longtext, + `object_repr` varchar(200) NOT NULL, + `action_flag` smallint unsigned NOT NULL, + `change_message` longtext NOT NULL, + `content_type_id` int DEFAULT NULL, + `user_id` int NOT NULL, + PRIMARY KEY (`id`), + KEY `django_admin_log_content_type_id_c4bce8eb_fk_django_co` (`content_type_id`), + KEY `django_admin_log_user_id_c564eba6_fk_auth_user_id` (`user_id`), + CONSTRAINT `django_admin_log_content_type_id_c4bce8eb_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`), + CONSTRAINT `django_admin_log_user_id_c564eba6_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `django_admin_log_chk_1` CHECK ((`action_flag` >= 0)) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `django_admin_log` +-- + +LOCK TABLES `django_admin_log` WRITE; +/*!40000 ALTER TABLE `django_admin_log` DISABLE KEYS */; +INSERT INTO `django_admin_log` VALUES (1,'2021-12-08 15:09:46.004862','1','Spider Man - No Way Home',1,'[{\"added\": {}}]',8,1),(2,'2021-12-08 15:11:21.818755','2','Sooryavanshi',1,'[{\"added\": {}}]',8,1),(3,'2021-12-08 15:13:56.414231','3','Baahubali- The Conclusion',1,'[{\"added\": {}}]',8,1),(4,'2021-12-08 15:16:16.834696','4','Satyamev Jayate -2',1,'[{\"added\": {}}]',8,1),(5,'2021-12-08 15:19:29.417873','5','F9',1,'[{\"added\": {}}]',8,1),(6,'2021-12-08 15:56:45.089096','6','Mimi',1,'[{\"added\": {}}]',8,1),(7,'2021-12-08 16:00:02.208041','7','Jolly LLB-2',1,'[{\"added\": {}}]',8,1); +/*!40000 ALTER TABLE `django_admin_log` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2021-12-08 22:41:37 diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_django_content_type.sql b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_django_content_type.sql new file mode 100644 index 0000000..1ea4453 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_django_content_type.sql @@ -0,0 +1,53 @@ +-- MySQL dump 10.13 Distrib 8.0.27, for Win64 (x86_64) +-- +-- Host: localhost Database: dbmsproject +-- ------------------------------------------------------ +-- Server version 8.0.27 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `django_content_type` +-- + +DROP TABLE IF EXISTS `django_content_type`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `django_content_type` ( + `id` int NOT NULL AUTO_INCREMENT, + `app_label` varchar(100) NOT NULL, + `model` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `django_content_type_app_label_model_76bd3d3b_uniq` (`app_label`,`model`) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `django_content_type` +-- + +LOCK TABLES `django_content_type` WRITE; +/*!40000 ALTER TABLE `django_content_type` DISABLE KEYS */; +INSERT INTO `django_content_type` VALUES (10,'accounts','bookings'),(7,'accounts','cinema'),(8,'accounts','movie'),(9,'accounts','shows'),(1,'admin','logentry'),(3,'auth','group'),(2,'auth','permission'),(4,'auth','user'),(5,'contenttypes','contenttype'),(6,'sessions','session'); +/*!40000 ALTER TABLE `django_content_type` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2021-12-08 22:41:34 diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_django_migrations.sql b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_django_migrations.sql new file mode 100644 index 0000000..9274cc3 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_django_migrations.sql @@ -0,0 +1,53 @@ +-- MySQL dump 10.13 Distrib 8.0.27, for Win64 (x86_64) +-- +-- Host: localhost Database: dbmsproject +-- ------------------------------------------------------ +-- Server version 8.0.27 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `django_migrations` +-- + +DROP TABLE IF EXISTS `django_migrations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `django_migrations` ( + `id` int NOT NULL AUTO_INCREMENT, + `app` varchar(255) NOT NULL, + `name` varchar(255) NOT NULL, + `applied` datetime(6) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `django_migrations` +-- + +LOCK TABLES `django_migrations` WRITE; +/*!40000 ALTER TABLE `django_migrations` DISABLE KEYS */; +INSERT INTO `django_migrations` VALUES (1,'contenttypes','0001_initial','2021-12-08 14:50:32.698955'),(2,'auth','0001_initial','2021-12-08 14:50:33.669373'),(3,'accounts','0001_initial','2021-12-08 14:50:34.463248'),(4,'admin','0001_initial','2021-12-08 14:50:34.851210'),(5,'admin','0002_logentry_remove_auto_add','2021-12-08 14:50:34.865174'),(6,'admin','0003_logentry_add_action_flag_choices','2021-12-08 14:50:34.877141'),(7,'contenttypes','0002_remove_content_type_name','2021-12-08 14:50:35.028735'),(8,'auth','0002_alter_permission_name_max_length','2021-12-08 14:50:35.119492'),(9,'auth','0003_alter_user_email_max_length','2021-12-08 14:50:35.169360'),(10,'auth','0004_alter_user_username_opts','2021-12-08 14:50:35.184320'),(11,'auth','0005_alter_user_last_login_null','2021-12-08 14:50:35.269093'),(12,'auth','0006_require_contenttypes_0002','2021-12-08 14:50:35.273082'),(13,'auth','0007_alter_validators_add_error_messages','2021-12-08 14:50:35.287045'),(14,'auth','0008_alter_user_username_max_length','2021-12-08 14:50:35.397747'),(15,'auth','0009_alter_user_last_name_max_length','2021-12-08 14:50:35.486511'),(16,'auth','0010_alter_group_name_max_length','2021-12-08 14:50:35.516431'),(17,'auth','0011_update_proxy_permissions','2021-12-08 14:50:35.540367'),(18,'auth','0012_alter_user_first_name_max_length','2021-12-08 14:50:35.720884'),(19,'sessions','0001_initial','2021-12-08 14:50:35.784713'); +/*!40000 ALTER TABLE `django_migrations` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2021-12-08 22:41:37 diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_django_session.sql b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_django_session.sql new file mode 100644 index 0000000..964454b --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/dbmsproject/dbmsproject_django_session.sql @@ -0,0 +1,52 @@ +-- MySQL dump 10.13 Distrib 8.0.27, for Win64 (x86_64) +-- +-- Host: localhost Database: dbmsproject +-- ------------------------------------------------------ +-- Server version 8.0.27 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `django_session` +-- + +DROP TABLE IF EXISTS `django_session`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `django_session` ( + `session_key` varchar(40) NOT NULL, + `session_data` longtext NOT NULL, + `expire_date` datetime(6) NOT NULL, + PRIMARY KEY (`session_key`), + KEY `django_session_expire_date_a5c62663` (`expire_date`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `django_session` +-- + +LOCK TABLES `django_session` WRITE; +/*!40000 ALTER TABLE `django_session` DISABLE KEYS */; +/*!40000 ALTER TABLE `django_session` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2021-12-08 22:41:35 diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/main/__init__.py b/DBMSProject/DBMSProjectMovieBookingSystem/main/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/main/__pycache__/__init__.cpython-39.pyc b/DBMSProject/DBMSProjectMovieBookingSystem/main/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000..dca9f8c Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/main/__pycache__/__init__.cpython-39.pyc differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/main/__pycache__/admin.cpython-39.pyc b/DBMSProject/DBMSProjectMovieBookingSystem/main/__pycache__/admin.cpython-39.pyc new file mode 100644 index 0000000..8df5da7 Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/main/__pycache__/admin.cpython-39.pyc differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/main/__pycache__/apps.cpython-39.pyc b/DBMSProject/DBMSProjectMovieBookingSystem/main/__pycache__/apps.cpython-39.pyc new file mode 100644 index 0000000..875a0b7 Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/main/__pycache__/apps.cpython-39.pyc differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/main/__pycache__/models.cpython-39.pyc b/DBMSProject/DBMSProjectMovieBookingSystem/main/__pycache__/models.cpython-39.pyc new file mode 100644 index 0000000..679562f Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/main/__pycache__/models.cpython-39.pyc differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/main/__pycache__/urls.cpython-39.pyc b/DBMSProject/DBMSProjectMovieBookingSystem/main/__pycache__/urls.cpython-39.pyc new file mode 100644 index 0000000..a5bf840 Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/main/__pycache__/urls.cpython-39.pyc differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/main/__pycache__/views.cpython-39.pyc b/DBMSProject/DBMSProjectMovieBookingSystem/main/__pycache__/views.cpython-39.pyc new file mode 100644 index 0000000..ca19582 Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/main/__pycache__/views.cpython-39.pyc differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/main/admin.py b/DBMSProject/DBMSProjectMovieBookingSystem/main/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/main/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/main/apps.py b/DBMSProject/DBMSProjectMovieBookingSystem/main/apps.py new file mode 100644 index 0000000..167f044 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/main/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class MainConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'main' diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/main/migrations/__init__.py b/DBMSProject/DBMSProjectMovieBookingSystem/main/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/main/migrations/__pycache__/__init__.cpython-39.pyc b/DBMSProject/DBMSProjectMovieBookingSystem/main/migrations/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000..3db2026 Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/main/migrations/__pycache__/__init__.cpython-39.pyc differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/main/models.py b/DBMSProject/DBMSProjectMovieBookingSystem/main/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/main/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/main/tests.py b/DBMSProject/DBMSProjectMovieBookingSystem/main/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/main/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/main/urls.py b/DBMSProject/DBMSProjectMovieBookingSystem/main/urls.py new file mode 100644 index 0000000..0ee54c9 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/main/urls.py @@ -0,0 +1,14 @@ +from django.contrib import admin +from django.urls import path,include +from . import views +from django.conf import settings +from django.conf.urls.static import static + +urlpatterns=[ + path('',views.index,name='index'), + path('movies/',views.movies,name='movies'), + path('seat/',views.seat,name='seat'), + path('booked',views.booked,name='booked'), + path('ticket/',views.ticket,name='ticket'), + +]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) \ No newline at end of file diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/main/views.py b/DBMSProject/DBMSProjectMovieBookingSystem/main/views.py new file mode 100644 index 0000000..1ded2ba --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/main/views.py @@ -0,0 +1,50 @@ +from django.shortcuts import render +from accounts.models import * +from django.http import HttpResponseRedirect +# Create your views here. + + +def index(request): + movies = Movie.objects.all() + context = { + 'mov': movies + } + return render(request,"index.html", context) + +def movies(request, id): + movies = Movie.objects.get(movie=id) + cin = Cinema.objects.filter(cinema_show__movie=movies).prefetch_related('cinema_show').distinct() # get all cinema + show = Shows.objects.filter(movie=id) + context = { + 'movies':movies, + 'show':show, + 'cin':cin, + } + return render(request, "movies.html", context ) + +def seat(request, id): + show = Shows.objects.get(shows=id) + seat = Bookings.objects.filter(shows=id) + seat=list(seat).sort() + return render(request,"seat.html", {'show':show, 'seat':seat}) + +def booked(request): + if request.method == 'POST': + user = request.user + seat = request.POST.get('SeatNo.') + show = request.POST['show'] + total_seats1 = request.POST['TotalSeats'] + book = Bookings(useat=seat, shows_id=show, user=user, total_seats=total_seats1) + book.save() + return render(request,"booked.html", {'book':book}) + + +def ticket(request, id): + ticket = Bookings.objects.get(id=id) + count=0 + for seat in ticket.useat: + if seat=='#': + count=count+1 + price=ticket.shows.price*count + return render(request,"ticket.html", {'ticket':ticket,'price':price}) + diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/manage.py b/DBMSProject/DBMSProjectMovieBookingSystem/manage.py new file mode 100644 index 0000000..57df5ca --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + """Run administrative tasks.""" + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'DBMSProjectMovieBookingSystem.settings') + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) from exc + execute_from_command_line(sys.argv) + + +if __name__ == '__main__': + main() diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/media/movies/poster/2Q.png b/DBMSProject/DBMSProjectMovieBookingSystem/media/movies/poster/2Q.png new file mode 100644 index 0000000..b65e942 Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/media/movies/poster/2Q.png differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/media/movies/poster/3444_Prabhas.png b/DBMSProject/DBMSProjectMovieBookingSystem/media/movies/poster/3444_Prabhas.png new file mode 100644 index 0000000..1ac4a27 Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/media/movies/poster/3444_Prabhas.png differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/media/movies/poster/WhatsApp-Image-2021-03-17-at-10.png b/DBMSProject/DBMSProjectMovieBookingSystem/media/movies/poster/WhatsApp-Image-2021-03-17-at-10.png new file mode 100644 index 0000000..f864445 Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/media/movies/poster/WhatsApp-Image-2021-03-17-at-10.png differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/media/movies/poster/maxresdefault.png b/DBMSProject/DBMSProjectMovieBookingSystem/media/movies/poster/maxresdefault.png new file mode 100644 index 0000000..a426d21 Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/media/movies/poster/maxresdefault.png differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/media/movies/poster/mimi.jpg b/DBMSProject/DBMSProjectMovieBookingSystem/media/movies/poster/mimi.jpg new file mode 100644 index 0000000..cd909d6 Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/media/movies/poster/mimi.jpg differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/media/movies/poster/soryavanshi-app-780c98c0-36fd-11ec-b83e-0f984fa97b41.png b/DBMSProject/DBMSProjectMovieBookingSystem/media/movies/poster/soryavanshi-app-780c98c0-36fd-11ec-b83e-0f984fa97b41.png new file mode 100644 index 0000000..ed3e5d5 Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/media/movies/poster/soryavanshi-app-780c98c0-36fd-11ec-b83e-0f984fa97b41.png differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/media/movies/poster/th.jpg b/DBMSProject/DBMSProjectMovieBookingSystem/media/movies/poster/th.jpg new file mode 100644 index 0000000..754a5a7 Binary files /dev/null and b/DBMSProject/DBMSProjectMovieBookingSystem/media/movies/poster/th.jpg differ diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/templates/add_shows.html b/DBMSProject/DBMSProjectMovieBookingSystem/templates/add_shows.html new file mode 100644 index 0000000..67187e4 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/templates/add_shows.html @@ -0,0 +1,132 @@ +{% extends 'base.html' %} +{% load static %} + + +{% block content %} + + +
+ + + +
+
+
+
Add Shows at {{user.cinema.cinema_name}}
+
+ + + {% for message in messages %} + + {% endfor %} + +
+
+
+ {% csrf_token %} +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ +
+ + {% for movie in list %} +
+ Misisng Poster +
{{movie.movie__movie_name}}
+
+ {% endfor %} +
+ + +
+

All Shows at {{user.cinema.cinema_name}}

+
+ + + + + + + + + + + + + {% for list in s %} + + + + + + + + {% endfor %} + +
IDMovieTimeDate (YYYY/MM/DD)Price
{{list.shows}}{{list.movie.movie_name}}{{list.time}}{{list.date}}Rs. {{list.price}}
+ +
+ +
+
+
+ + + + + + +{% endblock %} + + +{% block JQuery %} + +{% endblock %} \ No newline at end of file diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/templates/base.html b/DBMSProject/DBMSProjectMovieBookingSystem/templates/base.html new file mode 100644 index 0000000..117e301 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/templates/base.html @@ -0,0 +1,70 @@ + + + + + Movie Booker + + + + + + + + +
+
+ +
+
+ +
+
+ + + + + + {% block content %} + {% endblock %} + + + {% block JQuery %} + {% endblock %} +
+
+ + + + + + + + diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/templates/booked.html b/DBMSProject/DBMSProjectMovieBookingSystem/templates/booked.html new file mode 100644 index 0000000..26ef466 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/templates/booked.html @@ -0,0 +1,17 @@ +{% extends 'base.html' %} +{% load static %} + +{% block title %} +BoxOffice +{% endblock %} + + +{% block JQuery %} + + + +{% endblock %} \ No newline at end of file diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/templates/bookings.html b/DBMSProject/DBMSProjectMovieBookingSystem/templates/bookings.html new file mode 100644 index 0000000..84161fc --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/templates/bookings.html @@ -0,0 +1,53 @@ +{% extends 'base.html' %} +{% load static %} + +{% block content %} + +
+
+ +
+ + + + + + + + + + + + + + + + + + {% for b in book %} + + + + + + + + + + + + + + {% endfor %} + + +
ID | Movie Name | Cinema | Show Date | Price | View
{{b.pk}} | {{b.shows.movie.movie_name}} | {{b.shows.cinema.cinema_name}} | {{b.shows.date}} | Rs. {{b.shows.price}} * {{b.total_seats}} | View Ticket
+
+ +
+
+{% endblock %} + + +{% block JQuery %} +{% endblock %} \ No newline at end of file diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/templates/dashboard.html b/DBMSProject/DBMSProjectMovieBookingSystem/templates/dashboard.html new file mode 100644 index 0000000..0595c57 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/templates/dashboard.html @@ -0,0 +1,75 @@ +{% extends 'base.html' %} +{% load static %} + + +{% block content %} + + +
+ + + + + + +
+
+
+
Movies Showcasing at {{user.cinema.cinema_name}}

+ +
+ {% for movie in list %} +
+ + {% endfor %} +
+ +
+
+
+ + +
+ + + +{% endblock %} + + +{% block JQuery %} + +{% endblock %} \ No newline at end of file diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/templates/index.html b/DBMSProject/DBMSProjectMovieBookingSystem/templates/index.html new file mode 100644 index 0000000..feacb5c --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/templates/index.html @@ -0,0 +1,39 @@ +{% extends 'base.html' %} +{% load static %} + + + +{% block content %} + +
+ + + {% for movie in mov %} +
+ + {% endfor %} + +
+
+
+ + +{% endblock %} \ No newline at end of file diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/templates/login.html b/DBMSProject/DBMSProjectMovieBookingSystem/templates/login.html new file mode 100644 index 0000000..53c5483 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/templates/login.html @@ -0,0 +1,40 @@ +{% extends 'base.html' %} +{% load static %} + +{% block title %} +BoxOffice | Home +{% endblock %} + +{% block style %} + +{% endblock %} + +{% block content %} + +
+
+ +
+
+ + +{% for message in messages%} +

{{ message }}

+{% endfor %} + + +{% endblock %} \ No newline at end of file diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/templates/movies.html b/DBMSProject/DBMSProjectMovieBookingSystem/templates/movies.html new file mode 100644 index 0000000..c3f1673 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/templates/movies.html @@ -0,0 +1,45 @@ +{% extends 'base.html' %} + +{% block content %} + +
+
+
+ +
+
+
+
+

{{movies.movie_name}}

+

{{movies.movie_genre}}

+

+ {{movies.movie_duration}} | {{movies.movie_rdate}}

+

{{movies.movie_des}}

+

{{movies.movie_rating}}

+

Watch Trailer

+
+ +
+
+
+
+ Card image cap +
+

Select timings

+
+
+
+ +
+ {% for i in cin %} + {{i.cinema_name}} + {% for j in i.cinema_show.all %} + {% if j.movie_id == movies.movie %} + {{j.date}} {{j.time}}      + {% endif %} + {% endfor %}
+ {% endfor %} +


+
+
+ {% endblock %} \ No newline at end of file diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/templates/profile.html b/DBMSProject/DBMSProjectMovieBookingSystem/templates/profile.html new file mode 100644 index 0000000..77bdfc9 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/templates/profile.html @@ -0,0 +1,69 @@ +{% extends 'base.html' %} +{% load static %} + +{% block content %} +
+ + {% for message in messages%} + + {% endfor %} + +
+
+
+
+
+ + +
+ {% csrf_token %} +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+
+
+
+
+
+ + + +{% endblock %} + + +{% block JQuery %} + +{% endblock %} \ No newline at end of file diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/templates/register.html b/DBMSProject/DBMSProjectMovieBookingSystem/templates/register.html new file mode 100644 index 0000000..2d0c8d6 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/templates/register.html @@ -0,0 +1,61 @@ +{% extends 'base.html' %} +{% load static %} + +{% block style %} + +{% endblock %} + +{% block content %} + + + +
+
+
+
+ {% csrf_token %} + +

Registration

+ +
+ + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ +{% for message in messages %} +

{{message}}

+{% endfor %} + +{% endblock %} \ No newline at end of file diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/templates/register_cinema.html b/DBMSProject/DBMSProjectMovieBookingSystem/templates/register_cinema.html new file mode 100644 index 0000000..156f77d --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/templates/register_cinema.html @@ -0,0 +1,75 @@ +{% extends 'base.html' %} +{% load static %} + + +{% block content %} + + +
+
+
+
+ {% csrf_token %} + +

Registration as Cinema

+ +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+ + +
+
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+ + +
+
+
+
+ +{% for message in messages %} +

{{message}}

+{% endfor %} + +{% endblock %} \ No newline at end of file diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/templates/seat.html b/DBMSProject/DBMSProjectMovieBookingSystem/templates/seat.html new file mode 100644 index 0000000..814c845 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/templates/seat.html @@ -0,0 +1,48 @@ +{% extends 'base.html' %} +{% load static %} + +{% block content %} +
+
+
+
+ {% csrf_token %} + +

Booked Seats:

+

+ {% for seat in seat %} + {{seat.useat}} + {% endfor %} +

+

Select Seats:

+ +

Total Seats:

+ + {% if user.is_authenticated %} + + {% else %} + Login To Book + {% endif %} +
+
+
+ +
+ + + + +
+ +{% endblock %} \ No newline at end of file diff --git a/DBMSProject/DBMSProjectMovieBookingSystem/templates/ticket.html b/DBMSProject/DBMSProjectMovieBookingSystem/templates/ticket.html new file mode 100644 index 0000000..a3f9a06 --- /dev/null +++ b/DBMSProject/DBMSProjectMovieBookingSystem/templates/ticket.html @@ -0,0 +1,40 @@ +{% extends 'base.html' %} +{% load static %} + +{% block content %} + +
+
+
+
+
+

BoxOffice

+
+
+

{{ticket.shows.movie.movie_name}} ({{ticket.shows.cinema.cinema_name}})

+
+
+
+
+
+
+

Booking ID : {{ticket.pk}}

+

Date : {{ticket.shows.date}}

+

Price : ₹{{price}}

+
+
+

Seats : {{ticket.useat}}

+

Time : {{ticket.shows.time}}

+

Hall : H1

+
+
+ {{ticket.shows.cinema.cinema_name}} : {{ticket.shows.cinema.address}} +
+
+
+
+
+
+ + + {% endblock %} \ No newline at end of file diff --git a/DBMS_2/BoxOffice/.env b/DBMS_2/BoxOffice/.env deleted file mode 100644 index 0e7461c..0000000 --- a/DBMS_2/BoxOffice/.env +++ /dev/null @@ -1,6 +0,0 @@ -SECRET_KEY = root@localhost:3306 -DB_NAME =dbms_project_01 -DB_USER = root -DB_PASSWORD = root -DB_HOST = localhost -DB_PORT = 3306 \ No newline at end of file diff --git a/DBMS_2/accounts/__pycache__/models.cpython-39.pyc b/DBMS_2/accounts/__pycache__/models.cpython-39.pyc index 975a836..8e80d52 100644 Binary files a/DBMS_2/accounts/__pycache__/models.cpython-39.pyc and b/DBMS_2/accounts/__pycache__/models.cpython-39.pyc differ diff --git a/DBMS_2/accounts/migrations/0005_bookings_total_seats.py b/DBMS_2/accounts/migrations/0005_bookings_total_seats.py new file mode 100644 index 0000000..e9e8a49 --- /dev/null +++ b/DBMS_2/accounts/migrations/0005_bookings_total_seats.py @@ -0,0 +1,19 @@ +# Generated by Django 3.2.9 on 2021-12-06 11:46 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('accounts', '0004_movie_movie_rdate'), + ] + + operations = [ + migrations.AddField( + model_name='bookings', + name='total_seats', + field=models.IntegerField(default=1), + preserve_default=False, + ), + ] diff --git a/DBMS_2/accounts/migrations/__pycache__/0005_bookings_total_seats.cpython-39.pyc b/DBMS_2/accounts/migrations/__pycache__/0005_bookings_total_seats.cpython-39.pyc new file mode 100644 index 0000000..d225ebf Binary files /dev/null and b/DBMS_2/accounts/migrations/__pycache__/0005_bookings_total_seats.cpython-39.pyc differ diff --git a/DBMS_2/accounts/models.py b/DBMS_2/accounts/models.py index 9d3af0e..61ffeb6 100644 --- a/DBMS_2/accounts/models.py +++ b/DBMS_2/accounts/models.py @@ -45,7 +45,15 @@ class Bookings(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) shows = models.ForeignKey(Shows, on_delete=models.CASCADE) useat = models.CharField(max_length=100) + total_seats = models.IntegerField() + # def total_seats(): + # total_seats=0 + # for seat in Bookings.useat: + # if seat=="#": + # total_seats+=1 + # return total_seats + @property def useat_as_list(self): return self.useat.split(',') diff --git a/DBMS_2/main/__pycache__/views.cpython-39.pyc b/DBMS_2/main/__pycache__/views.cpython-39.pyc index 25ac9be..e4ec1c0 100644 Binary files a/DBMS_2/main/__pycache__/views.cpython-39.pyc and b/DBMS_2/main/__pycache__/views.cpython-39.pyc differ diff --git a/DBMS_2/main/views.py b/DBMS_2/main/views.py index 1056258..7839aee 100644 --- a/DBMS_2/main/views.py +++ b/DBMS_2/main/views.py @@ -33,8 +33,18 @@ def booked(request): user = request.user seat = request.POST.get('SeatNo.') show = request.POST['show'] - book = Bookings(useat=seat, shows_id=show, user=user) + total_seats1 = request.POST['TotalSeats'] + book = Bookings(useat=seat, shows_id=show, user=user, total_seats=total_seats1) + # book_total = ticket(request='POST') book.save() + + # ticket = Bookings.objects.get(id=id) + # count=0 + # for seat in book.useat: + # if seat=='#': + # count=count+1 + # price_t=book.shows.price*count + # book.price_total = price return render(request,"booked.html", {'book':book}) diff --git a/DBMS_2/media/movies/poster/beluga.jpg b/DBMS_2/media/movies/poster/beluga.jpg new file mode 100644 index 0000000..56915d9 Binary files /dev/null and b/DBMS_2/media/movies/poster/beluga.jpg differ diff --git a/DBMS_2/media/movies/poster/chad_monke.png b/DBMS_2/media/movies/poster/chad_monke.png new file mode 100644 index 0000000..89be7d1 Binary files /dev/null and b/DBMS_2/media/movies/poster/chad_monke.png differ diff --git a/DBMS_2/media/movies/poster/chad_monke_IhoGwwW.png b/DBMS_2/media/movies/poster/chad_monke_IhoGwwW.png new file mode 100644 index 0000000..89be7d1 Binary files /dev/null and b/DBMS_2/media/movies/poster/chad_monke_IhoGwwW.png differ diff --git a/DBMS_2/media/movies/poster/chad_monke_VCDxMdr.png b/DBMS_2/media/movies/poster/chad_monke_VCDxMdr.png new file mode 100644 index 0000000..89be7d1 Binary files /dev/null and b/DBMS_2/media/movies/poster/chad_monke_VCDxMdr.png differ diff --git a/DBMS_2/templates/base.html b/DBMS_2/templates/base.html index 15c71c0..117e301 100644 --- a/DBMS_2/templates/base.html +++ b/DBMS_2/templates/base.html @@ -1,62 +1,70 @@ -{% load static %} - - - - {% block title%}{% endblock %} - - - {% block style %}{% endblock %} - - - - - + + + + + {% block content %} {% endblock %} - - - - - - - {% block JQuery %} {% endblock %} - +
+
+ + + + + - \ No newline at end of file + + diff --git a/DBMS_2/templates/bookings.html b/DBMS_2/templates/bookings.html index 51e491f..84161fc 100644 --- a/DBMS_2/templates/bookings.html +++ b/DBMS_2/templates/bookings.html @@ -1,15 +1,6 @@ {% extends 'base.html' %} {% load static %} -{% block title %} -BoxOffice | Bookings -{% endblock %} - -{% block style %} - -{% endblock %} - - {% block content %}
@@ -20,22 +11,31 @@ ID + | Movie Name + | Cinema + | Show Date + | Price + | View - {% for b in book %} {{b.pk}} + | {{b.shows.movie.movie_name}} + | {{b.shows.cinema.cinema_name}} + | {{b.shows.date}} - Rs. {{b.shows.price}} + | + Rs. {{b.shows.price}} * {{b.total_seats}} + | View Ticket {% endfor %} diff --git a/DBMS_2/templates/index.html b/DBMS_2/templates/index.html index bf63474..2b4a9ac 100644 --- a/DBMS_2/templates/index.html +++ b/DBMS_2/templates/index.html @@ -1,13 +1,31 @@ {% extends 'base.html' %} {% load static %} -{% block title %} -BoxOffice | Home -{% endblock %} + {% block content %} -
+
+ + + + + + + + + {% for movie in mov %} -
- -
+
+
+ +

{{ movie.movie_name }}

+ +
-

{{ movie.movie_name }}

+
diff --git a/DBMS_2/templates/movies.html b/DBMS_2/templates/movies.html index eda7c2b..e319c69 100644 --- a/DBMS_2/templates/movies.html +++ b/DBMS_2/templates/movies.html @@ -1,90 +1,9 @@ {% extends 'base.html' %} -{% block title %} -BoxOffice | {{movies.movie_name}} -{% endblock %} - -{% block style %} - - -{% endblock %} - {% block content %}
-
+
@@ -93,107 +12,37 @@

{{movies.movie_name}}

{{movies.movie_genre}}

-

+

{{movies.movie_duration}} | {{movies.movie_rdate}}

{{movies.movie_des}}

-

{{movies.movie_rating}}

- - - +

{{movies.movie_rating}}

+

Watch Trailer

- - - - - -
-
-
- - -
Card image cap
-

{{movies.movie_name}}

-

{{movies.movie_rating}}

- +

Select timings

- - - - - - - - - + + + {% for i in cin %} - + {{i.cinema_name}} {% for j in i.cinema_show.all %} {% if j.movie_id == movies.movie %} - + {{j.time}} {% endif %} - {% endfor %} - {% endfor %} - -
CinemaTime
{{i.cinema_name}} {{j.time}}
diff --git a/DBMS_2/templates/profile.html b/DBMS_2/templates/profile.html index ac41ace..77bdfc9 100644 --- a/DBMS_2/templates/profile.html +++ b/DBMS_2/templates/profile.html @@ -1,57 +1,6 @@ {% extends 'base.html' %} {% load static %} -{% block title %} -BoxOffice | Profile -{% endblock %} - -{% block style %} - -{% endblock %} - {% block content %}
diff --git a/DBMS_2/templates/register.html b/DBMS_2/templates/register.html index e7a25d7..2d0c8d6 100644 --- a/DBMS_2/templates/register.html +++ b/DBMS_2/templates/register.html @@ -1,10 +1,6 @@ {% extends 'base.html' %} {% load static %} -{% block title %} -BoxOffice | Home -{% endblock %} - {% block style %} {% endblock %} @@ -37,20 +33,22 @@

Registration

- +
- +
- +
+
diff --git a/DBMS_2/templates/register_cinema.html b/DBMS_2/templates/register_cinema.html index bd20976..156f77d 100644 --- a/DBMS_2/templates/register_cinema.html +++ b/DBMS_2/templates/register_cinema.html @@ -1,25 +1,10 @@ {% extends 'base.html' %} {% load static %} -{% block title %} -BoxOffice | Home -{% endblock %} - -{% block style %} - -{% endblock %} {% block content %} - -
@@ -46,16 +31,16 @@

Registration as Cinema

- +
- +
- +
diff --git a/DBMS_2/templates/seat.html b/DBMS_2/templates/seat.html index 6b8f05f..814c845 100644 --- a/DBMS_2/templates/seat.html +++ b/DBMS_2/templates/seat.html @@ -1,45 +1,36 @@ {% extends 'base.html' %} {% load static %} -{% block title %} -BoxOffice | {{show.movie.movie_name}} - - -{% endblock %} - - - -{% block style %} - - - - - - - -{% endblock %} - {% block content %} -
+
-
+
{% csrf_token %} -

Booked Seats:

+

Booked Seats:

{% for seat in seat %} {{seat.useat}} {% endfor %}

+

Select Seats:

+

Total Seats:

+ + {% if user.is_authenticated %} + + {% else %} + Login To Book + {% endif %}
+
- -
+ +
diff --git a/DBMS_2/templates/ticket.html b/DBMS_2/templates/ticket.html index d004277..a3f9a06 100644 --- a/DBMS_2/templates/ticket.html +++ b/DBMS_2/templates/ticket.html @@ -1,50 +1,6 @@ {% extends 'base.html' %} {% load static %} -{% block title %} -BoxOffice -{% endblock %} - -{% block style %} - -{% endblock %} - - {% block content %}
@@ -59,10 +15,6 @@

{{ticket.shows.movie.movie_name}} ({{ticket.shows.

-
- -
diff --git a/DBMS_2/templates/w3schools.html b/DBMS_2/templates/w3schools.html new file mode 100644 index 0000000..bef7967 --- /dev/null +++ b/DBMS_2/templates/w3schools.html @@ -0,0 +1,102 @@ + + + + + + + + + + + + +
+
+ + Home + Link 1 + Link 2 + Link 3 + Link 4 +
+ +
+ + +
+

START PAGE

+

Template by w3.css

+ +
+ + +
+
+
+

Lorem Ipsum

+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
+ +

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Excepteur sint + occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco + laboris nisi ut aliquip ex ea commodo consequat.

+
+ +
+ +
+
+
+ + +
+
+
+ +
+ +
+

Lorem Ipsum

+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
+ +

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Excepteur sint + occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco + laboris nisi ut aliquip ex ea commodo consequat.

+
+
+
+ +
+

Quote of the day: live life

+
+ + +
+
+ + + + + + +
+

Powered by w3.css

+
+ + + + + diff --git a/Euler-and-Hamiltonian-Path/DMSprogram.cpp b/Euler-and-Hamiltonian-Path/DMSprogram.cpp new file mode 100644 index 0000000..f3fb317 --- /dev/null +++ b/Euler-and-Hamiltonian-Path/DMSprogram.cpp @@ -0,0 +1,201 @@ +#include +#include +#include +#include +#include +using namespace std; +int n; + +class Euler{ + int V; + vector *adj; +public: + Euler(int V) { this->V = V; adj = new vector[V]; }//declaring no. of vertices and adjecency matrix + ~Euler() { delete [] adj; } + + void addEdge(int u, int v) { adj[u].push_back(v); adj[v].push_back(u); } //creating and updating adjecency matrix + void rmvEdge(int u, int v); + void printEulerTour(); + void printEulerUtil(int s); + int DFSCount(int v, bool visited[]); + bool isValidNextEdge(int u, int v); + int iseuler(int[]); +}; + +void Euler::printEulerTour(){ + int u = 0; + for (int i = 0; i < V; i++) + if (adj[i].size() & 1 ) //taking vertex having odd degree + { u = i; break; } + printEulerUtil(u); + cout << endl; +} + +void Euler::printEulerUtil(int u){ + vector::iterator i; + for (i = adj[u].begin(); i != adj[u].end(); ++i){ //traversing through adjecency matrix + int v = *i; + if (v != -1 && isValidNextEdge(u, v)){ // If edge u-v is not removed and it's a a valid next edge + cout << u << "-" << v << " "; + rmvEdge(u, v); + printEulerUtil(v); //recursive function for all vertices adjacent to this vertex 'u' + } + } +} + +bool Euler::isValidNextEdge(int u, int v){ //function to check whether u-v edge should be considered as next edge + int count = 0; + vector::iterator i; + for (i = adj[u].begin(); i != adj[u].end(); ++i) //1.to check whether v is the only adjacent vertex of u + if (*i != -1) + count++; + if (count == 1) + return true; + + //2.code for checking whether u-v is a bridge + bool visited[V]; + memset(visited, false, V); + int count1 = DFSCount(u, visited); //count of vertices reachable from u + rmvEdge(u, v); + memset(visited, false, V); + int count2 = DFSCount(u, visited); //count vertices reachable from u after removing u-v edge + addEdge(u, v); + return (count1 > count2)? false: true; //if count1>2 => u-v is a bridge if not then we can proceed with is u-v edge +} + +void Euler::rmvEdge(int u, int v){ + vector::iterator iv = find(adj[u].begin(), adj[u].end(), v); + *iv = -1; + + vector::iterator iu = find(adj[v].begin(), adj[v].end(), u); + *iu = -1; +} + +int Euler::DFSCount(int v, bool visited[]){ //finding count of vertices reachable using DFS algo + visited[v] = true; + int count = 1; + vector::iterator i; + for (i = adj[v].begin(); i != adj[v].end(); ++i) // Recur for all vertices adjacent to this vertex + if (*i != -1 && !visited[*i]) + count += DFSCount(*i, visited); + return count; +} + +int Euler::iseuler(int a[]){ //function for checking whether Euler path/circuit is possible + int count = 0; + for(int i=0;i>n; + Euler g1(n); + Hamiltonian g2(n); + int a[n] = {0}; //array for degrees + bool graph1[10][10]; //adjacency matrix + for(i=0;i>Edges; + for(i=1;i<=Edges;i++) { + cout<<"\n Enter the edge: "; + cin>>v1>>v2; + graph1[v1][v2]=1; //setting adjecency matrix (used in euler) + graph1[v2][v1]=1; //setting adjecency matrix (used in euler) + g1.addEdge(v1, v2); //adding edge for euler path implementation + a[v1]++; //incrementing degree (used for euler) + a[v2]++; //incrementing degree (used for euler) + } + cout<<"\n"; + g2.hamCycle(graph1); //call to find hamiltonian path + cout<<"\n"; + if(g1.iseuler(a) == 1) //checking if euler path can be found or not using degrees' logic + g1.printEulerTour(); + return 0; +} \ No newline at end of file diff --git a/Euler-and-Hamiltonian-Path/DMSprogram.exe b/Euler-and-Hamiltonian-Path/DMSprogram.exe new file mode 100644 index 0000000..ce1493f Binary files /dev/null and b/Euler-and-Hamiltonian-Path/DMSprogram.exe differ diff --git a/Euler-and-Hamiltonian-Path/tempCodeRunnerFile.cpp b/Euler-and-Hamiltonian-Path/tempCodeRunnerFile.cpp new file mode 100644 index 0000000..22c9bf0 --- /dev/null +++ b/Euler-and-Hamiltonian-Path/tempCodeRunnerFile.cpp @@ -0,0 +1,2 @@ + +#include \ No newline at end of file diff --git a/MP/LRU_Replacement_Algorithm.c b/MP/LRU_Replacement_Algorithm.c index a4ff447..17fab16 100644 --- a/MP/LRU_Replacement_Algorithm.c +++ b/MP/LRU_Replacement_Algorithm.c @@ -1,109 +1,84 @@ -#include -int main() -{ - int arr[]={7,0,7,2,0,3,0,4,2,3,0,3,2},i=0; - int s0=-1,s1=-1,s2=-1,s3=-1; +#include +#include +#include +#include +#include +using namespace std; +void showdq(deque g){ + deque :: iterator it; + for (it = g.begin(); it != g.end(); ++it) cout << '\t' << *it; + cout << '\n'; +} +void HitMissCalculate(int capacity,int size,int arr[]){ + deque q(capacity); + int count=0; int miss=0,hit=0; - for(i;i<13;i++){ - printf("%d\t%d\t%d\t%d\n",s0,s1,s2,s3); - if(s3==-1){ - s3=arr[i]; - miss++; - continue; - } - else if(s2==-1){ - if(s3==arr[i]){ - hit++; - continue; - } - s2=s3; - s3=arr[i]; - miss++; - continue; - } - else if(s1==-1){ - if(s3==arr[i]){ - hit++; - continue; - } - if(s2==arr[i]){ - hit++; - int temp=s3; - s3=s2; - s2=temp; - continue; - } - s1=s2; - s2=s3; - s3=arr[i]; + deque::iterator itr; + q.clear(); + for(int i=0;i>capacity; + cout<<"\nEnter no. of pages: "; + cin>>size; + cout<<"\nEnter the pages seperated by spaces:\n"; + int arr[size]; + for(int i=0;i>arr[i]; + HitMissCalculate(capacity,size,arr); + while(1){ + cout<<"\n1. Find hit/miss for the same pages with different framesize.\n2. Apply LRU for all different inputs.\n3. Exit.\nEnter your choice: "; + cin>>choice; + switch(choice){ + case 1: + cout<<"\nEnter Frame size: "; + cin>>capacity; + HitMissCalculate(capacity,size,arr); + break; + case 2: + system("cls"); + cout<<"********Least Reacently Used Implementation********"; + cout<<"\nEnter Frame size: "; + cin>>capacity; + cout<<"\nEnter no. of pages: "; + cin>>size;\ + cout<<"\nEnter the pages seperated by spaces:\n"; + for(int i=0;i>arr[i]; + HitMissCalculate(capacity,size,arr); + break; + case 3: + cout<<"Exiting....."; + return 0; + default: + cout<<"Enter the valid choice."< +#include +#include +#include +#include +using namespace std; +void showdq(deque g){ + + deque :: iterator it; + for (it = g.begin(); it != g.end(); ++it) cout << '\t' << *it; + cout << '\n'; +} +void HitMissCalculate(int capacity,int size,int arr[]){ + deque q(capacity); + int count=0; + int temp=0; + int miss=0,hit=0; + deque::iterator itr; + q.clear(); + + //insert next page into the queue if not present in queue and inc miss + for(int i=0;i>capacity; + cout<<"\nEnter no. of pages: "; + cin>>size; + cout<<"\nEnter the pages seperated by spaces:\n"; + int arr[size]; + for(int i=0;i>arr[i]; + HitMissCalculate(capacity,size,arr); + while(1){ + cout<<"\n1. Find hit/miss for the same pages with different framesize.\n2. Apply LRU for all different inputs.\n3. Exit.\nEnter your choice: "; + cin>>choice; + switch(choice){ + case 1: + cout<<"\nEnter Frame size: "; + cin>>capacity; + HitMissCalculate(capacity,size,arr); + break; + case 2: + system("cls"); + cout<<"********Least Reacently Used Implementation********"; + cout<<"\nEnter Frame size: "; + cin>>capacity; + cout<<"\nEnter no. of pages: "; + cin>>size;\ + cout<<"\nEnter the pages seperated by spaces:\n"; + for(int i=0;i>arr[i]; + HitMissCalculate(capacity,size,arr); + break; + case 3: + cout<<"Exiting....."; + return 0; + default: + cout<<"Enter the valid choice."<