Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pierre-antoine Comby
winaps-server
Commits
f681c9ca
Commit
f681c9ca
authored
May 22, 2019
by
grisel-davy
Browse files
Configuration des urls et des templates dans settings
parent
8ea9400b
Changes
3
Hide whitespace changes
Inline
Side-by-side
winaps/templates/winaps/index.html
0 → 100644
View file @
f681c9ca
<center>
Winaps Is Not A Positiong System!
</center>
winaps/urls.py
View file @
f681c9ca
...
...
@@ -14,10 +14,12 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from
django.contrib
import
admin
from
django.urls
import
include
,
path
from
django.urls
import
include
,
path
,
re_path
from
.
import
views
urlpatterns
=
[
path
(
''
,
views
.
index
),
re_path
(
'^send\/\?.+$'
,
views
.
receive
,
name
=
'POST request'
),
path
(
'maps/'
,
include
(
'maps.urls'
)),
path
(
'admin/doc/'
,
include
(
'django.contrib.admindocs.urls'
)),
path
(
'admin/'
,
admin
.
site
.
urls
),
...
...
winaps/views.py
0 → 100644
View file @
f681c9ca
from
django.shortcuts
import
render
def
index
(
request
):
"""Index du site"""
return
render
(
request
,
'winaps/index.html'
,{})
def
receive
(
request
):
"""Reception des request POST et utilisation des données"""
test
=
request
.
POST
.
get
(
"text"
)
context
=
{
'text'
:
text
}
return
render
(
request
,
'winaps/reception.html'
)
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