├── backend └── ishrak │ ├── api │ ├── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-310.pyc │ │ │ ├── __init__.cpython-312.pyc │ │ │ ├── 0001_initial.cpython-310.pyc │ │ │ └── 0001_initial.cpython-312.pyc │ │ └── 0001_initial.py │ ├── tests.py │ ├── admin.py │ ├── __pycache__ │ │ ├── admin.cpython-310.pyc │ │ ├── admin.cpython-312.pyc │ │ ├── apps.cpython-310.pyc │ │ ├── apps.cpython-312.pyc │ │ ├── urls.cpython-310.pyc │ │ ├── urls.cpython-312.pyc │ │ ├── views.cpython-310.pyc │ │ ├── views.cpython-312.pyc │ │ ├── models.cpython-310.pyc │ │ ├── models.cpython-312.pyc │ │ ├── __init__.cpython-310.pyc │ │ ├── __init__.cpython-312.pyc │ │ ├── serializers.cpython-310.pyc │ │ └── serializers.cpython-312.pyc │ ├── apps.py │ ├── serializers.py │ ├── urls.py │ ├── models.py │ └── views.py │ ├── ishrak │ ├── __init__.py │ ├── __pycache__ │ │ ├── urls.cpython-310.pyc │ │ ├── urls.cpython-312.pyc │ │ ├── wsgi.cpython-310.pyc │ │ ├── wsgi.cpython-312.pyc │ │ ├── __init__.cpython-310.pyc │ │ ├── __init__.cpython-312.pyc │ │ ├── settings.cpython-310.pyc │ │ └── settings.cpython-312.pyc │ ├── asgi.py │ ├── wsgi.py │ ├── urls.py │ └── settings.py │ ├── db.sqlite3 │ ├── media │ └── photos │ │ └── products │ │ ├── 12.jpg │ │ ├── XL.jpg │ │ ├── 12max.jpg │ │ ├── 12pro.jpg │ │ ├── book1.jpg │ │ ├── movie1.jpg │ │ ├── movie3.jpg │ │ ├── macbook.jpg │ │ ├── movie2.jpeg │ │ ├── 15pro_max.jpg │ │ ├── download_1.jpeg │ │ ├── megazine1.jpg │ │ ├── megazine_2.jpg │ │ ├── Apple-iPhone-13-Pro-Max.jpg │ │ ├── best-fall-movies-1659459329.jpg │ │ ├── Apple-iPhone-13-Pro-Max_GcfPBUo.jpg │ │ ├── Apple-iPhone-13-Pro-Max_WPYRUrA.jpg │ │ ├── Apple-iPhone-13-Pro-Max_kPuJUxx.jpg │ │ ├── best-fall-movies-1659459329_vwhTZnI.jpg │ │ └── fd4574b5-6636-47d4-b0d0-d7cb57b0a559.jpeg │ └── manage.py ├── .idea ├── .gitignore ├── inspectionProfiles │ ├── profiles_settings.xml │ └── Project_Default.xml ├── modules.xml ├── misc.xml └── Ishark.iml └── frontend ├── item.html └── home.html /backend/ishrak/api/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/ishrak/ishrak/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/ishrak/api/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /backend/ishrak/api/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /backend/ishrak/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/db.sqlite3 -------------------------------------------------------------------------------- /backend/ishrak/api/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import ItemsModel 4 | admin.site.register(ItemsModel) 5 | -------------------------------------------------------------------------------- /backend/ishrak/media/photos/products/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/media/photos/products/12.jpg -------------------------------------------------------------------------------- /backend/ishrak/media/photos/products/XL.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/media/photos/products/XL.jpg -------------------------------------------------------------------------------- /backend/ishrak/media/photos/products/12max.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/media/photos/products/12max.jpg -------------------------------------------------------------------------------- /backend/ishrak/media/photos/products/12pro.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/media/photos/products/12pro.jpg -------------------------------------------------------------------------------- /backend/ishrak/media/photos/products/book1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/media/photos/products/book1.jpg -------------------------------------------------------------------------------- /backend/ishrak/media/photos/products/movie1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/media/photos/products/movie1.jpg -------------------------------------------------------------------------------- /backend/ishrak/media/photos/products/movie3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/media/photos/products/movie3.jpg -------------------------------------------------------------------------------- /backend/ishrak/media/photos/products/macbook.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/media/photos/products/macbook.jpg -------------------------------------------------------------------------------- /backend/ishrak/media/photos/products/movie2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/media/photos/products/movie2.jpeg -------------------------------------------------------------------------------- /backend/ishrak/api/__pycache__/admin.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/api/__pycache__/admin.cpython-310.pyc -------------------------------------------------------------------------------- /backend/ishrak/api/__pycache__/admin.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/api/__pycache__/admin.cpython-312.pyc -------------------------------------------------------------------------------- /backend/ishrak/api/__pycache__/apps.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/api/__pycache__/apps.cpython-310.pyc -------------------------------------------------------------------------------- /backend/ishrak/api/__pycache__/apps.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/api/__pycache__/apps.cpython-312.pyc -------------------------------------------------------------------------------- /backend/ishrak/api/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/api/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /backend/ishrak/api/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/api/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /backend/ishrak/api/__pycache__/views.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/api/__pycache__/views.cpython-310.pyc -------------------------------------------------------------------------------- /backend/ishrak/api/__pycache__/views.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/api/__pycache__/views.cpython-312.pyc -------------------------------------------------------------------------------- /backend/ishrak/media/photos/products/15pro_max.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/media/photos/products/15pro_max.jpg -------------------------------------------------------------------------------- /backend/ishrak/media/photos/products/download_1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/media/photos/products/download_1.jpeg -------------------------------------------------------------------------------- /backend/ishrak/media/photos/products/megazine1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/media/photos/products/megazine1.jpg -------------------------------------------------------------------------------- /backend/ishrak/media/photos/products/megazine_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/media/photos/products/megazine_2.jpg -------------------------------------------------------------------------------- /backend/ishrak/api/__pycache__/models.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/api/__pycache__/models.cpython-310.pyc -------------------------------------------------------------------------------- /backend/ishrak/api/__pycache__/models.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/api/__pycache__/models.cpython-312.pyc -------------------------------------------------------------------------------- /backend/ishrak/ishrak/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/ishrak/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /backend/ishrak/ishrak/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/ishrak/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /backend/ishrak/ishrak/__pycache__/wsgi.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/ishrak/__pycache__/wsgi.cpython-310.pyc -------------------------------------------------------------------------------- /backend/ishrak/ishrak/__pycache__/wsgi.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/ishrak/__pycache__/wsgi.cpython-312.pyc -------------------------------------------------------------------------------- /backend/ishrak/api/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/api/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /backend/ishrak/api/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/api/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /backend/ishrak/api/__pycache__/serializers.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/api/__pycache__/serializers.cpython-310.pyc -------------------------------------------------------------------------------- /backend/ishrak/api/__pycache__/serializers.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/api/__pycache__/serializers.cpython-312.pyc -------------------------------------------------------------------------------- /backend/ishrak/api/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ApiConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'api' 7 | -------------------------------------------------------------------------------- /backend/ishrak/ishrak/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/ishrak/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /backend/ishrak/ishrak/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/ishrak/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /backend/ishrak/ishrak/__pycache__/settings.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/ishrak/__pycache__/settings.cpython-310.pyc -------------------------------------------------------------------------------- /backend/ishrak/ishrak/__pycache__/settings.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/ishrak/__pycache__/settings.cpython-312.pyc -------------------------------------------------------------------------------- /backend/ishrak/media/photos/products/Apple-iPhone-13-Pro-Max.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/media/photos/products/Apple-iPhone-13-Pro-Max.jpg -------------------------------------------------------------------------------- /backend/ishrak/api/migrations/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/api/migrations/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /backend/ishrak/api/migrations/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/api/migrations/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /backend/ishrak/media/photos/products/best-fall-movies-1659459329.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/media/photos/products/best-fall-movies-1659459329.jpg -------------------------------------------------------------------------------- /backend/ishrak/api/migrations/__pycache__/0001_initial.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/api/migrations/__pycache__/0001_initial.cpython-310.pyc -------------------------------------------------------------------------------- /backend/ishrak/api/migrations/__pycache__/0001_initial.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/api/migrations/__pycache__/0001_initial.cpython-312.pyc -------------------------------------------------------------------------------- /backend/ishrak/media/photos/products/Apple-iPhone-13-Pro-Max_GcfPBUo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/media/photos/products/Apple-iPhone-13-Pro-Max_GcfPBUo.jpg -------------------------------------------------------------------------------- /backend/ishrak/media/photos/products/Apple-iPhone-13-Pro-Max_WPYRUrA.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/media/photos/products/Apple-iPhone-13-Pro-Max_WPYRUrA.jpg -------------------------------------------------------------------------------- /backend/ishrak/media/photos/products/Apple-iPhone-13-Pro-Max_kPuJUxx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/media/photos/products/Apple-iPhone-13-Pro-Max_kPuJUxx.jpg -------------------------------------------------------------------------------- /backend/ishrak/media/photos/products/best-fall-movies-1659459329_vwhTZnI.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/media/photos/products/best-fall-movies-1659459329_vwhTZnI.jpg -------------------------------------------------------------------------------- /backend/ishrak/media/photos/products/fd4574b5-6636-47d4-b0d0-d7cb57b0a559.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hazrat-Ali9/Django-Rest-Framework/HEAD/backend/ishrak/media/photos/products/fd4574b5-6636-47d4-b0d0-d7cb57b0a559.jpeg -------------------------------------------------------------------------------- /.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /backend/ishrak/api/serializers.py: -------------------------------------------------------------------------------- 1 | from rest_framework import serializers 2 | from .models import ItemsModel 3 | from django.contrib.auth.models import User 4 | class ItemsSerializer(serializers.ModelSerializer): 5 | class Meta: 6 | model = ItemsModel 7 | fields = '__all__' 8 | 9 | 10 | class UserSerializer(serializers.ModelSerializer): 11 | class Meta: 12 | model = User 13 | fields = ['username', 'password'] -------------------------------------------------------------------------------- /backend/ishrak/ishrak/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for ishrak project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ishrak.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /backend/ishrak/ishrak/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for ishrak project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ishrak.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /.idea/Ishark.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /backend/ishrak/api/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path, include 2 | from rest_framework.routers import DefaultRouter 3 | 4 | from . import views 5 | 6 | 7 | router = DefaultRouter() 8 | router.register(r'items', views.DataList, basename='item') 9 | 10 | urlpatterns = [ 11 | path('items/',views.DataList.as_view()), 12 | path('items//', views.DataUpdateDelete.as_view()), 13 | path('items/search/', views.ProductSearchAPIView.as_view(), name='product-search'), 14 | path('admin/', views.AdminDashboard.as_view(), name='admin_dashboard'), 15 | ] -------------------------------------------------------------------------------- /backend/ishrak/api/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.contrib.auth.models import User 3 | 4 | class ItemsModel(models.Model): 5 | CATEGORY = ( 6 | ('Books', 'Books'), 7 | ('Magazine', 'Magazine'), 8 | ('Movie', 'Movie'), 9 | ) 10 | id = models.IntegerField(primary_key=True) 11 | name = models.CharField(max_length=30) 12 | author = models.CharField(max_length=3000) 13 | category = models.CharField(max_length=30, choices=CATEGORY) 14 | releaseDate = models.CharField(max_length=100) 15 | image = models.ImageField(upload_to='photos/products', blank=True) 16 | 17 | 18 | user = models.OneToOneField(User, on_delete=models.CASCADE) 19 | -------------------------------------------------------------------------------- /backend/ishrak/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ishrak.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /backend/ishrak/api/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.1 on 2024-01-30 07:44 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [ 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='ItemsModel', 16 | fields=[ 17 | ('id', models.IntegerField(primary_key=True, serialize=False)), 18 | ('name', models.CharField(max_length=30)), 19 | ('author', models.CharField(max_length=3000)), 20 | ('category', models.CharField(choices=[('Books', 'Books'), ('Magazine', 'Magazine'), ('Movie', 'Movie')], max_length=30)), 21 | ('releaseDate', models.CharField(max_length=100)), 22 | ('image', models.ImageField(blank=True, upload_to='photos/products')), 23 | ], 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /backend/ishrak/ishrak/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | URL configuration for ishrak project. 3 | 4 | The `urlpatterns` list routes URLs to views. For more information please see: 5 | https://docs.djangoproject.com/en/5.0/topics/http/urls/ 6 | Examples: 7 | Function views 8 | 1. Add an import: from my_app import views 9 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 10 | Class-based views 11 | 1. Add an import: from other_app.views import Home 12 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 13 | Including another URLconf 14 | 1. Import the include() function: from django.urls import include, path 15 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 16 | """ 17 | from django.contrib import admin 18 | from django.urls import path,include 19 | from django.conf import settings 20 | from django.conf.urls.static import static 21 | 22 | urlpatterns = [ 23 | path('admin/', admin.site.urls), 24 | path('api/',include('api.urls')) 25 | ]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 26 | -------------------------------------------------------------------------------- /backend/ishrak/api/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | from rest_framework.views import APIView 3 | from .models import ItemsModel 4 | from .serializers import ItemsSerializer 5 | from rest_framework.response import Response 6 | from rest_framework.permissions import IsAuthenticated, IsAdminUser 7 | from rest_framework import status 8 | from rest_framework import filters 9 | from rest_framework import generics 10 | from django.http import Http404 11 | from rest_framework.decorators import api_view 12 | from django.contrib.auth.models import User 13 | class DataList(APIView): 14 | 15 | def get(self, request, format=None): 16 | models = ItemsModel.objects.all() 17 | serializer = ItemsSerializer(models, many=True) 18 | return Response(serializer.data) 19 | 20 | def post(self, request, format=None): 21 | serializer = ItemsSerializer(data=request.data) 22 | if serializer.is_valid(): 23 | serializer.save() 24 | return Response(serializer.data, status=status.HTTP_201_CREATED) 25 | return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) 26 | class DataUpdateDelete(APIView): 27 | 28 | def get_object(self, pk): 29 | try: 30 | return ItemsModel.objects.get(pk=pk) 31 | except ItemsModel.DoesNotExist: 32 | raise Http404 33 | 34 | def get(self, request, pk, format=None): 35 | snippet = self.get_object(pk) 36 | serializer = ItemsSerializer(snippet) 37 | return Response(serializer.data) 38 | 39 | def put(self, request, pk, format=None): 40 | snippet = self.get_object(pk) 41 | serializer = ItemsSerializer(snippet, data=request.data) 42 | if serializer.is_valid(): 43 | serializer.save() 44 | return Response(serializer.data) 45 | return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) 46 | 47 | def delete(self, request, pk, format=None): 48 | snippet = self.get_object(pk) 49 | snippet.delete() 50 | return Response(status=status.HTTP_204_NO_CONTENT) 51 | 52 | 53 | class ProductSearchAPIView(generics.ListAPIView): 54 | queryset = ItemsModel.objects.all() 55 | serializer_class = ItemsSerializer 56 | filter_backends = [filters.SearchFilter] 57 | search_fields = ['name'] 58 | 59 | 60 | class AdminDashboard(APIView): 61 | permission_classes = [IsAuthenticated, IsAdminUser] 62 | 63 | def get(self, request): 64 | content = {"message": "Welcome to the Admin Dashboard!"} 65 | return Response(content) 66 | -------------------------------------------------------------------------------- /backend/ishrak/ishrak/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for ishrak project. 3 | 4 | Generated by 'django-admin startproject' using Django 5.0.1. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/5.0/ref/settings/ 11 | """ 12 | 13 | from pathlib import Path 14 | 15 | # Build paths inside the project like this: BASE_DIR / 'subdir'. 16 | BASE_DIR = Path(__file__).resolve().parent.parent 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = 'django-insecure-^$0te!x$458xfmy75-&8&7phmft8+1f8i@gh@vt=mj-4c&xama' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = [] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = [ 34 | 'django.contrib.admin', 35 | 'django.contrib.auth', 36 | 'django.contrib.contenttypes', 37 | 'django.contrib.sessions', 38 | 'django.contrib.messages', 39 | 'django.contrib.staticfiles', 40 | 'rest_framework', 41 | 'api', 42 | 'corsheaders', 43 | ] 44 | 45 | MIDDLEWARE = [ 46 | 'django.middleware.security.SecurityMiddleware', 47 | 'django.contrib.sessions.middleware.SessionMiddleware', 48 | 'django.middleware.common.CommonMiddleware', 49 | 'django.middleware.csrf.CsrfViewMiddleware', 50 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 51 | 'django.contrib.messages.middleware.MessageMiddleware', 52 | 'corsheaders.middleware.CorsMiddleware', 53 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 54 | ] 55 | CORS_ORIGIN_ALLOW_ALL = True 56 | 57 | ROOT_URLCONF = 'ishrak.urls' 58 | 59 | TEMPLATES = [ 60 | { 61 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 62 | 'DIRS': [], 63 | 'APP_DIRS': True, 64 | 'OPTIONS': { 65 | 'context_processors': [ 66 | 'django.template.context_processors.debug', 67 | 'django.template.context_processors.request', 68 | 'django.contrib.auth.context_processors.auth', 69 | 'django.contrib.messages.context_processors.messages', 70 | ], 71 | }, 72 | }, 73 | ] 74 | 75 | WSGI_APPLICATION = 'ishrak.wsgi.application' 76 | 77 | 78 | # Database 79 | # https://docs.djangoproject.com/en/5.0/ref/settings/#databases 80 | 81 | DATABASES = { 82 | 'default': { 83 | 'ENGINE': 'django.db.backends.sqlite3', 84 | 'NAME': BASE_DIR / 'db.sqlite3', 85 | } 86 | } 87 | 88 | import os 89 | MEDIA_URL = '/media/' 90 | MEDIA_ROOT = os.path.join(BASE_DIR, 'media') 91 | 92 | 93 | # Password validation 94 | # https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators 95 | 96 | AUTH_PASSWORD_VALIDATORS = [ 97 | { 98 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 99 | }, 100 | { 101 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 102 | }, 103 | { 104 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 105 | }, 106 | { 107 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 108 | }, 109 | ] 110 | 111 | 112 | # Internationalization 113 | # https://docs.djangoproject.com/en/5.0/topics/i18n/ 114 | 115 | LANGUAGE_CODE = 'en-us' 116 | 117 | TIME_ZONE = 'UTC' 118 | 119 | USE_I18N = True 120 | 121 | USE_TZ = True 122 | 123 | 124 | # Static files (CSS, JavaScript, Images) 125 | # https://docs.djangoproject.com/en/5.0/howto/static-files/ 126 | 127 | STATIC_URL = 'static/' 128 | 129 | # Default primary key field type 130 | # https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field 131 | 132 | DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' 133 | -------------------------------------------------------------------------------- /frontend/item.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Ishrak 7 | 8 | 9 | 10 | 11 | 41 |

Add From

42 |
43 |
44 |
45 | 48 | 49 |
50 |
51 | 54 | 55 |
56 |
57 | 60 | 61 |
62 | 70 |
71 | 74 | 75 |
76 |
77 | 80 | 81 |
82 | 83 |
84 | 85 |
86 |
87 |
88 | 89 | 92 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 |
NameAuthorCategoryRelease DateActionAction
108 | 109 |
110 |

Product Search

111 |
112 |
113 | 120 |
121 | 122 |
123 | 124 |
125 | 126 |
127 |
128 | 129 | 130 | 188 | 189 | 349 | 350 | 351 | 352 | 391 | 392 | -------------------------------------------------------------------------------- /frontend/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Ishrak 7 | 8 | 9 | 13 | 14 | 15 | 45 |
49 | 50 |
54 | 63 | 70 | 77 |
78 | 79 | 80 |
83 | 84 |
90 | ... 95 | 101 |
102 | 103 | 120 | 121 | 138 |
139 | 140 | 141 | 168 | 169 | 196 |
197 | 198 |
199 | 200 |
201 |
202 |

Well Come To
Ishrak Mahamud Blog

203 |

Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda excepturi exercitationem quasi. In deleniti eaque aut repudiandae et a id nisi.

204 | 208 | Learn More 209 | 210 |
211 |
212 |
213 | 214 | 215 |
216 |
217 |
218 |

All Item

219 |

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Purus faucibus massa dignissim tempus.

220 |
221 |
222 | All 223 | Movie 224 | Books 225 | Magazine 226 |
227 |
228 | 229 |
230 |
231 |
232 | 233 | 293 | 294 | 295 | 296 | 420 | 421 | 477 | 478 | 479 | --------------------------------------------------------------------------------