Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OKU-GIS
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhamad
OKU-GIS
Commits
4086f552
Commit
4086f552
authored
Jan 26, 2022
by
Manggar Mahardhika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push pbb
parent
d81d1276
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1031 additions
and
22 deletions
+1031
-22
API/__pycache__/urls.cpython-36.pyc
API/__pycache__/urls.cpython-36.pyc
+0
-0
API/__pycache__/views.cpython-36.pyc
API/__pycache__/views.cpython-36.pyc
+0
-0
API/urls.py
API/urls.py
+2
-0
API/views.py
API/views.py
+107
-2
OKU/settings.py
OKU/settings.py
+7
-0
require.txt
require.txt
+0
-1
static/js/scripts_js_o.js
static/js/scripts_js_o.js
+900
-16
templates/includes/modal.html
templates/includes/modal.html
+12
-1
templates/layout/layout.html
templates/layout/layout.html
+3
-2
No files found.
API/__pycache__/urls.cpython-36.pyc
View file @
4086f552
No preview for this file type
API/__pycache__/views.cpython-36.pyc
View file @
4086f552
No preview for this file type
API/urls.py
View file @
4086f552
...
...
@@ -25,6 +25,8 @@ urlpatterns = [
path
(
'desangab'
,
views
.
desangab
,
name
=
'desangab'
),
path
(
'building'
,
views
.
building
,
name
=
'building'
),
path
(
'edit_kec'
,
views
.
editkec
,
name
=
'edit_kec'
),
path
(
'jalan'
,
views
.
jalan
,
name
=
'jalan'
),
path
(
'sungai'
,
views
.
sungai
,
name
=
'sungai'
),
path
(
'edit'
,
views
.
editpoly
,
name
=
'edit'
),
...
...
API/views.py
View file @
4086f552
...
...
@@ -540,9 +540,90 @@ def kecamatan(request):
(
A.ID,
A.kecamatan,
st_area ( A.geom :: geography ),
SUM ( b.jumlah_pen ),
SUM ( b.jumlah_kk ),
st_area ( A.geom :: geography )
SUM ( b.jumlah_kk )
),
'penduduk',
(
SUM ( b.pria),
SUM ( b.wanita),
SUM ( b.belum_kawin),
SUM ( b.kawin),
SUM ( b.cerai_hidup),
SUM ( b.cerai_mati),
SUM ( b.wajib_ktp),
SUM ( b.islam),
SUM ( b.kristen),
SUM ( b.khatolik),
SUM ( b.hindu),
SUM ( b.budha),
SUM ( b.konghucu),
SUM ( b.kepercayaan_lain),
SUM ( b.u0),
SUM ( b.u5),
SUM ( b.u10),
SUM ( b.u15),
SUM ( b.u20),
SUM ( b.u25),
SUM ( b.u30),
SUM ( b.u35),
SUM ( b.u40),
SUM ( b.u45),
SUM ( b.u50),
SUM ( b.u55),
SUM ( b.u60),
SUM ( b.u65),
SUM ( b.u70),
SUM ( b.u75)
),
'pekerjaan_pendidikan',
(
SUM ( b.tidak_sekolah),
SUM ( b.belum_tamat),
SUM ( b.tamat_sd),
SUM ( b.sltp),
SUM ( b.slta),
SUM ( b.diploma_i),
SUM ( b.diploma_ii),
SUM ( b.diploma_iv),
SUM ( b.strata_ii),
SUM ( b.strata_iii),
SUM ( b.tidak_bekerja),
SUM ( b.aparatur_pemerintah),
SUM ( b.tenaga_pendidik),
SUM ( b.wiraswasta),
SUM ( b.pertanian),
SUM ( b.tenaga_kesehatan),
SUM ( b.pensiunan),
SUM ( b.pegawai),
SUM ( b.tentara),
SUM ( b.kepolisian),
SUM ( b.pedagang),
SUM ( b.petani),
SUM ( b.peternak),
SUM ( b.nelayan),
SUM ( b.karyawan),
SUM ( b.buruh),
SUM ( b.pembantu),
SUM ( b.tukang),
SUM ( b.pendeta),
SUM ( b.pastor),
SUM ( b.ustadz),
SUM ( b.dosen),
SUM ( b.guru),
SUM ( b.pilot),
SUM ( b.pengacara),
SUM ( b.notaris),
SUM ( b.arsitek),
SUM ( b.akuntan),
SUM ( b.konsultan),
SUM ( b.dokter),
SUM ( b.bidan),
SUM ( b.perawat),
SUM ( b.psikiater),
SUM ( b.sopir),
SUM ( b.lainnya)
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
...
...
@@ -564,6 +645,30 @@ def kecamatan(request):
data
=
{
'kecamatan'
:
kec_res
}
return
Response
(
data
)
@
api_view
((
'GET'
,))
@
renderer_classes
((
TemplateHTMLRenderer
,
JSONRenderer
))
def
editkec
(
request
):
idkec
=
request
.
GET
.
get
(
"id_kec"
)
with
conn
.
cursor
()
as
kec
:
kec
.
execute
(
f
"""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.ID,
A.kecamatan
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_data_kecamatan A
where a.id = {idkec}"""
)
kec_res_
=
kec
.
fetchall
()
# data = {'gen':kec_res_}
return
Response
(
kec_res_
[
0
][
0
])
@
api_view
((
'GET'
,))
@
renderer_classes
((
TemplateHTMLRenderer
,
JSONRenderer
))
def
desangab
(
request
):
...
...
OKU/settings.py
View file @
4086f552
...
...
@@ -55,6 +55,12 @@ MIDDLEWARE = [
'django.middleware.clickjacking.XFrameOptionsMiddleware'
,
]
REST_FRAMEWORK
=
{
'DEFAULT_AUTHENTICATION_CLASSES'
:
[
'rest_framework.authentication.TokenAuthentication'
,
]
}
ROOT_URLCONF
=
'OKU.urls'
TEMPLATES
=
[
...
...
@@ -85,6 +91,7 @@ DATABASES = {
'NAME'
:
'oku_gis_new'
,
'USER'
:
'postgres'
,
'PASSWORD'
:
'khansia215758'
,
# 'HOST': '30.10.10.100',
'HOST'
:
'30.10.20.102'
,
'PORT'
:
'5432'
,
# 'HOST': '103.126.28.66',
...
...
require.txt
View file @
4086f552
...
...
@@ -7,7 +7,6 @@ Django==3.2.4
django-utils-six==2.0
django-widget-tweaks==1.4.8
djangorestframework==3.12.4
Flask==2.0.1
gunicorn==20.1.0
importlib-metadata==4.8.1
itsdangerous==2.0.1
...
...
static/js/scripts_js_o.js
View file @
4086f552
This diff is collapsed.
Click to expand it.
templates/includes/modal.html
View file @
4086f552
...
...
@@ -433,7 +433,7 @@
width: 80px;
height: 45px;
border: 1pt solid gray;"
>
<a
href=
""
class=
"btn"
>
Edit
</a>
<a
href=
"
#
"
class=
"btn"
>
Edit
</a>
</div>
</div>
<div
class=
"col-md-6"
style=
"margin-left: -30px;margin-top: 10px;"
>
...
...
@@ -672,6 +672,17 @@
</div>
</a>
</div>
<div
class=
"col-md-4 text-center"
>
<a
href=
"#"
class=
"btn btn_cek_PBB"
>
<div>
<img
src=
"{% static 'img/icon-1/kelurahan.svg' %}"
alt=
""
style=
"width: 35px;
height: 35px;"
>
</div>
<div
style=
"margin-top: 10px;"
>
<span>
PBB
</span>
</div>
</a>
</div>
</div>
</fieldset>
...
...
templates/layout/layout.html
View file @
4086f552
...
...
@@ -51,7 +51,7 @@
}
/* start hide fitur modal */
.tab_kdb_klb
{
/*
.tab_kdb_klb {
display: none;
}
...
...
@@ -61,7 +61,8 @@
.btn_cek_KDBKLB {
display: none;
}
} */
/* end hide fitur modal */
</style>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment