Commit 82a5616d authored by Manggar Mahardhika's avatar Manggar Mahardhika

push full baru dr server dan layout baru dr angwin

parent 7514bdf4
......@@ -20,6 +20,7 @@ urlpatterns = [
path('editkependudukan/', views.editkependudukan, name='kependudukan'),
path('valideditkependudukan', views.valideditkependudukan, name='valideditkependudukan'),
path('editkantor', views.editpointka, name='editkantor'),
path('editlakes', views.editpointlk, name='editlakes'),
path('editpks', views.editpointpks, name='editpks'),
......@@ -45,6 +46,7 @@ urlpatterns = [
path('gardu', views.editgardu, name='gardu'),
path('hapus', views.hapus, name='hapus'),
path('tampak', views.upload_tampak, name='tampak'),
path('dkantor', views.deletekantoradmin, name='dkantor'),
path('change-tipe', views.changetipe, name='change-tipe'),
......@@ -61,4 +63,6 @@ urlpatterns = [
path('edit-jalan-valid', views.editjalanvalid, name='edit-jalan-valid'),
path('3d-maps', views.maps3d, name='3d-maps'),
path('deletejalan', views.deletejalan, name='hapus-jalan')
]
\ No newline at end of file
This diff is collapsed.
......@@ -9,7 +9,6 @@ from django.utils.decorators import method_decorator
from django.db import connection as conn
# from edit import *
# Create your views here.
class Dashboard(generic.TemplateView):
template_name = "layout/layout.html"
# @method_decorator(login_required(login_url='/login/'))
......@@ -483,7 +482,6 @@ class Dashboard(generic.TemplateView):
'cagar_budaya':cagar_budaya_result,
'gardu_listrik':gardu_listrik_result,
'global':all[0]
# 'kntl':kntl
}
return render (request, self.template_name, context)
......@@ -696,8 +694,8 @@ def saveperbaikan(request):
fss_p = FileSystemStorage(location='media/proposal/')
fss_b = FileSystemStorage(location='media/bukti_penyelesaian/')
fss_p = FileSystemStorage(location='/var/www/django/oku.khansia.co.id/media/proposal/')
fss_b = FileSystemStorage(location='/var/www/django/oku.khansia.co.id/media/bukti_penyelesaian/')
coord = json.loads(str(coor))
......@@ -729,7 +727,8 @@ def saveperbaikan(request):
filename_p = fss_p.save(nproposal, proposal)
url_p = fss_p.url(filename_p)
nbukti = f"{name}_{num}.{format[-1:][0]}"
format_ = (bukti_selesai.name).split(".")
nbukti = f"{name}_{num}.{format_[-1:][0]}"
nbukti = nbukti.replace(" ","-")
filename_b = fss_b.save(nbukti, bukti_selesai)
url_b = fss_b.url(filename_b)
......@@ -858,21 +857,22 @@ def saveperbaikanbangunan(request):
proposal = request.FILES.get("proposal_bang")
bukti_selesai = request.FILES.get("bukti_selesai_bang")
print((proposal.name).split("."))
print((bukti_selesai.name).split("."))
fss_p = FileSystemStorage(location='media/proposal/')
fss_b = FileSystemStorage(location='media/bukti_penyelesaian/')
fss_p = FileSystemStorage(location='/var/www/django/oku.khansia.co.id/media/proposal/')
fss_b = FileSystemStorage(location='/var/www/django/oku.khansia.co.id/media/bukti_penyelesaian/')
try:
format = (proposal.name).split(".")
format1 = (proposal.name).split(".")
num = random.randrange(1, 10000000000000)
nproposal = f"{name}_{num}.{format[-1:][0]}"
nproposal = f"{name}_{num}.{format1[-1:][0]}"
nproposal = nproposal.replace(" ","-")
filename_p = fss_p.save(nproposal, proposal)
url_p = fss_p.url(filename_p)
nbukti = f"{name}_{num}.{format[-1:][0]}"
format2 = (bukti_selesai.name).split(".")
nbukti = f"{name}_{num}.{format2[-1:][0]}"
nbukti = nbukti.replace(" ","-")
filename_b = fss_b.save(nbukti, bukti_selesai)
url_b = fss_b.url(filename_b)
......
......@@ -26,8 +26,7 @@ SECRET_KEY = 'django-insecure-t)zg+)tht0@ifbme@$@az0wz@qx(6r-2razt*rz)o1sasos@6!
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
#ALLOWED_HOSTS = ['temanku.okukab.go.id', 'teman-ku.khansia.co.id','localhost']
# Application definition
......@@ -85,10 +84,10 @@ DATABASES = {
'NAME': 'oku_gis_new',
'USER': 'postgres',
'PASSWORD' : 'khansia215758',
'HOST': '30.10.20.102',
'PORT': '5432',
#'HOST': '103.126.28.66',
#'PORT': '8082',
# 'HOST': '30.10.20.102',
# 'PORT': '5432',
'HOST': '103.126.28.66',
'PORT': '8082',
}
}
......@@ -142,9 +141,14 @@ STATICFILES_DIRS = (
os.path.join(BASE_DIR,'static'),
)
TEMPLATE_DIRS = (
'/var/www/django/oku.khansia.co.id/templates',
)
STATIC_ROOT = '/static/'
LOGIN_REDIRECT_URL = '/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
\ No newline at end of file
MEDIA_URL = '/var/www/django/oku.khansia.co.id/media/'
......@@ -35,5 +35,9 @@ urlpatterns = [
path('loadUserbyId/', views.loadUserbyId, name="loadUserbyId"),
path('addGroup/', views.addGroup, name="addGroup"),
path('deleteGroup/', views.deleteGroup, name="deleteGroup"),
path('getGroupById/', views.loadGroupByGroupId, name='getGroupById')
path('getGroupById/', views.loadGroupByGroupId, name='getGroupById'),
path('userprofile/', views.Userprofile.as_view(), name='userprofile'),
path('changepassword/', views.changepassword, name="changepassword"),
path('editprofile/', views.editprofile, name='editprofile'),
path('editpp/', views.editpp, name='editpp')
]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
\ No newline at end of file
<table border='2px'><tr bgcolor='#87AFC6'>
<th>No.</th>
<th>Nama</th>
<th>Type</th>
<th>Tanggal Perbaikan</th>
<th>Anggaran</th>
<th>Penanggung Jawab</th>
<th>Penanggung Jawab Lapangan</th>
<th>Kontraktor</th>
<th>Jenis Perbaikan</th>
<th>Proposal</th>
<th>Bukti Penyelesaian</th>
</tr>
<td>0</td>
<td>tes</td>
<td>Kantor DPRD</td>
<td>2021-08-09</td>
<td>1234324</td>
<td>hiya</td>
<td>hiya</td>
<td>hiya</td>
<td>hiya</td>
<td><a href="media/proposal/tes_476899655499.pdf" id="downloadproposal">View</a></td>
<td><a href="media/bukti_penyelesaian/tes_476899655499.pdf" onclick="viewBukti()" id="view-bukti">View</a></td>
</tr>
<td>1</td>
<td>tes</td>
<td>Kantor DPRD</td>
<td>2021-08-07</td>
<td>1000</td>
<td>zkkbh</td>
<td>asbjksajk</td>
<td>asojiojias</td>
<td>saoksaojk</td>
<td><a href="media/proposal/tes_1012149844003.pdf" id="downloadproposal">View</a></td>
<td><a href="media/bukti_penyelesaian/tes_1012149844003.pdf" onclick="viewBukti()" id="view-bukti">View</a></td>
</tr>
<td>2</td>
<td>tes</td>
<td>Kantor DPRD</td>
<td>2021-08-05</td>
<td>124325</td>
<td>asdas</td>
<td>asdsa</td>
<td>asdsad</td>
<td>asdasdd</td>
<td><a href="media/proposal/tes_8065285387402.pdf" id="downloadproposal">View</a></td>
<td><a href="media/bukti_penyelesaian/tes_8065285387402.pdf" onclick="viewBukti()" id="view-bukti">View</a></td>
</tr>
<td>3</td>
<td>tes</td>
<td>Kantor DPRD</td>
<td>2021-08-05</td>
<td>124325</td>
<td>asdas</td>
<td>asdsa</td>
<td>asdsad</td>
<td>asdasdd</td>
<td><a href="media/proposal/tes_8535831023977.pdf" id="downloadproposal">View</a></td>
<td><a href="media/bukti_penyelesaian/tes_8535831023977.pdf" onclick="viewBukti()" id="view-bukti">View</a></td>
</tr></table>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment