Dump existing data:
python3 manage.py dumpdata > datadump.json
Change settings.py to Postgres backend.
Make sure you can connect on PostgreSQL. Then:
//HtML | |
<form> | |
{% csrf_token %} | |
<input type="file" name="pic" accept="image/*" id="image"> | |
<input type="submit" id="send"> | |
</form> | |
//JS |
<!-- Maker Link by @levelsio --> | |
<!-- MIT License --> | |
<style> | |
body { | |
background:#333; | |
} | |
.levelsio-by { | |
font-family:"Helvetica Neue",sans-serif; | |
right:0; |
import React, { Component } from 'react'; | |
import 'whatwg-fetch'; | |
import { | |
getFromStorage, | |
setInStorage, | |
} from '../../utils/storage'; | |
class Home extends Component { | |
constructor(props) { |
[ | |
{ | |
"lng" : "4.1428327560425", | |
"lat" : "52.01150069904", | |
"country" : "Netherlands", | |
"name" : "'s-Gravenzande" | |
}, | |
{ | |
"lng" : "3.3628463745118", | |
"lat" : "51.370923071145", |
import simplejson as json | |
import requests | |
#your spreadsheet key here. I'm using an example from the Victorian election campaign | |
key = "1THJ6MgfEk-1egiPFeDuvs4qEi02xTpz4fq9RtO7GijQ" | |
#google api request urls - I'm doing the first one just to get nice key values (there's probably a better way to do this) | |
url1 = "https://spreadsheets.google.com/feeds/cells/" + key + "/od6/public/values?alt=json" |