Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoInt_SIDT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoInt_SIDT
Commits
a8f8ebc1
Commit
a8f8ebc1
authored
Nov 19, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
descripcion reportes
parent
24cd2296
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
settings.py
GeoInt_SIDT/settings.py
+9
-0
middleware.py
catalog/middleware.py
+3
-5
base_top.css
catalog/static/catalog/css/base_top.css
+1
-1
No files found.
GeoInt_SIDT/settings.py
View file @
a8f8ebc1
...
...
@@ -125,6 +125,15 @@ AUTH_PASSWORD_VALIDATORS = [
]
#Impersonate
IMPERSONATE
=
{
'REDIRECT_URL'
:
'/administration/users/'
,
}
# Internationalization
# https://docs.djangoproject.com/en/1.11/topics/i18n/
...
...
catalog/middleware.py
View file @
a8f8ebc1
import
re
from
django.shortcuts
import
HttpResponseRedirect
from
django.shortcuts
import
HttpResponseRedirect
,
redirect
from
django.urls
import
reverse
# from django.core.urlresolvers import reverse
...
...
@@ -15,9 +15,6 @@ class AuthRequiredMiddleware(object):
# the view (and later middleware) are called.
response
=
self
.
get_response
(
request
)
print
(
'midleware response'
,
response
)
if
"/reports/"
in
request
.
path_info
and
not
request
.
user
.
is_authenticated
:
if
re
.
match
(
"^(?:
\
/reports
\
/)+[0-9]*$"
,
request
.
path_info
):
purchase_id
=
request
.
path_info
.
replace
(
"/reports/"
,
""
)
...
...
@@ -36,7 +33,8 @@ class AuthRequiredMiddleware(object):
elif
"/impersonate/"
in
request
.
path_info
:
return
response
elif
"/impersonate/stop/"
in
request
.
path_info
:
return
redirect
(
'/administration/users/'
)
elif
request
.
path_info
==
reverse
(
'ipn'
):
return
response
elif
not
request
.
user
.
is_authenticated
and
request
.
path_info
!=
reverse
(
'login'
)
and
not
request
.
user
.
is_active
:
...
...
catalog/static/catalog/css/base_top.css
View file @
a8f8ebc1
...
...
@@ -7,4 +7,4 @@ view_as{
margin-top
:
0px
!important
;
background-color
:
rgba
(
255
,
0
,
0
,
0.5
);
text-align
:
center
;
}
\ No newline at end of file
}
\ No newline at end of file
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