Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
R
red-ci-cd
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
red-group-test
red-ci-cd
Commits
8fa90470
Commit
8fa90470
authored
Dec 18, 2019
by
John Red Medrano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed ordering of imports at ETL file
parent
888aaffb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
app/applicationlayer/management/batchupload/views.py
app/applicationlayer/management/batchupload/views.py
+12
-10
No files found.
app/applicationlayer/management/batchupload/views.py
View file @
8fa90470
import
os
import
sys
import
os
import
zipfile
import
shutil
import
datetime
import
threading
import
configparser
...
...
@@ -33,10 +37,6 @@ from rest_framework.filters import SearchFilter, OrderingFilter
from
app.applicationlayer.management.batchupload.table_filters
import
ExtractTransformLoadFilter
from
django.db.models
import
F
,
Value
from
django.core.files.base
import
ContentFile
config
=
configparser
.
ConfigParser
()
config_file
=
os
.
path
.
join
(
'./'
,
'env.ini'
)
config
.
read
(
config_file
)
from
django.conf
import
settings
from
io
import
BytesIO
from
django.http
import
HttpResponse
...
...
@@ -44,17 +44,17 @@ from django.template.loader import get_template
from
xhtml2pdf
import
pisa
from
django.core.files.storage
import
FileSystemStorage
from
django.core.exceptions
import
ObjectDoesNotExist
import
sys
import
os
import
zipfile
import
shutil
from
reportlab.platypus
import
SimpleDocTemplate
,
Spacer
,
Paragraph
from
reportlab.lib.styles
import
getSampleStyleSheet
,
ParagraphStyle
from
reportlab.lib.pagesizes
import
A4
from
reportlab.lib.enums
import
TA_JUSTIFY
,
TA_RIGHT
,
TA_LEFT
,
TA_CENTER
from
reportlab.lib.colors
import
red
config
=
configparser
.
ConfigParser
()
config_file
=
os
.
path
.
join
(
'./'
,
'env.ini'
)
config
.
read
(
config_file
)
class
BatchUploadViewSet
(
viewsets
.
ModelViewSet
):
queryset
=
ExtractTransformLoad
.
objects
.
all
()
.
order_by
(
'-created'
)
serializer_class
=
ExtractTransformLoadSerializer
...
...
@@ -71,7 +71,9 @@ class BatchUploadViewSet(viewsets.ModelViewSet):
def
list
(
self
,
request
,
*
args
,
**
kwargs
):
logged_user
=
request
.
user
.
username
queryset
=
self
.
filter_queryset
(
self
.
get_queryset
()
.
filter
(
createdby
=
logged_user
))
queryset
=
self
.
filter_queryset
(
self
.
get_queryset
()
.
filter
(
createdby
=
logged_user
)
)
page
=
self
.
paginate_queryset
(
queryset
)
...
...
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