Skip to content

Instantly share code, notes, and snippets.

View krishnaglodha's full-sized avatar
🖥️
Making sense outta location

Krishna Lodha krishnaglodha

🖥️
Making sense outta location
View GitHub Profile
@krishnaglodha
krishnaglodha / models.py
Created August 27, 2021 13:32
saving jsPDF
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class receipt(models.Model):
title = models.CharField(max_length=50)
date_created = models.DateField(auto_now=True)
customer = models.OneToOneField(User, on_delete=models.CASCADE)
pdf = models.FileField(upload_to='receipts/') #pdf will be stored in receipts folder in media folder
<!DOCTYPE html>
<html>
<head>
<title>Secured layer access - Krishna Lodha</title>
<link rel="stylesheet" href="https://openlayers.org/en/v4.6.5/css/ol.css" type="text/css">
<!-- The line below is only needed for old environments like Internet Explorer and Android 4.x -->
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>
<script src="https://openlayers.org/en/v4.6.5/build/ol.js"></script>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<title>Secured layer access - Krishna Lodha</title>
<link rel="stylesheet" href="https://openlayers.org/en/v4.6.5/css/ol.css" type="text/css">
<!-- The line below is only needed for old environments like Internet Explorer and Android 4.x -->
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>
<script src="https://openlayers.org/en/v4.6.5/build/ol.js"></script>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<title>Secured layer access - Krishna Lodha</title>
<link rel="stylesheet" href="https://openlayers.org/en/v4.6.5/css/ol.css" type="text/css">
<!-- The line below is only needed for old environments like Internet Explorer and Android 4.x -->
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>
<script src="https://openlayers.org/en/v4.6.5/build/ol.js"></script>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<title>Secured layer access - Krishna Lodha</title>
<link rel="stylesheet" href="https://openlayers.org/en/v4.6.5/css/ol.css" type="text/css">
<!-- The line below is only needed for old environments like Internet Explorer and Android 4.x -->
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>
<script src="https://openlayers.org/en/v4.6.5/build/ol.js"></script>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<title>Secured layer access - Krishna Lodha</title>
<link rel="stylesheet" href="https://openlayers.org/en/v4.6.5/css/ol.css" type="text/css">
<!-- The line below is only needed for old environments like Internet Explorer and Android 4.x -->
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>
<script src="https://openlayers.org/en/v4.6.5/build/ol.js"></script>
</head>
<body>
@krishnaglodha
krishnaglodha / mapproxy.yaml
Created September 12, 2021 03:52
Default mapproxy.yaml file when we install mapproxy py package
# -------------------------------
# MapProxy example configuration.
# -------------------------------
#
# This is a minimal MapProxy configuration.
# See full_example.yaml and the documentation for more options.
#
# Starts the following services:
# Demo:
@krishnaglodha
krishnaglodha / seed.yaml
Created September 12, 2021 07:15
default seeding file
# ---------------------------------------
# MapProxy example seeding configuration.
# ---------------------------------------
#
# This is a minimal MapProxy seeding configuration.
# See full_seed_example.yaml and the documentation for more options.
#
seeds:
myseed1:
@krishnaglodha
krishnaglodha / wms_store.yaml
Created September 12, 2021 08:40
Basic store with URL and Layers
sources:
geoserver_wms:
type: wms
req:
#Provide geoserver wms endpoint without workspace as URL
url: http://localhost:8080/geoserver/wms?
#Provide layername without workspace as layers
layers: ne_10m_populated_places
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>GeoServer</display-name>
<context-param>
<param-name>serviceStrategy</param-name>
<!-- Meaning of the different values :
PARTIAL-BUFFER2