Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
BeHub-web
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
Dominik Rosiek
BeHub-web
Commits
f15a970f
Commit
f15a970f
authored
Nov 22, 2015
by
Rafal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add new view
parent
2c6cd9c2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
urls.py
BeHub/BeHub/urls.py
+0
-1
beacon_list.html
BeHub/Hub/templates/user_panel/content/beacon_list.html
+2
-2
views.py
BeHub/Hub/views.py
+6
-6
No files found.
BeHub/BeHub/urls.py
View file @
f15a970f
...
...
@@ -10,7 +10,6 @@ from Hub.views import login_page, main_page, dashboard, project, beacons
router
=
routers
.
DefaultRouter
()
router
.
register
(
r'beacons'
,
hub_views
.
BeaconViewSet
)
router
.
register
(
r'beacon_managers'
,
hub_views
.
BeaconManagerViewSet
)
router
.
register
(
r'full_beacon_managers'
,
hub_views
.
FullBeaconManagerViewSet
)
router
.
register
(
r'category'
,
hub_views
.
CategoryViewSet
)
router
.
register
(
r'sites'
,
hub_views
.
SiteViewSet
)
router
.
register
(
r'uuid'
,
hub_views
.
UuidBeaconViewSet
)
...
...
BeHub/Hub/templates/user_panel/content/beacon_list.html
View file @
f15a970f
...
...
@@ -55,7 +55,7 @@
$
(
"#myModal"
).
modal
(
"show"
);
$
(
"#modal-content"
).
html
(
'<form action="/login/" method="post" class="form-signin">
\
<input id="name" type="text" class="form-control" placeholder="Nazwa
projektu
" required autofocus name="name">
\
<input id="name" type="text" class="form-control" placeholder="Nazwa
beacona
" required autofocus name="name">
\
<input id="desc" type="text" class="form-control" placeholder="Description" required autofocus name="desc">
\
<input id="uuid" type="text" class="form-control" placeholder="UUID" required autofocus name="uuid">
\
<input id="long" type="text" class="form-control" placeholder="Longitude" required autofocus name="long">
\
...
...
@@ -63,7 +63,7 @@
</form>'
);
$
(
"#modal-footer"
).
html
(
'<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
\
<button type="button" class="btn btn-primary" id="addProjectBtn">Add
project
</button>'
);
<button type="button" class="btn btn-primary" id="addProjectBtn">Add
beacon
</button>'
);
$
(
"#addProjectBtn"
).
off
(
"click"
);
$
(
"#addProjectBtn"
).
on
(
"click"
,
function
(){
...
...
BeHub/Hub/views.py
View file @
f15a970f
...
...
@@ -39,12 +39,12 @@ class BeaconManagerViewSet(viewsets.ModelViewSet):
queryset
=
BeaconManager
.
objects
.
all
()
serializer_class
=
BeaconManagerSerializer
class
FullBeaconManagerViewSet
(
viewsets
.
ModelViewSet
):
"""
API for places
"""
queryset
=
BeaconManager
.
objects
.
all
()
serializer_class
=
FullBeaconManagerSerializer
#
class FullBeaconManagerViewSet(viewsets.ModelViewSet):
#
"""
#
API for places
#
"""
#
queryset = BeaconManager.objects.all()
#
serializer_class = FullBeaconManagerSerializer
class
UserProjectViewSet
(
viewsets
.
ModelViewSet
):
...
...
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