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
1184c705
Commit
1184c705
authored
Dec 17, 2021
by
Muhamad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
ec5c2bb7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
Application/views.py
Application/views.py
+2
-7
No files found.
Application/views.py
View file @
1184c705
from
django.http
import
response
from
django.http
import
response
from
API.views
import
jalan
from
API.views
import
jalan
from
django.contrib.auth.models
import
User
,
Group
,
Permission
from
django.contrib.auth.models
import
User
,
Group
from
django.shortcuts
import
render
,
redirect
from
django.shortcuts
import
render
,
redirect
# from django.views.generic import ListView, DetailView, DeleteView, UpdateView, CreateView
# from django.views.generic import ListView, DetailView, DeleteView, UpdateView, CreateView
from
django.views
import
View
,
generic
from
django.views
import
View
,
generic
...
@@ -510,14 +510,10 @@ class Dashboard(generic.TemplateView):
...
@@ -510,14 +510,10 @@ class Dashboard(generic.TemplateView):
}
}
res_all
.
append
(
data_all
)
res_all
.
append
(
data_all
)
perm_group
=
[]
if
request
.
user
.
is_authenticated
:
if
request
.
user
.
is_authenticated
:
current_user
=
request
.
user
current_user
=
request
.
user
thisUser
=
current_user
.
id
thisUser
=
current_user
.
id
for
xx
in
request
.
user
.
get_group_permissions
():
perm_group
.
append
(
xx
.
split
(
"."
)[
1
])
if
thisUser
==
None
:
if
thisUser
==
None
:
user_data
=
{
"filepath"
:
'placeholder.jpg'
}
user_data
=
{
"filepath"
:
'placeholder.jpg'
}
else
:
else
:
...
@@ -630,7 +626,6 @@ class Dashboard(generic.TemplateView):
...
@@ -630,7 +626,6 @@ class Dashboard(generic.TemplateView):
'global'
:
all
[
0
],
'global'
:
all
[
0
],
'res_all'
:
res_all
,
'res_all'
:
res_all
,
'thisUser'
:
user_data
,
'thisUser'
:
user_data
,
'perm_group'
:
perm_group
# 'user_res':user_res
# 'user_res':user_res
}
}
return
render
(
request
,
self
.
template_name
,
context
)
return
render
(
request
,
self
.
template_name
,
context
)
...
...
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