Hi everyone,
my name is Manuel. I'm tryng to upload a file directly in a filefield
of Django model exposed by django-rest-interface.
It'is possible?
this is my model :
class File(models.Model):
file = models.FileField(upload_to='files',
help_text=_("file itself"))
page = models.ForeignKey(page)
and my urls.py :
json_File_resource = Collection(
queryset = File.objects.all(),
authentication = HttpBasicAuthentication(),
permitted_methods = ('GET', 'POST', 'PUT', 'DELETE'),
receiver = JSONReceiver(),
responder = JSONResponder()
)
urlpatterns = patterns('',
....
....
url(r'^json/File/(.*?)/?$',json_File_resource),
...
)
The GET works and the PUT to other field too but not the POST or the
PUT on filefield Field.
How i can pass the local file to the remote Service in the JSON
string?
Please Help Me!!!
Manuel
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.