upload image and encode face with opencv and face_recognition

2023-12-23 Thread Mr Salar
hi I want to take the photo file selected in the form using opencv and encode the face using face_recognition in Django before my information is saved in the database. But I can't get the photo file from cleaned data. please Help me my views.py from django.shortcuts import render, redirect from

Re: Upload image submit by users to another serveur

2023-03-03 Thread Ahmed Mulla
different needs 3. Set a cron job that copies the images from the original server and then uploads them to a new server (not advisable) Let me know if these help. On Sat, Mar 4, 2023, 1:07 AM Théodore KOSSI wrote: > Hello guys, I hope you are well > > I want to upload image submitting b

Upload image submit by users to another serveur

2023-03-03 Thread Théodore KOSSI
Hello guys, I hope you are well I want to upload image submitting by user to another server Please , do you have any solutions to help me. -- theodoros17@python-developer -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubs

How to upload image using django backend and vuejs form in front end

2021-03-15 Thread Salima Begum
Hi all, I am trying to upload an image using vue.js and backend is django. but while I am uploading the image its is showing path as a "fakepath". So due to that i am unable to save the image at media folder. So how to solve this issue. Thanks ~Salima -- You received this message because you are

Re: How Upload Image Html File To save DataBase

2020-09-16 Thread RANGA BHARATH JINKA
Check django documentation to store images to the folder. Use upload_to in models.py You have to update your models. All the best On Wed, Sep 16, 2020 at 1:50 PM RANGA BHARATH JINKA < bharathjink...@gmail.com> wrote: > Hi, > > Store the images in a folder. > Store the images folder path in the

Re: How Upload Image Html File To save DataBase

2020-09-16 Thread RANGA BHARATH JINKA
Hi, Store the images in a folder. Store the images folder path in the database. Don't store the images directly in db. It is not a good practice. Instead use aws for storing images. Follow this tutorial series. https://www.youtube.com/watch?v=inQyZ7zFMHM All the best On Wed, Sep 16, 2020 at 1:

Re: How Upload Image Html File To save DataBase

2020-09-16 Thread waqar khan
[image: s.JPG] Please Guys Reply Me . On Wed, Sep 16, 2020 at 1:36 PM waqar khan wrote: > *I am Using dataBase Sql* > > On Wed, Sep 16, 2020 at 1:21 AM kkwaq...@gmail.com > wrote: > >> *Problem :- I have Create table and add ImageField , i wanna upload_image >> Front-end and save database

Re: How Upload Image Html File To save DataBase

2020-09-16 Thread waqar khan
*I am Using dataBase Sql* On Wed, Sep 16, 2020 at 1:21 AM kkwaq...@gmail.com wrote: > *Problem :- I have Create table and add ImageField , i wanna upload_image > Front-end and save database.*. > > > html file: But Image Not save > *I am upload using database* > > > [image: u.JPG] > *models.py*

How Upload Image Html File To save DataBase

2020-09-15 Thread kkwaq...@gmail.com
*Problem :- I have Create table and add ImageField , i wanna upload_image Front-end and save database.*. html file: But Image Not save *I am upload using database* [image: u.JPG] *models.py* [image: i.JPG] Html Coding file [image: j.JPG] *urls.py* [image: g.JPG] -- You received this

I am not able to render my file fields in the Database so not able to upload image

