Hi,

I think I found a bug and was not sure where to post it other than here. I 
have created a view defined as follows

from django.http import HttpResponse, Http404
from django.views.generic.base import View

class TestView(View):
def post(self, request, *args, **kwargs):
print "*******************************"
print request.POST
print args
print kwargs
print "*******************************"
return HttpResponse("hello, world")

When I make a post request with CURL or advanced rest framework, the 
console outputs blank data,

*******************************
<QueryDict: {}>
()
{}
*******************************
[02/Jul/2013 15:00:39] "POST /blog/ HTTP/1.1" 200 12

Also, it is probably worth mentioning that I commented out the csrf 
middleware. My two urls.py files are define as

from django.conf.urls import patterns, include, url

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('',
url(r'^blog/', include('blog.urls')),
    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    # url(r'^admin/', include(admin.site.urls)),
)

and as follows for blog.urls.py

from django.conf.urls import patterns, include, url
from .views import * 

urlpatterns = patterns('',
    url(r'^$', TestView.as_view()),
)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to