From 21a9cac42fadc53babd23176cea99289d97a8577 Mon Sep 17 00:00:00 2001 From: Fuzail Siddiqui Date: Sun, 10 Oct 2021 23:09:45 +0530 Subject: [PATCH 01/12] Added Project --- Backend/Invento_Manage/README.md | 5 + Backend/Invento_Manage/backend/__init__.py | 0 Backend/Invento_Manage/backend/asgi.py | 16 ++ Backend/Invento_Manage/backend/settings.py | 143 ++++++++++++++++++ Backend/Invento_Manage/backend/urls.py | 24 +++ Backend/Invento_Manage/backend/wsgi.py | 16 ++ Backend/Invento_Manage/files/update.csv | 33 ++++ Backend/Invento_Manage/items/__init__.py | 0 Backend/Invento_Manage/items/admin.py | 6 + Backend/Invento_Manage/items/apps.py | 5 + .../items/migrations/0001_initial.py | 38 +++++ .../migrations/0002_remove_item_category.py | 17 +++ .../migrations/0003_auto_20201202_1715.py | 22 +++ .../migrations/0004_auto_20201204_1714.py | 23 +++ .../migrations/0005_remove_item_created_at.py | 17 +++ .../migrations/0006_auto_20201204_1723.py | 19 +++ .../migrations/0007_auto_20201204_2000.py | 22 +++ .../items/migrations/__init__.py | 0 Backend/Invento_Manage/items/models.py | 26 ++++ Backend/Invento_Manage/items/serializers.py | 16 ++ Backend/Invento_Manage/items/tests.py | 3 + Backend/Invento_Manage/items/urls.py | 7 + Backend/Invento_Manage/items/views.py | 117 ++++++++++++++ Backend/Invento_Manage/manage.py | 21 +++ 24 files changed, 596 insertions(+) create mode 100644 Backend/Invento_Manage/README.md create mode 100644 Backend/Invento_Manage/backend/__init__.py create mode 100644 Backend/Invento_Manage/backend/asgi.py create mode 100644 Backend/Invento_Manage/backend/settings.py create mode 100644 Backend/Invento_Manage/backend/urls.py create mode 100644 Backend/Invento_Manage/backend/wsgi.py create mode 100644 Backend/Invento_Manage/files/update.csv create mode 100644 Backend/Invento_Manage/items/__init__.py create mode 100644 Backend/Invento_Manage/items/admin.py create mode 100644 Backend/Invento_Manage/items/apps.py create mode 100644 Backend/Invento_Manage/items/migrations/0001_initial.py create mode 100644 Backend/Invento_Manage/items/migrations/0002_remove_item_category.py create mode 100644 Backend/Invento_Manage/items/migrations/0003_auto_20201202_1715.py create mode 100644 Backend/Invento_Manage/items/migrations/0004_auto_20201204_1714.py create mode 100644 Backend/Invento_Manage/items/migrations/0005_remove_item_created_at.py create mode 100644 Backend/Invento_Manage/items/migrations/0006_auto_20201204_1723.py create mode 100644 Backend/Invento_Manage/items/migrations/0007_auto_20201204_2000.py create mode 100644 Backend/Invento_Manage/items/migrations/__init__.py create mode 100644 Backend/Invento_Manage/items/models.py create mode 100644 Backend/Invento_Manage/items/serializers.py create mode 100644 Backend/Invento_Manage/items/tests.py create mode 100644 Backend/Invento_Manage/items/urls.py create mode 100644 Backend/Invento_Manage/items/views.py create mode 100644 Backend/Invento_Manage/manage.py diff --git a/Backend/Invento_Manage/README.md b/Backend/Invento_Manage/README.md new file mode 100644 index 0000000..08f1ad7 --- /dev/null +++ b/Backend/Invento_Manage/README.md @@ -0,0 +1,5 @@ +# Backend-inventoManage +This is the Server of a Inventory Management App built whose client side is in React-Native and server side is in Django-RestFramework. +The database used here is sqlite + + diff --git a/Backend/Invento_Manage/backend/__init__.py b/Backend/Invento_Manage/backend/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Backend/Invento_Manage/backend/asgi.py b/Backend/Invento_Manage/backend/asgi.py new file mode 100644 index 0000000..61e912c --- /dev/null +++ b/Backend/Invento_Manage/backend/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for backend 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.0/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings') + +application = get_asgi_application() diff --git a/Backend/Invento_Manage/backend/settings.py b/Backend/Invento_Manage/backend/settings.py new file mode 100644 index 0000000..a3ac27f --- /dev/null +++ b/Backend/Invento_Manage/backend/settings.py @@ -0,0 +1,143 @@ +""" +Django settings for backend project. + +Generated by 'django-admin startproject' using Django 3.0.7. + +For more information on this file, see +https://docs.djangoproject.com/en/3.0/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/3.0/ref/settings/ +""" + +import os + +# 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/3.0/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'amexe&@hg!zn5qp$st5-25e=5lm-v=fen$@v9bb6n66eahm#&i' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + + +ALLOWED_HOSTS = ['pal16sourav.pythonanywhere.com', '127.0.0.1'] + + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'rest_framework', + 'items', + 'corsheaders', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'corsheaders.middleware.CorsMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'backend.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + '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 = 'backend.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/3.0/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + + +# Password validation +# https://docs.djangoproject.com/en/3.0/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/3.0/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/3.0/howto/static-files/ + +STATIC_URL = '/static/' +REST_FRAMEWORK = { + 'DEFAULT_PERMISSION_CLASSES': ( + 'rest_framework.permissions.IsAuthenticated', + ), + 'DEFAULT_AUTHENTICATION_CLASSES': ( + 'rest_framework_jwt.authentication.JSONWebTokenAuthentication', + 'rest_framework.authentication.SessionAuthentication', + 'rest_framework.authentication.BasicAuthentication', + ), +} + + + +CORS_ORIGIN_ALLOW_ALL = False +CORS_ORIGIN_WHITELIST = ( + 'http://localhost:8000', +) diff --git a/Backend/Invento_Manage/backend/urls.py b/Backend/Invento_Manage/backend/urls.py new file mode 100644 index 0000000..761bf9b --- /dev/null +++ b/Backend/Invento_Manage/backend/urls.py @@ -0,0 +1,24 @@ +"""backend URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/3.0/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 items import views + +urlpatterns = [ + path('admin/', admin.site.urls), + path('item/', include('items.urls')), + path('updates/', views.updates, name = 'updates') +] diff --git a/Backend/Invento_Manage/backend/wsgi.py b/Backend/Invento_Manage/backend/wsgi.py new file mode 100644 index 0000000..1b7a976 --- /dev/null +++ b/Backend/Invento_Manage/backend/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for backend 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.0/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings') + +application = get_wsgi_application() diff --git a/Backend/Invento_Manage/files/update.csv b/Backend/Invento_Manage/files/update.csv new file mode 100644 index 0000000..bd9b12c --- /dev/null +++ b/Backend/Invento_Manage/files/update.csv @@ -0,0 +1,33 @@ +product_id,name,updated_at,qty_change,qty_available,old_price,new_price,updated_by + + + + + + + + + + + + + + + + + + + + +4916,Mr.pal,12:57 12/18/20,0,10,200.0,200.0,will change to the user logged in + + + + + + + + + + +17009918,sinha,13:02 12/18/20,0,10,200.0,200.0,will change to the user logged in diff --git a/Backend/Invento_Manage/items/__init__.py b/Backend/Invento_Manage/items/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Backend/Invento_Manage/items/admin.py b/Backend/Invento_Manage/items/admin.py new file mode 100644 index 0000000..f99cff2 --- /dev/null +++ b/Backend/Invento_Manage/items/admin.py @@ -0,0 +1,6 @@ +from django.contrib import admin + +from .models import Item , Inventory_User +# Register your models here. +admin.site.register(Item) +admin.site.register(Inventory_User) diff --git a/Backend/Invento_Manage/items/apps.py b/Backend/Invento_Manage/items/apps.py new file mode 100644 index 0000000..4b1dd39 --- /dev/null +++ b/Backend/Invento_Manage/items/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class ItemsConfig(AppConfig): + name = 'items' diff --git a/Backend/Invento_Manage/items/migrations/0001_initial.py b/Backend/Invento_Manage/items/migrations/0001_initial.py new file mode 100644 index 0000000..0a79395 --- /dev/null +++ b/Backend/Invento_Manage/items/migrations/0001_initial.py @@ -0,0 +1,38 @@ +# Generated by Django 3.0.7 on 2020-12-02 05:18 + +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='Item', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=100, unique=True)), + ('price', models.FloatField()), + ('description', models.CharField(max_length=255)), + ('product_id', models.CharField(max_length=50)), + ('quantity', models.IntegerField()), + ('units', models.CharField(max_length=20)), + ('category', models.CharField(max_length=20)), + ], + ), + migrations.CreateModel( + name='Inventory_User', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('phone_num', models.CharField(max_length=11, unique=True)), + ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + ), + ] diff --git a/Backend/Invento_Manage/items/migrations/0002_remove_item_category.py b/Backend/Invento_Manage/items/migrations/0002_remove_item_category.py new file mode 100644 index 0000000..5a3d772 --- /dev/null +++ b/Backend/Invento_Manage/items/migrations/0002_remove_item_category.py @@ -0,0 +1,17 @@ +# Generated by Django 3.0.7 on 2020-12-02 05:53 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('items', '0001_initial'), + ] + + operations = [ + migrations.RemoveField( + model_name='item', + name='category', + ), + ] diff --git a/Backend/Invento_Manage/items/migrations/0003_auto_20201202_1715.py b/Backend/Invento_Manage/items/migrations/0003_auto_20201202_1715.py new file mode 100644 index 0000000..cf7c8f7 --- /dev/null +++ b/Backend/Invento_Manage/items/migrations/0003_auto_20201202_1715.py @@ -0,0 +1,22 @@ +# Generated by Django 3.1.4 on 2020-12-02 11:45 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('items', '0002_remove_item_category'), + ] + + operations = [ + migrations.RemoveField( + model_name='item', + name='units', + ), + migrations.AddField( + model_name='item', + name='category', + field=models.CharField(default='null', max_length=20), + ), + ] diff --git a/Backend/Invento_Manage/items/migrations/0004_auto_20201204_1714.py b/Backend/Invento_Manage/items/migrations/0004_auto_20201204_1714.py new file mode 100644 index 0000000..a6f432f --- /dev/null +++ b/Backend/Invento_Manage/items/migrations/0004_auto_20201204_1714.py @@ -0,0 +1,23 @@ +# Generated by Django 3.1.3 on 2020-12-04 11:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('items', '0003_auto_20201202_1715'), + ] + + operations = [ + migrations.AddField( + model_name='item', + name='created_at', + field=models.DateTimeField(auto_now=True), + ), + migrations.AddField( + model_name='item', + name='updated_at', + field=models.DateTimeField(auto_now=True), + ), + ] diff --git a/Backend/Invento_Manage/items/migrations/0005_remove_item_created_at.py b/Backend/Invento_Manage/items/migrations/0005_remove_item_created_at.py new file mode 100644 index 0000000..e82f4b6 --- /dev/null +++ b/Backend/Invento_Manage/items/migrations/0005_remove_item_created_at.py @@ -0,0 +1,17 @@ +# Generated by Django 3.1.3 on 2020-12-04 11:50 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('items', '0004_auto_20201204_1714'), + ] + + operations = [ + migrations.RemoveField( + model_name='item', + name='created_at', + ), + ] diff --git a/Backend/Invento_Manage/items/migrations/0006_auto_20201204_1723.py b/Backend/Invento_Manage/items/migrations/0006_auto_20201204_1723.py new file mode 100644 index 0000000..e191ad8 --- /dev/null +++ b/Backend/Invento_Manage/items/migrations/0006_auto_20201204_1723.py @@ -0,0 +1,19 @@ +# Generated by Django 3.1.3 on 2020-12-04 11:53 + +from django.db import migrations, models +import django.utils.timezone + + +class Migration(migrations.Migration): + + dependencies = [ + ('items', '0005_remove_item_created_at'), + ] + + operations = [ + migrations.AlterField( + model_name='item', + name='updated_at', + field=models.DateTimeField(default=django.utils.timezone.now), + ), + ] diff --git a/Backend/Invento_Manage/items/migrations/0007_auto_20201204_2000.py b/Backend/Invento_Manage/items/migrations/0007_auto_20201204_2000.py new file mode 100644 index 0000000..b4c2747 --- /dev/null +++ b/Backend/Invento_Manage/items/migrations/0007_auto_20201204_2000.py @@ -0,0 +1,22 @@ +# Generated by Django 3.1.3 on 2020-12-04 14:30 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('items', '0006_auto_20201204_1723'), + ] + + operations = [ + migrations.RemoveField( + model_name='item', + name='updated_at', + ), + migrations.AlterField( + model_name='item', + name='name', + field=models.CharField(max_length=100), + ), + ] diff --git a/Backend/Invento_Manage/items/migrations/__init__.py b/Backend/Invento_Manage/items/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Backend/Invento_Manage/items/models.py b/Backend/Invento_Manage/items/models.py new file mode 100644 index 0000000..e3b3b67 --- /dev/null +++ b/Backend/Invento_Manage/items/models.py @@ -0,0 +1,26 @@ +from django.db import models +from django.contrib.auth.models import User + +# Create your models here. + +class Item(models.Model): + + name = models.CharField(max_length=100) + price = models.FloatField() + description = models.CharField(max_length=255) + product_id = models.CharField(max_length=50) + quantity = models.IntegerField() + category = models.CharField(max_length=20,default = 'null') + + def __str__(self): + return self.product_id + + +class Inventory_User(models.Model): + phone_num = models.CharField(max_length=11, unique=True) + user = models.OneToOneField(User, on_delete = models.CASCADE) + + def __str__(self): + return self.phone_num + + diff --git a/Backend/Invento_Manage/items/serializers.py b/Backend/Invento_Manage/items/serializers.py new file mode 100644 index 0000000..f5f6863 --- /dev/null +++ b/Backend/Invento_Manage/items/serializers.py @@ -0,0 +1,16 @@ +from rest_framework import serializers +from items.models import Item + + +class ItemSerializer(serializers.ModelSerializer): + + class Meta: + model = Item + fields = ('id', + 'name', + 'description', + 'price', 'quantity', 'category', 'product_id') + + +#We will have to make one for Inventory_User as well. +#Will do later on if need be. \ No newline at end of file diff --git a/Backend/Invento_Manage/items/tests.py b/Backend/Invento_Manage/items/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/Backend/Invento_Manage/items/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/Backend/Invento_Manage/items/urls.py b/Backend/Invento_Manage/items/urls.py new file mode 100644 index 0000000..87da9b6 --- /dev/null +++ b/Backend/Invento_Manage/items/urls.py @@ -0,0 +1,7 @@ +from django.urls import path +from items import views + +urlpatterns = [ + path('', views.all_items, name = 'all_items'), + path('/', views.single_item, name = 'single_item') +] diff --git a/Backend/Invento_Manage/items/views.py b/Backend/Invento_Manage/items/views.py new file mode 100644 index 0000000..678eb39 --- /dev/null +++ b/Backend/Invento_Manage/items/views.py @@ -0,0 +1,117 @@ +from django.shortcuts import render + +from django.http.response import JsonResponse +from rest_framework.parsers import JSONParser +from rest_framework import status + +from items.models import Item +from items.serializers import ItemSerializer +from rest_framework.decorators import api_view + +import csv +import datetime +# Create your views here. + +@api_view(['GET', 'POST', 'DELETE']) +def all_items(request): + if request.method == 'GET': + items = Item.objects.all() + + product_id = request.query_params.get('product_id', None) + if product_id is not None: + items = items.filter(product_id__icontains=product_id) + item_serializer = ItemSerializer(items, many=True) + return JsonResponse(item_serializer.data, safe=False) + + elif request.method == 'POST': + item_data = JSONParser().parse(request) + item_serializer = ItemSerializer(data=item_data) + if item_serializer.is_valid(): + item_serializer.save() + added_item = Item.objects.get(product_id = item_data['product_id']) + add_to_update_sheet(added_item, added_item) + return JsonResponse(item_serializer.data, status=status.HTTP_201_CREATED) + return JsonResponse(item_serializer.errors, status=status.HTTP_400_BAD_REQUEST) + + elif request.method == 'DELETE': + count = Item.objects.all().delete() + return JsonResponse({'message': '{} Tutorials were deleted successfully!'.format(count[0])}, status=status.HTTP_204_NO_CONTENT) + + +@api_view(['GET', 'PUT', 'DELETE']) +def single_item(request, product_id): + + try: + item = Item.objects.get(product_id = product_id) + except Item.DoesNotExist: + return JsonResponse({'message': 'The tutorial does not exist'}, status=status.HTTP_404_NOT_FOUND) + + if request.method == 'GET': + item_serializer = ItemSerializer(item) + return JsonResponse(item_serializer.data) + + elif request.method == 'PUT': + + item_before_update = Item.objects.get(product_id = product_id) + + item_data = JSONParser().parse(request) + item_serializer = ItemSerializer(item, data=item_data) + if item_serializer.is_valid(): + item_serializer.save() + + item_after_update = Item.objects.get(product_id = product_id) + add_to_update_sheet(item_before_update, item_after_update) + + return JsonResponse(item_serializer.data) + return JsonResponse(item_serializer.errors, status=status.HTTP_400_BAD_REQUEST) + + elif request.method == 'DELETE': + item.delete() + return JsonResponse({'message': 'Tutorial was deleted successfully!'}, status=status.HTTP_204_NO_CONTENT) + + +def updates(request): + FinalJson = {"updates": []} + with open('files/update.csv', 'r') as file: + file_reader = csv.reader(file) + count = 1 + for row in file_reader: + if count == 1: + count = count + 1 + continue + count = count + 1 + l = {} + try: + if len(row)!=0: + l["product_id"] = row[0] + l["name"] = row[1] + l["updated_at"] = row[2] + l["qty_change"] = row[3] + l["qty_available"] = row[4] + l["old_price"] = row[5] + l["new_price"] = row[6] + l["updated_id"] = row[7] + FinalJson["updates"].append(l) + except: + print('still error persists!!') + FinalJson["updates"].reverse() + return JsonResponse(FinalJson) + + +def add_to_update_sheet(original_item, new_item): + time = datetime.datetime.now() + product_id = original_item.product_id + name = original_item.name + old_price = original_item.price + new_price = new_item.price + qty_change = new_item.quantity - original_item.quantity + qty_available = new_item.quantity + updated_at = time.strftime("%H")+":"+time.strftime("%M")+" "+time.strftime("%x") + updated_by = 'will change to the user logged in' + updated_list = [product_id,name, updated_at, qty_change, qty_available,old_price, new_price, updated_by] + + with open('files/update.csv', 'a', newline='') as file: + file_writer = csv.writer(file) + file_writer.writerow(updated_list) + + \ No newline at end of file diff --git a/Backend/Invento_Manage/manage.py b/Backend/Invento_Manage/manage.py new file mode 100644 index 0000000..bb00dc6 --- /dev/null +++ b/Backend/Invento_Manage/manage.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.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() From 610266dd4d415384460c1df7796798479fb20b8c Mon Sep 17 00:00:00 2001 From: Joseph D'Agostino Date: Mon, 11 Oct 2021 13:53:03 -0400 Subject: [PATCH 02/12] applied CSS text shadow to navbar text --- Frontend/Portfolio's/Prubhtej's Portfolio/style.css | 1 + 1 file changed, 1 insertion(+) diff --git a/Frontend/Portfolio's/Prubhtej's Portfolio/style.css b/Frontend/Portfolio's/Prubhtej's Portfolio/style.css index 65e6dca..f658545 100644 --- a/Frontend/Portfolio's/Prubhtej's Portfolio/style.css +++ b/Frontend/Portfolio's/Prubhtej's Portfolio/style.css @@ -118,6 +118,7 @@ section .title::after{ font-weight: 500; margin-left: 25px; transition: color 0.3s ease; + text-shadow: 1px 1px 2px rgb(0 0 0 / 50%); } .navbar .menu li a:hover{ color: crimson; From e39800c76958b15f589ce884a9103b55ecfe85b9 Mon Sep 17 00:00:00 2001 From: shivshankar9 Date: Wed, 13 Oct 2021 08:31:17 +0530 Subject: [PATCH 03/12] Update README.md --- README.md | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 96 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 41b44f5..f4910b3 100644 --- a/README.md +++ b/README.md @@ -48,11 +48,104 @@
  • Happy Coding đź’»
  • -

    Contribution Guidelines

    -#### Check [Contribution Guidelines](contributionGuidelines.md) +## Contribution Guidelines 🏗 -In this file, you will get how to set up the whole project and also how to start working on issues and how to get your contributions done. +Are we missing any of your favorite features, which you think you can add to it❓ We invite you to contribute to this project and improve it further + +To start contributing, follow the below guidelines: + +**🌟.** Star🌟 the project to bookmark and appreciate the work. + +**0.** Take a look at the existing [issues](https://github.com/dsc-gtbit/HACKTOBERFEST21-GTBIT-WEBDEV/issues) or create your own issues. Wait for the Issue to be assigned to you after which you can start working on it. + +**1.** Fork [this](https://github.com/dsc-gtbit/HACKTOBERFEST21-GTBIT-WEBDEV) repository. + +**2.** Clone your forked copy of the project. + +``` +git clone --depth 1 https://github.com//HACKTOBERFEST21-GTBIT-WEBDEV.git +``` + +**3.** Navigate to the project directory :file_folder: . + +``` +cd OneEducationalWebsiteForAll +``` + +**4.** Add a reference(remote) to the original repository. + +``` +git remote add upstream https://github.com/dsc-gtbit/HACKTOBERFEST21-GTBIT-WEBDEV.git + +``` + +\*5.\*\* Check the remotes for this repository. + +``` +git remote -v +``` + +**6.** Always take a pull from the upstream repository to your master branch to keep it at par with the main project(updated repository). + +``` +git pull upstream master +``` + +**7.** Create a new branch. + +``` +git checkout -b +``` + +**8.** Perform your desired changes to the code base. + +

    + +**9.** Track your changes:heavy_check_mark: . + +``` +git add . +``` + +**10.** Commit your changes . + +``` +git commit -m "Relevant message" +``` + +**11.** Push the committed changes in your feature branch to your remote repo. + +``` +git push -u origin +``` + +**12.** To create a pull request, click on `compare and pull requests`. Please ensure you compare your feature branch to the desired branch of the repo you are supposed to make a PR to. + +**13.** Add an appropriate title and description to your pull request explaining your changes and efforts done. + +**14.** Click on `Create Pull Request`. + +**15.** Voila :exclamation: You have made a PR to the Akshima-Ghai/OneEducationalWebsiteForAll project :boom: . Sit back patiently and relax while the project maintainers review your PR. Please understand, at times the time taken to review a PR can vary from a few hours to a few days. + +

    + +## Project Admin đź‘©: + + +
    Admin name + +# License + +

    + +

    +
    MIT License + +## Contributors + + +

    Made with ❤️ By Developers

    From a0bc8ef2d899c7ca0d3aca4a939657d618274321 Mon Sep 17 00:00:00 2001 From: kunwar Date: Thu, 14 Oct 2021 17:01:29 +0530 Subject: [PATCH 04/12] css added --- Projects/Calculator/index.html | 18 +++++------- Projects/Calculator/styles.css | 53 +++++++++++++++++++++++++++++++++- 2 files changed, 60 insertions(+), 11 deletions(-) diff --git a/Projects/Calculator/index.html b/Projects/Calculator/index.html index 384543a..805dd8f 100644 --- a/Projects/Calculator/index.html +++ b/Projects/Calculator/index.html @@ -4,21 +4,19 @@ Calculator + +
    -
    - -
    -
    -