#27005: request.body raises an exception
-------------------------------+--------------------------------------
     Reporter:  dvinegla       |                    Owner:  nobody
         Type:  Bug            |                   Status:  new
    Component:  Uncategorized  |                  Version:  1.10
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------

Comment (by dvinegla):

 {{{#!python
 # testproject/testproject/urls.py

 """testproject URL Configuration

 The `urlpatterns` list routes URLs to views. For more information please
 see:
     https://docs.djangoproject.com/en/1.10/topics/http/urls/
 Examples:
 Function views
     1. Add an import:  from my_app import views
     2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
 Class-based views
     1. Add an import:  from other_app.views import Home
     2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
 Including another URLconf
     1. Import the include() function: from django.conf.urls import url,
 include
     2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
 """
 from django.conf.urls import url, include
 from django.contrib import admin

 urlpatterns = [
     url(r'^myapp/', include('myapp.urls')),
     url(r'^admin/', admin.site.urls),
 ]

 }}}

 {{{#!python
 # testproject/myapp/urls.py

 from django.conf.urls import url

 from . import views

 urlpatterns = [
         url(r'^$', views.test_view),
 ]

 }}}

 {{{#!python
 # testproject/myapp/views.py

 from django.shortcuts import render

 # Create your views here.


 def test_view(request):

         assert False, request.body

 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27005#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.c4f8bd57e91eeb8d06f5e499357037b3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to