This repository was archived by the owner on Apr 2, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME_old.txt
48 lines (39 loc) · 1.74 KB
/
README_old.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
wtf all over the place
well salut !
post receive hook on prod server
very cool form : http://codepen.io/rexkirby/pen/Fdnlz
# TODO : function spectacle.views : def get closerspectacles(request): return list_spectacles
# TODO : pour chaque fonction qui veut sa box : close_spectacles = closerspectacles(request)
#TODO :
# from django.contrib.gis.measure import D
# hacienda = Lieu.objects.get(name="L'Hacienda")
# Lieu.objects.filter(in_geom__distance_lt=(hacienda.in_geom, D(m=2000))).distance(hacienda.in_geom).order_by('distance')
# Representation.objects.filter(lieu__in_geom__distance_lte=(hacienda.in_geom, D(m=2000)))
# sierre = RegionChild2.objects.get(name='Sierre')
# Lieu.objects.filter(in_geom__within=sierre.boundaries)
# RegionChild2.objects.get(boundaries__contains=hacienda.in_geom)
install postgis + geodajango
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt trusty-pgdg main" >> /etc/apt/sources.list'
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get install python==3.4
sudo apt-get install pip3
sudo apt-get install postgresql==9.3 postgresql-contrib -y
sudo apt-get install postgresql-0.3-postgis-2.1 -y
sudo -u postgres psql
DROP DATABASE valaisfestival;
CREATE DATABASE valaisfestival;
GRANT ALL PRIVILEGES ON DATABASE valaisfestival TO valaisfestival;
\c valaisfestival;
CREATE EXTENSION postgis;
CREATE EXTENSION postgis_topology;
CREATE EXTENSION fuzzystrmatch;
CREATE EXTENSION postgis_tiger_geocoder;
\q
python3 manage.py syncdb
# and now we create postgis template for the database
sudo pip3 install -r < requirements.txt
python3 manage.py shell
# from associations.moderator import *
# ImportDFI().importall()
# from spectacles.moderator import *
# ImportDFI().importall()