Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
21_22-J 31
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
21_22-J 31
21_22-J 31
Commits
ac35be18
Commit
ac35be18
authored
Jan 08, 2022
by
Shivanthi Fernando
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create customer data interface and load customer data
parent
768cbb6f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
0 deletions
+11
-0
User/urls.py
User/urls.py
+1
-0
User/views.py
User/views.py
+9
-0
db.sqlite3
db.sqlite3
+0
-0
templates/Admin/Sidebar2.html
templates/Admin/Sidebar2.html
+1
-0
No files found.
User/urls.py
View file @
ac35be18
...
...
@@ -15,5 +15,6 @@ urlpatterns = [
path
(
'PurchaseHistory/'
,
responseapp_views
.
PurchaseHistory
),
path
(
'Forecasting/'
,
responseapp_views
.
Forecasting
),
path
(
'Result/'
,
responseapp_views
.
Forecasting
),
path
(
'Customer_Data/'
,
responseapp_views
.
Customer_Data
),
path
(
''
,
admin
.
site
.
urls
),
]
\ No newline at end of file
User/views.py
View file @
ac35be18
...
...
@@ -214,6 +214,15 @@ def AdminLogin(request):
def
AdminHome
(
request
):
return
render
(
request
,
'Admin/AdminHome.html'
)
def
Customer_Data
(
request
):
data
=
pd
.
read_csv
(
'Data/CustomerDataset.csv'
)
finalpt
=
data
.
head
(
500
)
json_records
=
finalpt
.
reset_index
()
.
to_json
(
orient
=
'records'
)
arr
=
[]
arr
=
json
.
loads
(
json_records
)
context
=
{
'd'
:
arr
}
return
render
(
request
,
'Admin/Customer_Data.html'
,
context
);
db.sqlite3
View file @
ac35be18
No preview for this file type
templates/Admin/Sidebar2.html
View file @
ac35be18
...
...
@@ -185,6 +185,7 @@ body{
</li>
<li><a
style=
"text-decoration:none;"
href=
"/Admin/Forecasting/"
><i
class=
"fas fa-bullseye "
></i>
Demand Forecasting
</a>
<li><a
style=
"text-decoration:none;"
href=
"/Admin/PurchaseHistory/"
><i
class=
"fas fa-cubes"
></i>
Purchase History
</a>
<li><a
style=
"text-decoration:none;"
href=
"/Admin/Customer_Data/"
><i
class=
"fas fa-user "
></i>
Customer Data
</a>
</ul>
...
...
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