2020-02-20 Thread mick
forms.py class FormStep8(forms.Form): portraitphoto=forms.ImageField(label='Portrait photos of yourself') high_resolution=forms.ImageField(label='3 High Resolution pictures') company_logo=forms.ImageField(label='Company Logo') product_images=forms.ImageField(label='Product Image

Re: Upload Image Field? ASAP PLS

2018-11-18 Thread Yavin Aalto Arba
Assuming this is just a general question about the subject: Django Models has an imagefield option: https://docs.djangoproject.com/en/2.1/ref/models/fields/#django.db.models.ImageField The image has a .url attribute which you can use for displaying (or you can use the % static % method). cf. "For

Re: Upload Image Field? ASAP PLS

2018-11-17 Thread Shashank Singh
Why not doing it? Where are you stuck? On Sun, 18 Nov, 2018, 8:02 AM Richard Vo Need to upload an image, manipulate the image through Python Pillow, then > display it. > > Whatever additional information I need to provide, please let me know. > > -- > You received this message because you are sub

Upload Image Field? ASAP PLS

2018-11-17 Thread Richard Vo
Need to upload an image, manipulate the image through Python Pillow, then display it. Whatever additional information I need to provide, please let me know. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and s

Re: Can't Upload Image Field With Django 2.1

2018-10-31 Thread Pacôme Avahouin
Yes you right Tim, i have misunderstood the purpose of height_field and width_field, i'm new in Django :) Gonna check more in the documentation and try a third-party app to resize images. Thanks a lot for the help. I appreciate. -- You received this message because you are subscribed to the Goo

Re: Can't Upload Image Field With Django 2.1

2018-10-31 Thread Tim Graham
You've misunderstood the purpose of height_field and width_field. Please read the documentation: https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ImageField.height_field You need to use a third-party app to do image resizing. Check out https://djangopackages.org/grids/g

Re: Can't Upload Image Field With Django 2.1

2018-10-31 Thread Pacôme Avahouin
> > My model fields look like this: > > class CustomAbstractUser(AbstractBaseUser, PermissionsMixin): > """ > An abstract base class implementing a fully featured User model with > admin-compliant permissions. > > Email and password are required. Other fields are optional. > ""

Re: Can't Upload Image Field With Django 2.1

2018-10-31 Thread Tim Graham
height_field and width_field should be strings. What's the error and what does your model fields look like? On Wednesday, October 31, 2018 at 10:53:53 AM UTC-4, Pacôme Avahouin wrote: > > Tim you just saved me right now:) I have spent the all night trying to > figure it out. > Thanks a lot. > No

Re: Can't Upload Image Field With Django 2.1

2018-10-31 Thread Pacôme Avahouin
Tim you just saved me right now:) I have spent the all night trying to figure it out. Thanks a lot. Now when i removed the width_field it works fine. But how to define height_field and width_field directly from the model? Cause when i put their values in quotes i got another error. -- You recei

Re: Can't Upload Image Field With Django 2.1

2018-10-31 Thread Tim Graham
It looks like the width_field option on the model field isn't a string. On Wednesday, October 31, 2018 at 10:28:42 AM UTC-4, Pacôme Avahouin wrote: > > Hello Tim, > > Thanks for answering. > > Here is the complete traceback. > By the way when i commented out the 'upload_file' function still i'm >

Re: Can't Upload Image Field With Django 2.1

2018-10-31 Thread Pacôme Avahouin
Hello Tim, Thanks for answering. Here is the complete traceback. By the way when i commented out the 'upload_file' function still i'm getting the same error. I believe the origin might be somewhere else. Environment: Request Method: POST Request URL: http://127.0.0.1:8000/user/edit-profile

Re: Can't Upload Image Field With Django 2.1

2018-10-31 Thread Tim Graham
It would be helpful to see the complete traceback. What you provided doesn't show where the exception originates. On Tuesday, October 30, 2018 at 10:38:38 PM UTC-4, Pacôme Avahouin wrote: > > Hello guys, > > I'm trying to upload user avatar (ImageField type) with my own custom user > model foll

Can't Upload Image Field With Django 2.1

2018-10-30 Thread Pacôme Avahouin
Hello guys, I'm trying to upload user avatar (ImageField type) with my own custom user model following the documentation like this: class MyUsersProfileView(UpdateView): # First try def upload_file(request): if request.method == 'POST': form = MyModelFormWithFileField(request.PO

Re: how Upload image in django and how to read file dimensions

2018-05-10 Thread pradam
data = request.FILES.get('file') from django.core.files.images import get_image_dimensions from PIL import Image im = Image.open(data) ---> No Quotes just pass the data here. On Thu, May 10, 2018 at 7:31 PM, arvind yadav < developer.arvind2...@gmail.com> wrote: > my views.py in admin.py fil

how Upload image in django and how to read file dimensions

2018-05-10 Thread arvind yadav
my views.py in admin.py file def changelist_view(self, request, extra_context=None,): extra_context = extra_context or {} if request.method == 'POST': #extra_context['form'] ='form' form = HomePageBannerForm(request.POST, request.FILES) if form.is_valid():

Django 1.8 add created_by when upload image in admin

2016-02-25 Thread gerard
Hello all, I'm trying to add the user when upload a file using the admin in Django. The model is: class Image(models.Model): image = models.FileField(upload_to=DIR_IMAGES, max_length=500) created_by = models.ForeignKey(User, related_name='created_by', editable=False) in admin.py, i hav

Re: Django - Upload Image to the server with dimension

2015-12-29 Thread Rafael E. Ferrero
Hello Lekan, First of anything try to start a new e-mail for new questions... because yours don't have any relations with the root question. And try to tell uss if you know Django, if you readed Django Docs. Tell us more about your idea. Happy 2016 for you !! -- Rafael E. Ferrero 2015-12-29 9:31

Re: Django - Upload Image to the server with dimension

2015-12-29 Thread Lekan Wahab
Hello Guys. I have a website and am trying to build a rating system for the site. The system takes in user's rating and rewards them at the end of the month according to their ratings. I honestly dont know where to begin. i have searched for some things online but i still need help On Tue, Dec 29

Re: Django - Upload Image to the server with dimension

2015-12-29 Thread monoBOT
Take a look at this: http://djangothumbnails.com/ 2015-12-29 7:12 GMT+00:00 ken phanith : > I simply use ImageField from PIL package for Django Image Upload but it > does not satisfy me at all. I have a models class which contain many fields > including ImageField also. I am trying to upload 10

Django - Upload Image to the server with dimension

2015-12-29 Thread ken phanith
I simply use ImageField from PIL package for Django Image Upload but it does not satisfy me at all. I have a models class which contain many fields including ImageField also. I am trying to upload 10 images to the server but those images have the different dimension. I want to upload those image

Re: Problem to upload image

2015-10-19 Thread Mark Steadman
This is a JavaScript question more than it is a Django one, as your problem is client-side. What browser are you running this in? I've just tried it in Safari, Chrome and Firefox on a Mac and haven't come up against the same issue. What you're doing is slightly odd, as I'd normally recommend us

Problem to upload image

2015-10-14 Thread Rosangela Oliveira
Hi,I need some help I have a problem when I try to upload the image in a django project, it's open the windows to upload the image twice. in HTML I did: http://shackmanlab.org/wp-content/uploads/2013/07/person-placeholder.jpg"; width='125px' height='125px' style="float:left; margi

Re: Help, question about upload image

2014-09-05 Thread 孟维康
Thanks a lot for your help. I got another way to do that with StringIO the same way as the tempfile. Could you tell me which is better? I'm not good at programing and working on it. http://stackoverflow.com/questions/3723220/how-do-you-convert-a-pil-image-to-a-django-file 于 2014/9/6 2:07, Coll

Re: Help, question about upload image

2014-09-05 Thread Collin Anderson
That's more a of a pillow question than a django question, but something like this might work: import tempfile imagefile = tempfile.TemporaryFile() im.save(imagefile) return imagefile -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubsc

Help, question about upload image

2014-09-05 Thread Weikang Meng
Hello, I'm working on a Django project that need to upload images and there's limit on the image file size(like 5M). I need to compress the image if it is larger than the upper limit. And my problem is *how can i return the compressed image data just like the format of file.read()?* Here's how

Re: django upload image

2014-07-28 Thread Conner DiPaolo
I had a serious problem doing this. If your problem is similar to how mine was (static folder works but media folder doesn't) look at my Stack Overflow Question Best luck, Conner DiPaolo On Monday, July 28,

django upload image

2014-07-28 Thread ngangsia akumbo
please i need some help getting around with upload images i can put a background image on my site i can style it with css and others but when i upload images on my admin page , it does not get loaded on the page please need some help here -- You received this message because you are subscri

howto copy content of upload image into BytesIO object (without create tmp file)

2013-12-30 Thread Hanz
Hello all, i need process uploaded image on the fly - in memory. I don't need create temp file. I try something like... . userform = UserForm(request.POST, request.FILES) raw_image = userform.cleaned_data["image"] content = BytesIO(raw_image.read()) image = Img.open(content) . But i re

Re: upload image with Django

2013-05-25 Thread Gianluca Dileo
Can you show me an example? With the HttpResponseRedirect are forced to send the information to another page. While I need to display the image (in a window, that the user can close) on the same page that contains the form. Thanks in advance. GD Il giorno venerdì 24 maggio 2013 20:27:55 UTC+2,

Re: upload image with Django

2013-05-24 Thread Michael Radziej
Gianluca Dileo writes: > Hi guy, > I've created a form in a page html that upload a image. > After capturing the image and edit it, I need to have it appear in a window > j > How can i do? Does HttpResponseRedirect do what you want to achieve? Kind regards Michael -- You received this mess

upload image with Django

2013-05-24 Thread Gianluca Dileo
Hi guy, I've created a form in a page html that upload a image. After capturing the image and edit it, I need to have it appear in a window j How can i do? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Upload Image

2013-04-22 Thread Hélio Miranda
I'm doing the following: http://plnkr.co/edit/neqmvI13prMySMtHQHta Is something wrong? What could it be? As it is, should not be saving the image in folder? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Upload Image

2013-04-22 Thread Hélio Miranda
I still can not upload image Someone can give me one more help? 'm New to Django and did not know what I'm doing wrong ... -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving ema

Re: Upload Image

2013-04-19 Thread Michael Hernandez
Grr i accidentally pressed enter before finishing the message Since its in the database it is not available in your filesystem or for immediate display. to check if its there ./manage.py shell import yourmodel as Document print Document.objects.all() i would suggest researching pythons mo

Re: Upload Image

2013-04-19 Thread Michael Hernandez
Hi Miranda, If I understand correctly. Your code is working now but you cannot find the Image??? The image is currently being sent to the database. It is being store in a record in the table. On Friday, April 19, 2013 3:21:02 PM UTC-4, Hélio Miranda wrote: > > Gives no error > But do

Re: Upload Image

2013-04-19 Thread carlos
try this minimun changed = views === def index(request): if request.method == 'POST': form = DocumentForm(request.POST, request.FILES) if form.is_valid(): form.save() return HttpResponseRedirect('/') else: form = DocumentForm() re

Re: Upload Image

2013-04-19 Thread Hélio Miranda
Gives no error But do not know where to send the image and sends Do not put the picture in the ... Does anything in the settings? Or have a folder in the wrong place? My folder structure is right? -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Upload Image

2013-04-19 Thread Charly Román
def index(request): if request.method == 'POST': form = DocumentForm(request.POST, request.FILES) if form.is_valid(): form.save() return render_to_response('index.html', {'form': form}) else: form = DocumentForm() return render_to_respons

Re: Upload Image

2013-04-19 Thread Hélio Miranda
Gives the following error Charly Blog.views.index The view did not return an HttpResponse object. -- 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+un

Re: Upload Image

2013-04-19 Thread Charly Román
def index(request): if request.method == 'POST': form = DocumentForm(request.POST, request.FILES) if form.is_valid(): form.save() return render_to_response('index.html', {'form': form}) else: form = DocumentForm() return render_to_res

Re: Upload Image

2013-04-19 Thread Hélio Miranda
Is giving an error of syntax and I do not see where ... Says it is on line 19 -- 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...@googlegrou

Re: Upload Image

2013-04-19 Thread Peith Vergil
Try this in your view: from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from models import Document from forms import DocumentForm def index(request): if re

Re: Upload Image

2013-04-19 Thread Hélio Miranda
My whole code including the settings are here: http://plnkr.co/edit/neqmvI13prMySMtHQHta And my structure is this: What do you think could be wrong? -- You received this message becau

Re: Upload Image

2013-04-19 Thread Peith Vergil
the *else:* should be part of *if form.is_valid():*, so just indent it. On Sat, Apr 20, 2013 at 2:13 AM, Hélio Miranda wrote: > So it gives me an error: > > local variable 'form' referenced before assignment > > > in views.py > > -- > You received this message because you are subscribed to the

Re: Upload Image

2013-04-19 Thread Hélio Miranda
Can I have the ill-defined folder? -- 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 t

Re: Upload Image

2013-04-19 Thread Hélio Miranda
So it gives me an error: local variable 'form' referenced before assignment in views.py -- 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.

Re: Upload Image

2013-04-19 Thread Peith Vergil
Try this: In your forms.py *class DocumentForm(forms.ModelForm): class Meta: model = Document* *...* In your views.py *def index(request): if request.method == 'POST': form = DocumentForm(request.POST, request.FILES) if form.is_valid(): form.sa

Re: Upload Image

2013-04-19 Thread Hélio Miranda
I still have the same problem. My question is whether I have the code, the image would be saved in? -- 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+

Re: Upload Image

2013-04-19 Thread Peith Vergil
Maybe DocumentForm should inherit from ModelForm: *class DocumentForm(forms.ModelForm): class Meta: model = Document* -- 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,

Re: Upload Image

2013-04-19 Thread Hélio Miranda
has not changed and continues to keep me in the picture anywhere ... -- 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. T

Re: Upload Image

2013-04-19 Thread carlos
Hi se this code * fnewdoc = Document(docfile = request.FILES['docfile'])* * newdoc.save()* * * *diferent name fnewdoc != newdoc* * * *Cheers* On Fri, Apr 19, 2013 at 10:31 AM, Hélio Miranda wrote: > Been changing and now have the following code: > > Models.py: > *class Document(models.Model):*

Re: Upload Image

2013-04-19 Thread Hélio Miranda
Been changing and now have the following code: Models.py: *class Document(models.Model):* * docfile = models.FileField(upload_to='documents/%Y/%m/%d')* Forms.py: *class DocumentForm(forms.Form):* *docfile = forms.FileField()* Views.py: *def index(request):* *if request.method == 'POS

Re: Upload Image

2013-04-19 Thread Tom Evans
On Fri, Apr 19, 2013 at 4:16 PM, Hélio Miranda wrote: > I draw the picture and then when I submite, gives me the following error: > > 'TestUploadForm' object has no attribute 'save' > Your form has no save() method. What do you want to happen when you call save()? If you want to save the image a

Re: Upload Image

2013-04-19 Thread Hélio Miranda
I draw the picture and then when I submite, gives me the following error: *'TestUploadForm' object has no attribute 'save'* -- 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 a

Re: Upload Image

2013-04-19 Thread Tom Evans
On Fri, Apr 19, 2013 at 3:14 PM, Hélio Miranda wrote: > I'm trying to make a simple uplaod picture but I'm not getting. I'm doing > the following way: > > Models.py: > class TestUpload(models.Model): > model_pic = models.ImageField(upload_to='Temp/', blank=True, null=True) > > Forms.py: > cla

Upload Image

2013-04-19 Thread Hélio Miranda
I'm trying to make a simple uplaod picture but I'm not getting. I'm doing the following way: *Models.py:* *class TestUpload(models.Model):* * model_pic = models.ImageField(upload_to='Temp/', blank=True, null=True)* * * *Forms.py:* class TestUploadForm(forms.Form): image = forms.ImageFiel

Re: Upload Image and pdf file

2012-09-04 Thread Dott. Tegagni Alessandro
The file settings.py is: http://dpaste.com/796111/ But the result is page not found, when i click on media file, that i upload. any ideas? Il giorno domenica 2 settembre 2012 15:53:48 UTC+2, Dott. Tegagni Alessandro ha scritto: > > The file urls.py is: http://dpaste.com/795211/ > If it is the he

Re: Upload Image and pdf file

2012-09-02 Thread Dott. Tegagni Alessandro
The file urls.py is: http://dpaste.com/795211/ If it is the help. Il giorno domenica 2 settembre 2012 14:51:21 UTC+2, Dott. Tegagni Alessandro ha scritto: > > The folder is empty. > > Il giorno venerdì 31 agosto 2012 08:47:55 UTC+2, Amyth ha scritto: >> >> Do you actually see anyfiles uploaded u

Re: Upload Image and pdf file

2012-09-02 Thread Dott. Tegagni Alessandro
The folder is empty. Il giorno venerdì 31 agosto 2012 08:47:55 UTC+2, Amyth ha scritto: > > Do you actually see anyfiles uploaded under static/finale if you manually > browse the folder? or is it empty ? > > On Thu, Aug 30, 2012 at 7:54 PM, Dott. Tegagni Alessandro < > tefar...@gmail.com > wrote:

Re: Upload Image and pdf file

2012-08-30 Thread Amyth Arora
Do you actually see anyfiles uploaded under static/finale if you manually browse the folder? or is it empty ? On Thu, Aug 30, 2012 at 7:54 PM, Dott. Tegagni Alessandro < tefari@gmail.com> wrote: > I have a project created with cms Django, and in this project i must > upload a image and pdf fi

Upload Image and pdf file

2012-08-30 Thread Dott. Tegagni Alessandro
I have a project created with cms Django, and in this project i must upload a image and pdf file. the code in models.py is as follow: http://dpaste.com/793672/ The file with this step to upload, is inserted in correct folder, but the file not work. In Administrator panel, when i click on im

Re: upload image

2012-06-17 Thread Satvir Toor
On Mon, Jun 18, 2012 at 6:29 AM, Satvir Toor wrote: > On Sun, Jun 17, 2012 at 12:36 PM, Kurtis Mullins > wrote: >>> On Sun, Jun 17, 2012 at 2:33 AM, Satvir >>> Toor  wrote: > >> Make sure you set up the Form enctype correctly. (> ... enctype="multipart/form-data">) > I did it. Problem solved. Tha

Re: upload image

2012-06-17 Thread Satvir Toor
On Sun, Jun 17, 2012 at 12:36 PM, Kurtis Mullins wrote: >> On Sun, Jun 17, 2012 at 2:33 AM, Satvir >> Toor  wrote: > Make sure you set up the Form enctype correctly. ( ... enctype="multipart/form-data">) I did it. Problem solved. Thanx Sir. >> MEDIA_ROOT = >> '/usr/local/lib/python2.7/dist-packag

Re: upload image

2012-06-17 Thread Kurtis Mullins
> > On Sun, Jun 17, 2012 at 2:33 AM, Satvir Toor > wrote: > but when i try to submit data it makes the upload file empty and gives > notification this field(file upload) is required. Make sure you set up the Form enctype correctly. () MEDIA_ROOT = > '/usr/local/lib/python2.7/dist-packages/d

Re: upload image

2012-06-16 Thread Satvir Toor
On Sun, Jun 17, 2012 at 5:31 AM, Mike Dewhirst wrote: > On 17/06/2012 5:16am, Satvir Toor wrote: > 1. Include the image in your other form href="{{MEDIA_URL}}somedir/image.png"> I followed the link which you suggest me. I made changes in settings.py file of the project as MEDIA_ROOT = '/usr/lo

Re: upload image

2012-06-16 Thread Mike Dewhirst
On 17/06/2012 5:16am, Satvir Toor wrote: I want to upload a image through django forms.I created a class and that file-upload element is visible into the browser.It makes me enable to choose the file. How to handle that image??? Can anybody explain what would be whole procedure to upload a image

upload image

2012-06-16 Thread Satvir Toor
I want to upload a image through django forms.I created a class and that file-upload element is visible into the browser.It makes me enable to choose the file. How to handle that image??? Can anybody explain what would be whole procedure to upload a image and the display that image into my Another

Re: Django Upload Image Help

2011-12-12 Thread Mike Dewhirst
On 13/12/2011 5:25am, cmc wrote: write_info = "name: %s\n caption: %s\n source: %s\n more_info: %s\n\n" % photo.name, caption, source, more_info and I've always had to put parentheses around the values on the right hand side of the % like this ... write_info = "name: %s\n caption: %

Re: Django Upload Image Help

2011-12-12 Thread Reinout van Rees
On 12-12-11 19:25, cmc wrote: I am trying to use django to upload images but its not working as expected. Here is what I'm working with Ehm, you're not telling us what goes wrong or unexpected :-) There's one thing that I see in your code that might be a problem: #handle_uploaded_image.py

Django Upload Image Help

2011-12-12 Thread cmc
I am trying to use django to upload images but its not working as expected. Here is what I'm working with #handle_uploaded_image.py def handle_uploaded_image(photo, caption, source, more_info): photo_dir = '%s/uploaded_photos/Not_Published/%Y/%m/%d' % settings.MEDIA_ROOT photo

Re: Django admin upload image to few folders

2011-07-29 Thread christian.posta
rms.ModelForm): >     class Meta: >         model = UploadModel > > from filetransfers.api import serve_file > > def download_handler(request, pk): >     upload = get_object_or_404(UploadModel, pk=pk) >     return serve_file(request, upload.file) > > On Jul 23, 1:1

Re: Django admin upload image to few folders

2011-07-28 Thread Jonathan of Cambridge
Meta: model = UploadModel from filetransfers.api import serve_file def download_handler(request, pk): upload = get_object_or_404(UploadModel, pk=pk) return serve_file(request, upload.file) On Jul 23, 1:17 am, Vusal Alishov wrote: > Hello, I want to upload image in django

Django admin upload image to few folders

2011-07-23 Thread Vusal Alishov
Hello, I want to upload image in django-admin interface to few folders. My models image field such: image = models.ImageField(upload_to='images') How can I do it? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to th

Re: Upload image using GET

2011-05-01 Thread Javier Guerra Giraldez
On Sun, May 1, 2011 at 11:53 PM, Matias Hernandez Arellano wrote: > i only use this to test > def upload_image(request): >    if request.method == 'POST': >        return "request.FILES['image']" >    return "NO imagen subida" is this your view function? if so, it should return a response object

Re: Upload image using GET

2011-05-01 Thread Matias Hernandez Arellano
yes, thanks.. i try using POST but i get a error 500 i only use this to test def upload_image(request): if request.method == 'POST': return "request.FILES['image']" return "NO imagen subida" El 01-05-2011, a las 23:11, А. Р. escribió: > 2011/5/2 Matias Hernandez Arellano <...@ar

Re: Upload image using GET

2011-05-01 Thread А . Р .
2011/5/2 Matias Hernandez Arellano <...@archlinux.cl>: > > And if it's not possible use GET to pass the image data to the django > application.. > how can i pass de data from a mobile application (without user actions like a > web form) to the django application, and upload, or copy de data into

Re: Upload image using GET

2011-05-01 Thread Matias Hernandez Arellano
Thrift: http://incubator.apache.org/thrift/ And if it's not possible use GET to pass the image data to the django application.. how can i pass de data from a mobile application (without user actions like a web form) to the django application, and upload, or copy de data into a new image?? Than

Re: Upload image using GET

2011-05-01 Thread А . Р .
2011/5/2 msdark <...@gmail.com>: > The service is written in C++ and use thrift to create a Client with > python.. so i write a simple django application like and interface to > the C++ service. What is "thrift"? Do you really mean it? > > Now i need to upload an image to the django application

Upload image using GET

2011-05-01 Thread msdark
(sorry for my english) Hi!, i have a mobile application (iOS and Android), this applciation need to upload an image (internally) to a service . The service is written in C++ and use thrift to create a Client with python.. so i write a simple django application like and interface to the C++ servic

Re: Upload image file, resize using PIL, then save into ImageField - what to save to ImageField?

2010-03-19 Thread robinne
Thanks for all your replies. I ended up using sorl-thumbnail, which I had already installed, but I didn't think it kept aspect ratio of image because you are required to enter w and h for thumbnail image size using ThumbnailField. A quick test shows that it resizes and keeps same aspect ratio. So,

Re: Upload image file, resize using PIL, then save into ImageField - what to save to ImageField?

2010-03-19 Thread CrabbyPete
The Imagefile is just a pointer to file. Here is what I do to upload and resize an image. I hope it helps. file_to_open = settings.MEDIA_ROOT+'//profiles//'+ user.username+'-'+file.name fd = open(file_to_open, 'wb+') if file.multiple_chunks(): for chunk in file

Re: Upload image file, resize using PIL, then save into ImageField - what to save to ImageField?

2010-03-18 Thread Alex Robbins
I think Satchmo uses http://code.google.com/p/sorl-thumbnail/ I think it uses PIL underneath a layer of abstraction. That might work for you if you are just wanting to generate alternate versions of uploaded images. Alex On Mar 18, 12:10 am, robinne wrote: > I can save an uploaded image to a Fil

Re: Upload image file, resize using PIL, then save into ImageField - what to save to ImageField?

2010-03-18 Thread bruno desthuilliers
On Mar 18, 6:10 am, robinne wrote: > I can save an uploaded image to a FileField like this (where > "ProductFile" is a model) and "TempFile" is an ImageField: > > uploadedfile = request.FILES['uploadfile'] > ProductFile.objects.create(FileName=UploadDate=datetime.datetime.now(), > TempFile=uploade

Upload image file, resize using PIL, then save into ImageField - what to save to ImageField?

2010-03-17 Thread robinne
I can save an uploaded image to a FileField like this (where "ProductFile" is a model) and "TempFile" is an ImageField: uploadedfile = request.FILES['uploadfile'] ProductFile.objects.create(FileName=UploadDate=datetime.datetime.now(), TempFile=uploadedfile) But, how do I manipulate the image size

Re: Upload image

2009-09-19 Thread Ramos
Hi: At the moment I just solve the problem, the pictures up. To fix the problem I did was: 1 - sudo apt-get install libjpeg62 libjpeg62-dev 2 - sudo easy_install - find-links http://www.pythonware.com/products/pil/ Imaging 3 - sudo invoke-rc.d apache2 restart While in another server

Re: Upload image

2009-09-19 Thread Ramos
Hi: Mike Ramirez Thanks for your response so quickly. I install what I recommended, but continued presenting the same problem. On Sat, 2009-09-19 at 17:14 -0700, Mike Ramirez wrote: > On Saturday 19 September 2009 16:49:49 Ramos wrote: > > imagingtk.c:20:16: error: tk.h: No such file or di

Re: Upload image

2009-09-19 Thread Mike Ramirez
On Saturday 19 September 2009 16:49:49 Ramos wrote: > imagingtk.c:20:16: error: tk.h: No such file or directory > To install PIL, you'll need the tk8.4-dev package I believe. http://packages.ubuntu.com/hardy/i386/tk8.4-dev/filelist (not sure what the latest version of tk is for hardy), Once PI

Re: Help to Upload image

2008-11-01 Thread Low Kian Seong
Yeah, if in doubt you can use the forms.as_p first to see what kind of html form it outputs and use that as the basis for creating your form. On Thu, Oct 30, 2008 at 7:05 PM, Giles Thomas <[EMAIL PROTECTED]> wrote: > > please smile wrote: >> Can anybody please tell how to upload a image ?

Re: Help to Upload image

2008-10-30 Thread Giles Thomas
please smile wrote: > Can anybody please tell how to upload a image ? I'm new to this myself, but I got something working using Django's forms mechanism. My view function looks something like this: --- class MyForm(ModelForm): class Meta: model =

Help to Upload image

2008-10-30 Thread please smile
Hi All, Can anybody please tell how to upload a image ? models.py class photos(models.Model): caption = models.CharField(max_length=10) photo = models.ImageField(upload_to= 'Path') It works at Admin Side .But not working at client side. MyHtml.html

Re: Upload image in own form

2008-08-21 Thread Robvdl
Thank you very much, this worked perfectly. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send

  1   2   >