title: django-piston: properly formatting POST data from a client application
body: <p>I have a Django app running django-piston for the first time.</p>
  
  <p>I've got a handler configured for a model and it's rigged for GET and POST.</p>
  
  <p>GET works fine. Tried and true.</p>
  
  <p>POST however is sucking. When I post data to it, I am getting this error</p>
  
  <pre><code>Responded: Piston/0.2.3rc1 (Django 1.2.4) crash report:
  
  Method signature does not match.
  
  Resource does not expect any parameters.
  
  Exception was: cannot concatenate 'str' and 'dict' objects
  </code></pre>
  
  <p>I'm really not a pro at Python but some basic Googling reveals that this <em>seems</em> to be a rather generic Python TypeError</p>
  
  <p>So here's some code.</p>
  
  <p><strong>urls.py (relevant parts)</strong></p>
  
  <pre><code>auth = DjangoAuthentication()
  ad = { 'authentication': auth }
  
  word_handler = Resource(handler = WordHandler, **ad)
  
  urlpatterns = patterns(
      url(r'^word/(?P&lt;word_id&gt;[^/]+)/', word_handler),
      url(r'^words/', word_handler),
  )
  </code></pre>
  
  <p><strong>handlers.py (relevant parts)</strong></p>
  
  <pre><code>class WordHandler(BaseHandler):
      allowed_methods = ('GET','POST',)
      model = Word
  
      fields = ('string', 'id', 'sort_order', ('owner', ('id',)),)
  
      def read(self, request, word_id = None):
          """
          Read code goes here
          """
  
      def create(self, request):
  
          if request.content_type:
              data = request.data
  
              print("Words Data: " + data)
  
              existing_words = Word.objects.filter(owner = request.user)
  
              for word in data['words']:
  
                  word_already_exists = False
  
                  for existing_word in existing_words:
  
                      if word["string"] == existing_word.string:
                          word_already_exists = True
                          break
  
  
                  if not word_already_exists:
                      Word(string = word["string"], owner = request.user).save()
  
              return rc.CREATED
  </code></pre>
  
  <p>Basically it's not even getting to create() at all, or at least it seems not to. It just craps out with the aforementioned error, so I can't even see how it's receiving the data.</p>
  
  <p>And just for the hell of it, here's the data I am trying to POST</p>
  
  <pre><code>{"words":[{"owner":{"id":1,"tags":null,"password":null,"words":null,"email":null,"firstname":null,"lastname":null,"username":null},"id":1,"sort_order":0,"tags":null,"string":"Another Test"},{"owner":{"id":1,"tags":null,"password":null,"words":null,"email":null,"firstname":null,"lastname":null,"username":null},"id":2,"sort_order":0,"tags":null,"string":"Here's a test"},{"owner":null,"id":0,"sort_order":0,"tags":null,"string":"Tampa"}]}
  </code></pre>
  
  <p>Any information at all would be extremely helpful.</p>