Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WhereIsTheBox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vincent DAVIN
WhereIsTheBox
Commits
e189bbde
Commit
e189bbde
authored
Mar 13, 2023
by
coin
Browse files
Options
Downloads
Patches
Plain Diff
tentative de remake de PostNewBox (Django c'est pas si bien)
parent
d69c7a39
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
WhereIsTheBox/__pycache__/views.cpython-311.pyc
+0
-0
0 additions, 0 deletions
WhereIsTheBox/__pycache__/views.cpython-311.pyc
WhereIsTheBox/views.py
+6
-7
6 additions, 7 deletions
WhereIsTheBox/views.py
db.sqlite3
+0
-0
0 additions, 0 deletions
db.sqlite3
with
6 additions
and
7 deletions
WhereIsTheBox/__pycache__/views.cpython-311.pyc
+
0
−
0
View file @
e189bbde
No preview for this file type
This diff is collapsed.
Click to expand it.
WhereIsTheBox/views.py
+
6
−
7
View file @
e189bbde
...
@@ -36,17 +36,16 @@ def deleteBox(request, boxId):
...
@@ -36,17 +36,16 @@ def deleteBox(request, boxId):
# Create a new box from a Json request
# Create a new box from a Json request
@csrf_exempt
@csrf_exempt
def
createBox
(
request
):
def
createBox
(
request
):
Own1
=
User
(
Name
=
"
Coin
"
,
Email
=
"
Coin@Coin.com
"
)
#
Own1 = User(Name=
request.POST.get('UserName'), Email=request.POST.get('UserEmail')
)
box
=
Box
(
Name
=
request
.
POST
.
get
(
'
Name
'
),
Tag
=
"
Box
"
,
Owner
=
Own1
,
Home
=
None
,
StorageBox
=
None
,
StoredBox
=
None
)
#Own1.save(
)
#box.Name = request.POST.get('Name')
#box.Name = request.POST.get('
Box
Name')
#box.Tag = request.POST.get('Tag')
#box.Tag = request.POST.get('Tag')
#box.Owner = request.POST.get('Owner')
#box.Owner = request.POST.get('Owner')
#box.Home = request.POST.get('Home')
#box.Home = request.POST.get('Home')
#box.StorageBox = request.POST.get('StorageBox')
#box.StorageBox = request.POST.get('StorageBox')
#box.StoredBox = request.POST.get('StoredBox')
#box.StoredBox = request.POST.get('StoredBox')
Own1
.
save
()
#box.save()
box
.
save
()
return
HttpResponse
(
status
=
501
)
return
JsonResponse
({
'
box
'
:
box
.
toJson
()})
# TODO Refaire WhereIsBox pour que ce soit récursif
# TODO Refaire WhereIsBox pour que ce soit récursif
def
whereIsBox
(
request
,
boxId
):
def
whereIsBox
(
request
,
boxId
):
...
...
This diff is collapsed.
Click to expand it.
db.sqlite3
+
0
−
0
View file @
e189bbde
No preview for this file type
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment