We have a django app and it supports a file upload request. The entire
upload comprises multiple requests. We are authenticating with JWT and
we have logic to handle a 401 and in that case use the refresh token
to get a new access token and resend the failed request. However if
the token expires
Hello to All!
I need your help figuring out how to solve this issue I'm having while
trying to upload directly to s3 bucket.
I have a function that works perfectly outside of django, I'm trying to
implement it within django so as to be able to upload directly to s3.
1. I do want to first save t
Hello,
In my website i am uploading the documents and has title, category(choice
field) and file upload on my website, here the file upload stores normally
on the admin but how can i store the file inside the seperate folder based
on the selected category for ex if the file i am uploading
*Hello *
*I have designed a form which accepts some file from user*
*how to design model to accept that file and store it ?*
*Any tutorial that will be easy to understand please share*
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscri
Hi i am am trying to upload a file through a function but not the form and
am facing difficulties
how do i upload a file from server path without using the template form or
forms.form
```class Image(models.Model):
name = models.CharField(max_length=40, blank=True, unique=True)
image_fi
I have a plain text field in Parent Table and should upload a file in child
table and has a foreign key relation in both table. I cannot upload a file
in nested serializer. I didn't get a file data in serializer create
function. it take a data of parent serializer and delete the data of Nested
Hi do you hire contract based python/django freelancer?
We can help you in this and related tasks at fair prices. Reply or send
email to divy...@pythonmate.com
Best Regards,
Divyesh Khamele,
Pythonmate
On Fri, 9 Oct 2020, 11:20 pm Noel Simela, wrote:
> Hi guys,
>
> Any suggestions on the best a
Hi guys,
Any suggestions on the best approach to achieve the below with Django's
upload handlers. I was reviewing documentation at
https://docs.djangoproject.com/en/3.1/topics/http/file-uploads/
On upload I want to be able to read the contents of the document as per
below.
Read: –File Name, Auth
please help
--
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 view this discussion on the web visit
https://groups.g
*first sorry for weak English*
*in code *
*im get image from url *
*save like that*
#load image in skimage libray
img = io.imread(poster)
#to edit image opencv convert colors to rgb
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
#now load logo
logo = cv2.imread("static/assets/logo_o.jpg")
h_img, w_im
Hi,
You can't do that with a django form field - you need to handle that in
some other way.
What I would do is zip the directory and upload the zip file. Python can
handle zip files without any problem - so it shouldn't be that hard.
Regards,
Andréas
Den tis 7 apr. 2020 kl 14:20 skrev Ashok S
Hi All,
I want to upload a directory structure from remote server same as we are
uploading any file or image.
Please have a look and share me any reference.
Thanks
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this gro
Are you perhaps looking for
https://docs.djangoproject.com/en/2.2/ref/settings/#data-upload-max-memory-size
?
On Thursday, 10 October 2019 07:04:31 UTC+2, ajitkumar wrote:
>
> Hi,
>
> can anyone help me how to increase media upload size in django rest api,
>
>
>
>
> Thanks in advance.
>
>
>
I haven't found any restriction on file upload size. Did you experience
errors while uploading?
On Thu, Oct 10, 2019 at 12:04 PM ajitkumar
wrote:
> Hi,
>
> can anyone help me how to increase media upload size in django rest api,
>
>
>
>
> Thanks in advance.
>
&g
Hi,
can anyone help me how to increase media upload size in django rest api,
Thanks in advance.
--
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-user
thanks
Il giorno mercoledì 18 settembre 2019 19:29:00 UTC+2, mohammed habib ha
scritto:
>
> Make sure to add ‘enctype="multipart/form-data"’ to your form tag, so
> that the file data is included in when the form is submitted
>
>
> https://stackoverflow.com/questions/4526273/what-does-enctype-mul
Thanks
Luca
Il giorno mercoledì 18 settembre 2019 19:29:00 UTC+2, mohammed habib ha
scritto:
>
> Make sure to add ‘enctype="multipart/form-data"’ to your form tag, so
> that the file data is included in when the form is submitted
>
>
> https://stackoverflow.com/questions/4526273/what-does-encty
Make sure to add ‘enctype="multipart/form-data"’ to your form tag, so that the
file data is included in when the form is submitted
https://stackoverflow.com/questions/4526273/what-does-enctype-multipart-form-data-mean
Sent from my iPhone
> On 18 Sep 2019, at 17:38, Luca Bertolotti wrote:
>
>
Hello i can't upload the file, i'm in a debug mode:
the urls.is:
from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('', include('polls.urls')),
path('admin/', admin.site
gt;
>> Hey there, I have checked a lot of git projects for django latest
>> versions 'multiple file upload' but couldn't find a great one.
>>
>> Here i have created a repo for this:
>> https://github.com/Revel109/django-multiupload-lts
>>
>> Plea
here is my newbie opinion :
https://github.com/Revel109/django-multiupload-lts/issues/1
good luck
On Tue, Aug 27, 2019 at 9:30 AM Abu Yusuf
wrote:
> Hey there, I have checked a lot of git projects for django latest versions
> 'multiple file upload' but couldn't find a
Hey there, I have checked a lot of git projects for django latest versions
'multiple file upload' but couldn't find a great one.
Here i have created a repo for this:
https://github.com/Revel109/django-multiupload-lts
Please check this out and create issues if you have any :)
No ready made solution. You have to come up with your own solution. Use
form to upload file
On Wed, 2 Jan, 2019, 9:57 AM Suresh hi guys,
> How to upload zip file and save unzip file in django?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users"
hi guys,
How to upload zip file and save unzip file in django?
--
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
Thanks Melvyn
Yes, over time I have come to learn the need for fat models and Useful
Managers, plus having logic not embedded in the views (especially for
processing of data arising from a form). So views are mostly "handlers" to
ensure that the forms are presented, the data is retrieved and pas
It certainly isn't trivial.
First and foremost, write fat models and Managers, but lean views.
Rather then putting complex queries in views, I have a strong bias
to writing manager methods (or QuerySet methods, if I feel it's
reusable in more then one Manager - see Manager.from_queryset [1]).
Fu
I have been looking for a decent guide that covers testing in a solid,
thorough way - there are lots of fragmented pieces that cover
bits-and-pieces of what is needed for tests but not all the cases with a
start-to-end comprehensive approach for everything ("Obey the Testing Goat"
comes closest). I
On Sep 1, 2017 3:00 PM, "Derek" wrote:
Thanks Melvyn
I already have tests for the processing of data when it has been uploaded -
which is actually the critical issue for the application. The "view" is
just really a thin wrapper around the two steps : form display & upload and
then the file proc
pacua
> wrote:
> >>
> >> In the documentation of the test client it is all spelled out how to
> test
> >> file uploads.
> >>
> >> On Tue, Aug 29, 2017 at 8:48 PM, Derek wrote:
> >>>
> >>> (Python 3.5 and Dja
t;>>
>>> (Python 3.5 and Django 1.10)
>>>
>>> I am trying to test a Django form that enables a required file upload.
>>>
>>> The form is very simple and includes a field that looks like:
>>>
>>> upload_file = forms.FileField()
&g
Thanks James, I will try that.
On 1 September 2017 at 09:27, James Schneider
wrote:
>
>
> On Aug 29, 2017 11:49 AM, "Derek" wrote:
>
> (Python 3.5 and Django 1.10)
>
> I am trying to test a Django form that enables a required file upload.
>
> The form is
On Aug 29, 2017 11:49 AM, "Derek" wrote:
(Python 3.5 and Django 1.10)
I am trying to test a Django form that enables a required file upload.
The form is very simple and includes a field that looks like:
upload_file = forms.FileField()
The corresponding test to try and check
.10)
>>
>> I am trying to test a Django form that enables a required file upload.
>>
>> The form is very simple and includes a field that looks like:
>>
>> upload_file = forms.FileField()
>>
>> The corresponding test to try and check the upload:
t a Django form that enables a required file upload.
>
> The form is very simple and includes a field that looks like:
>
> upload_file = forms.FileField()
>
> The corresponding test to try and check the upload:
>
> def test_form_validation_with_file(self):
> fak
(Python 3.5 and Django 1.10)
I am trying to test a Django form that enables a required file upload.
The form is very simple and includes a field that looks like:
upload_file = forms.FileField()
The corresponding test to try and check the upload:
def test_form_validation_with_file(self
taking the pictures is done first;
- if the form is invalid for any reason, the picture is lost, and must be
taken again.
So I'm looking for an app to do ajax file upload. I had a look at those :
https://djangopackages.org/grids/g/ajax-file-uploading/
But I didn't find one that :
- is
Have you found this piece of the doc ?
https://docs.djangoproject.com/en/1.10/topics/http/file-uploads/#uploading-multiple-files
2017-02-05 0:13 GMT+01:00 Amit Pathak :
> Hi Guys,
>
> I have to upload multiple images from single ImageField and i have tried
> everything however i am able to select
Hi Guys,
I have to upload multiple images from single ImageField and i have tried
everything however i am able to select only single image .
Please help how can i do this?
Thanks in advance
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
Hi! I found this tutorial pretty helpful:
https://simpleisbetterthancomplex.com/tutorial/2016/08/01/how-to-upload-files-with-django.html
Den onsdag 4 januari 2017 kl. 13:47:40 UTC+1 skrev JJEMBA KENNETH:
>
> Hey guys can any one help with the right way to handle file upload in
> djang
https://docs.djangoproject.com/en/1.10/topics/http/file-uploads/
On Wednesday, January 4, 2017 at 2:47:40 PM UTC+2, JJEMBA KENNETH wrote:
>
> Hey guys can any one help with the right way to handle file upload in
> django. Am new to the framework.
>
> --
> Jjemba kenneth
>
Hey guys can any one help with the right way to handle file upload in
django. Am new to the framework.
--
Jjemba kenneth
--
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 i
/myapp should be given at url filed
please help
--
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
please help me
I have a django file upload sytem
a python file encryption code
the file encryption is done by a function called encrypt_file
which will encrypt the file from
path/filename.extention
to
path/filename.enc
the filename.enc is fixed
and only one file is created
how can i make it
please help me I have a file upload app
also a file encryption method
in that file encryption method a file is encrypted
from a
path/file.extenssion to
a path/filename.enc --->(1)
I gave the file name using MEDIA_FILE
How can I give a filename.
El martes, 16 de febrero de 2016, 21:12:32 (UTC+1), James Schneider
escribió:
>
> How long does the file upload work before receiving the error?
>>>>>
>>>>
>>>> There is no response from the server (fiddler returns -1, whatever this
>>>&g
>
> How long does the file upload work before receiving the error?
>>>>
>>>
>>> There is no response from the server (fiddler returns -1, whatever this
>>> means)
>>>
>>
>> Well, no response from the server doesn't necessar
de febrero de 2016, 23:04:48 (UTC+1), James Schneider
>> escribió:
>>>
>>>
>>>
>>> On Mon, Feb 15, 2016 at 10:20 AM, Pablo Conesa
>>> wrote:
>>>
>>>> Hi, I posted this in stackoverflow. Now I'm trying here:
>>>
>>> Hi, I posted this in stackoverflow. Now I'm trying here:
>>> http://stackoverflow.com/questions/35413649/file-upload-fails-with-slow-network-bandwith-in-django
>>>
>>> I've got a code working fine that uploads a file to a DJANGO server.
>>>
>
Thanks James. answers in line:
El lunes, 15 de febrero de 2016, 23:04:48 (UTC+1), James Schneider escribió:
>
>
>
> On Mon, Feb 15, 2016 at 10:20 AM, Pablo Conesa > wrote:
>
>> Hi, I posted this in stackoverflow. Now I'm trying here:
>> http://stackoverflow
p://www.google.com/url?q=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F6816215%2Fgunicorn-nginx-timeout-problem&sa=D&sntz=1&usg=AFQjCNEaoPVXq87HfcUZARiv5oAZjTM8Fw>
>
> On Mon, Feb 15, 2016 at 4:20 PM, Pablo Conesa > wrote:
>
>> Hi, I posted this in stackoverflow. Now I'm
On Mon, Feb 15, 2016 at 10:20 AM, Pablo Conesa
wrote:
> Hi, I posted this in stackoverflow. Now I'm trying here:
> http://stackoverflow.com/questions/35413649/file-upload-fails-with-slow-network-bandwith-in-django
>
> I've got a code working fine that uploads a file to a
, I posted this in stackoverflow. Now I'm trying here:
> http://stackoverflow.com/questions/35413649/file-upload-fails-with-slow-network-bandwith-in-django
>
> I've got a code working fine that uploads a file to a DJANGO server.
>
> It works fine on a fine connection.
Hi, I posted this in stackoverflow. Now I'm trying
here:
http://stackoverflow.com/questions/35413649/file-upload-fails-with-slow-network-bandwith-in-django
I've got a code working fine that uploads a file to a DJANGO server.
It works fine on a fine connection.
Now if, using
You could also try:
https://django-import-export.readthedocs.org/en/latest/
On Wednesday, 13 January 2016 16:30:04 UTC+2, girija sameera wrote:
>
> Hello,
> I am a Django beginner working on a web application wherein I am
> required to provide back-end support. I am expected to take an excel
Why don’t you try and see.
François
> On Jan 14, 2016, at 4:52 AM, girija sameera wrote:
>
> Ok will see that. Also I found this
> http://django-excel.readthedocs.org/en/latest/
>
> Do you think it would work?
>
> Thank you.
>
> --
> You received this message because you are subscribed to
Ok will see that. Also I found this
http://django-excel.readthedocs.org/en/latest/
Do you think it would work?
Thank you.
--
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
You can also use xlrd to open .xls files if needed:
https://pypi.python.org/pypi/xlrd
François
> On Jan 13, 2016, at 10:48 AM, Larry Martell wrote:
>
> On Wed, Jan 13, 2016 at 9:26 AM, girija sameera
> wrote:
>>
>> Hello,
>> I am a Django beginner working on a web application wher
On Wed, Jan 13, 2016 at 9:26 AM, girija sameera wrote:
>
> Hello,
> I am a Django beginner working on a web application wherein I am required
> to provide back-end support. I am expected to take an excel file uploaded by
> the admin from the template , parse the file using available Django li
Hello,
I am a Django beginner working on a web application wherein I am
required to provide back-end support. I am expected to take an excel file
uploaded by the admin from the template , parse the file using available
Django libraries and upload it to MySQL database . Also bulk upload of
f
o Forum
> I'm working on a web application that has a page with form set that
requires file upload. When I upload the files I get:
> Django Version:1.9.1
> Exception Type:ValueError
> Exception Value:
>
> invalid literal for int() with base 10: ''
>
> Excepti
Hi Django Forum
I'm working on a web application that has a page with form set that
requires file upload. When I upload the files I get:
Django Version:1.9.1Exception Type:ValueErrorException Value:
invalid literal for int() with base 10: ''
Exception
Location:C:\desarrollo\Py
I'm constructing my file-upload dialog using jquery(jq)/javascript/html
where the file-upload is supposed to begin like this:
htmlStr = 'SELECT FILE TO
UPLOAD:';
jq("#upldfildialog").append(htmlStr);
Everything seems to work except for actually being
The official docs are a good place to start
https://docs.djangoproject.com/en/1.8/topics/http/file-uploads/
This GitHub example is about the newest one available showing the changes
in recent Django versions
https://github.com/axelpale/minimal-django-file-upload-example
On Sat, May 16, 2015 at
Dear Group,
I want to upload file and form in Django. I am using Django 1.8 on Windows
2.7+ on Windows 7 Professional.
I am bit new and I was confused how may I upload file and form in Django.
If anyone may kindly show me an example tutorial. I tried some examples on
Github and stackoverflow b
You can save files as part of models, for example using FileFields
https://docs.djangoproject.com/en/1.7/ref/models/fields/#filefield
Or you can handle them manually, for example using default_storage
https://docs.djangoproject.com/en/1.7/topics/files/
Regarding File Search, I don't know, never
Hi!
I am just starting to use Django. I would like to know if anyone could
point me in the direction for having the following capability:
- File Storage System (Upload, Download, Delete)
- File Search
Thank you!
--
You received this message because you are subscribed to the Google Groups
"D
Héllo again (at last)
On Mon, Feb 16, 2015 at 11:20 AM Sola Chong wrote:
> I having a error "*expected string or buffer*" when submit to upload
> avatar when edit profile. Can't figure out what is the problem..
>
I've setup a small project with your code (and small modifications) using
django
Héllo Sola,
Can you post the full stacktrace not only the error?
Regards
On Mon Feb 16 2015 at 11:20:42 AM Sola Chong wrote:
> I having a error "*expected string or buffer*" when submit to upload
> avatar when edit profile. Can't figure out what is the problem..
>
> *Model:*
> class MyProfil
I having a error "*expected string or buffer*" when submit to upload avatar
when edit profile. Can't figure out what is the problem..
*Model:*
class MyProfile(models.Model):
user = models.ForeignKey(User)
dob = models.DateField(null=True, blank=True)
address = models.CharField(max_len
Add the following code to your onload function:
$(document).ajaxSend(function (event, jqxhr, settings) {
jqxhr.setRequestHeader("X-CSRFToken", '{{ csrf_token }}');
});
This way all AJAX requests will always get the csrftoken.
Regards,
Andréas
2015-02-09 16:19 GMT+01:00 Avraham Serour :
>
try addind the csrf on the http header instead of form data
On Sun, Feb 8, 2015 at 10:40 PM, G Z wrote:
> hello, I have an ajax request that sends a file to django, it is saying
> that the csrf token is missing but i copied my other ajax request that are
> working. I'm sure it has something to d
hello, I have an ajax request that sends a file to django, it is saying
that the csrf token is missing but i copied my other ajax request that are
working. I'm sure it has something to do with trying to pass a file to
upload.
I get a 403 and csrf missing return.
base.html
eavy files to a django app.
> the users should be able to sync the file upload in the background.
>
> This technique can be seen in file sharing services like 4shared and
> dropbox. I know java is the way to go but I am wondering if something like
> that is obtainable with dja
Hello Guys,
Here is my requirements.. I need to upload heavy files to a django app. the
users should be able to sync the file upload in the background.
This technique can be seen in file sharing services like 4shared and
dropbox. I know java is the way to go but I am wondering if something
Just wanted to update everyone on the solve for this.
It turns out that I was overzealous in my pre-planning.
In my urls.py at the top of my project I had defined extra applications
that I had not fleshed out yet. So they didn't have any urls.py or
views.py defined.
Even though the error wa
Updating with full error:
Request Method:GETRequest URL:http:///uploader/list/Django
Version:1.3.7Exception Type:TemplateSyntaxErrorException Value:
Caught ImportError while rendering: No module named urls
Exception Location:/usr/lib/python2.6/site-packages/django/utils/importlib.py
in import_
ls)),
(r'^$', main_page),
(r'^login/$', 'django.contrib.auth.views.login'),
(r'^logout/$', logout_page),
(r'^portal/', include('portal.urls')),
(r'^uploader/', include('uploader.urls')),
(r'^reviewe
I am trying to get this utility to work within my own Django site:
https://github.com/doph/minimal-django-file-upload-example/tree/master/src/for_django_1-3/myproject
I have copied all the appropriate files to where they need to be. I am on
django 1.3.7 on Centos 6.4 64Bit.
When I run the
the file uploads, you want to
requery the DB and get the 'new' list with this list of files?
Btw, I have tried my hands on with django-jquery-file-upload and i think
its one of the better solutions:
https://github.com/sigurdga/django-jquery-file-upload
Venkat
https://twitter.com/venkasu
I have a simple form that takes a user upload, queries a database, and
displays results in a table. I receive the following error whenever I try
to go to the second, third, fourth, etc page:
MultiValueDictKeyError at /result/
"Key 'batch' not found in "
Request Method: GET Request URL: htt
raise ValidationError(self.error_messages['invalid_image'])
> ...
>
>well, I don't know well to set temporary_file_path and how to
> storage it with mongoengine.django.storage.GridFSStorage
>
>
> # this was snippet for class ImageField
raise ValidationError(self.error_messages['invalid_image'])
...
well, I don't know well to set temporary_file_path and how to
storage it with mongoengine.django.storage.GridFSStorage
# this was snippet for class ImageField
def to_python(self, data):
"&q
I'd like to use an upload handler function but confused as to how an
uploaded file gets saved to a model's FileField. Eventually I will use a
formset to allow for multiple files to be uploaded.
#models.py
class MyModel(models.Model):
file = models.FileField(upload_to='attachments', blank=Tru
Here's some snippets from my code that work. I had to remove a lot that
is specific to my organization, so no guarantees...
-from
xmitzipfile.py--
def processZipfileBuffer(user, buffer):
email = create_mail_object()
Hi,
I want to upload large image files from actionscript from Flex. The
file upload tutorial
https://docs.djangoproject.com/en/dev/topics/http/file-uploads/
handles streamed file upload from a form so the file is transformed in
request.FILE['name'], but I don't know how to re
Hey Zak,
Take a look at uploadify (www.uploadify.com). It relies on jQuery, but
it's probably the plugin you've seen around the net, it's quite
popular and easy to setup / modify.
On Nov 10, 3:44 pm, zak wrote:
> All the cool websites have abandoned the HTML input type="file" tag,
> they are usi
All the cool websites have abandoned the HTML input type="file" tag,
they are using a little Flash thing that can take multiple files at
once.
1. Where do I find the Flash code?
2. How do I add this Flash code to a Django template?
3. How can the Django view function handle the uploaded files? A
This is my models.py
from django.db import models
# Create your models here.
class Question(models.Model):
question_name = models.CharField(max_length=200)
question_type = models.CharField(max_length=20)
def __unicode__(self):
return self.question_name
c
Sorry, it's the size limitation.
Didn't aware the settings.FILE_UPLOAD_MAX_MEMORY_SIZE was changed.
On Thu, Sep 29, 2011 at 5:57 PM, Jian Chang wrote:
> size limitation?
> it is wired.
> [?]
>
> 2011/9/28 @@
>
>> Hi
>> I got a image can't upload while other image works fine, and i use paint
>>
Thanks Dejan,
Now my problem is that I can't got the file from request.FILES , the
request.FILES is None.
On Thu, Sep 29, 2011 at 6:31 PM, Dejan Noveski wrote:
> Older versions of PIL have issues with incomplete exif data. If you make
> thumbnails or in any way manipulate the image, it wont wo
Older versions of PIL have issues with incomplete exif data. If you make
thumbnails or in any way manipulate the image, it wont work. Had this issue
2 days ago. Try working with PIL 1.1.7
On Thu, Sep 29, 2011 at 12:10 PM, @@ wrote:
> No it's size limitation. don't know if it was something wrong
No it's size limitation. don't know if it was something wrong with exif,
cause this is the only thing I found special with this image.
I use ms paint open this image and saved it as another image, and the new
image can be uploaded with no problem.
On Thu, Sep 29, 2011 at 5:57 PM, Jian Chang wro
size limitation?
it is wired.
[?]
2011/9/28 @@
> Hi
> I got a image can't upload while other image works fine, and i use paint
> open this image and save it as another file, then the other file can be
> uploaded.
> The debug page shows the request.FILES is None.
> The attachment is the image can
Thank you for the link but unfortunately it hasn't got me any further.
I believe I have my model set up correctly:
image_width = models.IntegerField(editable=False, null=True)
image_height = models.IntegerField(editable=False, null=True)
image = models.ImageField(upload_to='persons/%Y
On 27/09/2011 10:57, David wrote:
Hello
This is my view:
@login_required
@transaction.commit_on_success
def update_person(request):
try:
person_id = int(request.POST['person_id'])
except KeyError:
raise Http404
person = Person.objects.select_related().get(pk=per
Hello
This is my view:
@login_required
@transaction.commit_on_success
def update_person(request):
try:
person_id = int(request.POST['person_id'])
except KeyError:
raise Http404
person = Person.objects.select_related().get(pk=person_id)
form = PersonForm(request.POS
Im so sorry it was a typo, i did wrote self.request.method ==" POST"
in code
On Sep 4, 7:00 pm, Simon Connah wrote:
> On 4 Sep 2011, at 11:25, Ludvig wrote:
>
> > added a print statement after self.request.post == "POST" and it came
> > out, so its a post.
>
> You should use:
>
> if request.metho
On 4 Sep 2011, at 11:25, Ludvig wrote:
> added a print statement after self.request.post == "POST" and it came
> out, so its a post.
You should use:
if request.method == 'POST':
instead. That is the correct method to determine whether a URL was requested
using the POST method.
--
You receiv
On Fri, Sep 2, 2011 at 10:39 AM, Ludvig wrote:
> > Hello,
>
> > Usually only read these posts so i hope i'm doing this right!
>
> > Recently my file upload just stopped working, and i've no idea what
> > i've changed. I noticed that request.FILES is em
2011 at 8:39 PM, Ludvig wrote:
> > Hello,
>
> > Usually only read these posts so i hope i'm doing this right!
>
> > Recently my file upload just stopped working, and i've no idea what
> > i've changed. I noticed that request.FILES is empty so i've
1 - 100 of 520 matches
Mail list logo