Skip to content

Instantly share code, notes, and snippets.

View Shankjbs571's full-sized avatar
🎯
Focusing

Shashank Kumar Shankjbs571

🎯
Focusing
View GitHub Profile
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
@page {
#Contributed By Shashank Kumar
def blockdivision0excel(request):
print("ByShashank")
# This is the base code to set the top parameters
gmcc = request.GET.get('gmcc')
date = request.GET.get('date')
wo = request.GET.get('won')
insp = request.GET.get('insp')
response = HttpResponse(content_type='application/vnd.ms-excel')
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>DLW Login</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
def generate_excel_HPPE14152(request):
print("ByShashank")
# This is the base code to set the top parameters
asn = request.GET.get('asn')
date = request.GET.get('date')
response = HttpResponse(content_type='application/vnd.ms-excel')
response['Content-Disposition'] = 'attachment; filename="my_excel_file.xls"'
#Setting up the Styles
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 0;
padding: 0;
}
.header {
{% extends 'base.html' %} {% block content %} {% load static %}
<style>
.modal-lg {
max-width: 48%;
}
.modal.left .modal-dialog,
.modal.right .modal-dialog {
position: fixed;
margin: auto;
from dlw.views import *
import dlw.views.globals as g
import base64
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad,unpad
from django.contrib.auth.hashers import make_password, check_password
import datetime
''' ---------Start Login New Code -------'''
def encrypt(raw):
raw = pad(raw.encode(),16)
from django.http import JsonResponse
import json
@csrf_exempt
def generate_pdf_Inspection_report(request):
jsonData = request.POST.get('jsonData')
# Parse the JSON string into a Python object
data = json.loads(jsonData)
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 0;
padding: 0;
}
.header {
@Shankjbs571
Shankjbs571 / productController.js
Last active July 19, 2024 05:18
updated model for product with no required fields except category
// Create product
export const createProduct = async (req, res) => {
const {
title,
description,
price,
discountedPrice,
discountPercent,
quantity,
brand,