Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
crud
Project
Project
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ernanda
crud
Commits
f2de5545
Commit
f2de5545
authored
Feb 03, 2022
by
valdi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sort data
parent
22028fd3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
index.html
masterdata/templates/masterdata/index.html
+2
-1
views.py
masterdata/views.py
+1
-1
No files found.
masterdata/templates/masterdata/index.html
View file @
f2de5545
...
@@ -6,7 +6,8 @@
...
@@ -6,7 +6,8 @@
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-3"
>
<div
class=
"col-md-3"
>
<a
href=
"{% url 'masterdata:add' %}"
class=
"btn btn-success"
>
Add
</a><div
class=
"input-group rounded"
>
<a
href=
"{% url 'masterdata:add' %}"
class=
"btn btn-success"
>
Add
</a><div
class=
"input-group rounded"
>
</div>
</div><BR>
<form
action=
"{% url 'masterdata:search' %}"
method=
"get"
>
<form
action=
"{% url 'masterdata:search' %}"
method=
"get"
>
<input
type=
"search"
name=
"p"
class=
"form-control rounded"
placeholder=
"Search"
aria-label=
"Search"
aria-describedby=
"search-addon"
/>
<input
type=
"search"
name=
"p"
class=
"form-control rounded"
placeholder=
"Search"
aria-label=
"Search"
aria-describedby=
"search-addon"
/>
<span
class=
"input-group-text border-0"
id=
"search-addon"
>
<span
class=
"input-group-text border-0"
id=
"search-addon"
>
...
...
masterdata/views.py
View file @
f2de5545
...
@@ -11,7 +11,7 @@ from django.views import generic
...
@@ -11,7 +11,7 @@ from django.views import generic
def
index
(
request
):
def
index
(
request
):
latest_product_list
=
Product
.
objects
.
all
()
latest_product_list
=
Product
.
objects
.
all
()
.
order_by
(
'category_id'
,
'product_text'
)
context
=
{
context
=
{
'latest_product_list'
:
latest_product_list
,
'latest_product_list'
:
latest_product_list
,
}
}
...
...
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