How to set uploaded imagefield image size both in forms or models

2022-12-15 Thread Raeesh 23
How to set uploaded imagefield image size both in forms or models -- 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...@google

PIL obj to ImageField

2022-01-22 Thread Robert Englund
Hello I have big problems with saving PIL objects to imagefield. see my code below. There are many solutions when searching on Google but none work for me. What is the easiest way to save an image from url to ImageField? # return Pil image def get_img_from_url(url

Re: CSRF token missing on models with a file/imagefield

2021-12-28 Thread Yorben Verhoest
ere. >> >> Now I'm trying to figure out why my POST data is empty only on models >> where an filefield or imagefield is defined... >> >> On Tuesday, 21 December 2021 at 07:59:31 UTC+1 Yorben Verhoest wrote: >> >>> Yes, I'm just using the DjangAdmin i

Re: CSRF token missing on models with a file/imagefield

2021-12-28 Thread Sebastian Jung
e I wrote a custom CSRFfailureview where I print out my > request data. > > The reason I get a csrf is missing error is because that token is also > stored in there. > > Now I'm trying to figure out why my POST data is empty only on models > where an filefield or imagefield is

Re: CSRF token missing on models with a file/imagefield

2021-12-27 Thread Yorben Verhoest
out why my POST data is empty only on models where an filefield or imagefield is defined... On Tuesday, 21 December 2021 at 07:59:31 UTC+1 Yorben Verhoest wrote: > Yes, I'm just using the DjangAdmin interface > > It works perfectly for models without any filefield / imagefield > Fir

Re: CSRF token missing on models with a file/imagefield

2021-12-20 Thread Yorben Verhoest
Yes, I'm just using the DjangAdmin interface It works perfectly for models without any filefield / imagefield First I thought that the connection between the app and the s3 bucket was wrong, but when I test i through the shell, it works. On Monday, 20 December 2021 at 19:50:28 UTC+1 phoebeb

Re: CSRF token missing on models with a file/imagefield

2021-12-20 Thread Phoebe Bright
e > data in it. > All of my models work fine when I try to save them except the ones that > have a filefield or imagefield in them. When I save those, I get a 403 - > CSRF token missing error. > > The weird thing is, working on localhost, It works perfectly, it even > saves the file

CSRF token missing on models with a file/imagefield

2021-12-20 Thread Yorben Verhoest
I have a project which is set up on AWS using lambda, s3, ... Because it is still in production we are using DjangoAdmin to manage the data in it. All of my models work fine when I try to save them except the ones that have a filefield or imagefield in them. When I save those, I get a 403

Re: with templated-docs: how to insert images from an ImageField

2021-01-19 Thread Diptesh Choudhuri
ated_docs/>. This module > lets you create OTD templates in LibreOffice and render them to PDF inside > a django view. > > This works great for complex documents with text, but I have no clue how > to insert images as well. The images come from an ImageField in the table

with templated-docs: how to insert images from an ImageField

2021-01-19 Thread Fenrir Sivar
o clue how to insert images as well. The images come from an ImageField in the table from which I get the info that goes into the document. does anyone have experience how to create reports with images? I'm open towards something else than templated-docs -- You received this message becau

Re: Django Saving a form with Imagefield on shared host

2020-07-11 Thread Stanley Valentin
AWS or GOOGLE CLOUD SERVICES for that. > > On Sun, Jun 14, 2020 at 2:46 PM MUGOYA DIHFAHSIH > wrote: > >> I am working on django project and now i have deployed it with Namecheap >> When i submit a form that does not have an ImageField, the form submits >> successful

Re: Django Saving a form with Imagefield on shared host

2020-07-11 Thread Mostaq mahmud
directory in my project root. I have deployed > the web app the static files such as css and images are working fine, but > when i try to submit a form that has imagefield into the database, it > throws 404 error. I know it has to deal with the Aoache web server and the > mod_wsgi bu

Re: Django Saving a form with Imagefield on shared host

2020-06-17 Thread MUGOYA DIHFAHSIH
@Mangla, essentially what i want to do is to serve uploaded images on a shared host through the media directory in my project root. I have deployed the web app the static files such as css and images are working fine, but when i try to submit a form that has imagefield into the database, it throws

Re: Django Saving a form with Imagefield on shared host

2020-06-17 Thread Kelvin Sajere
If you indeed have your media folder where it’s supposed to be, then make sure in your settings file, you have specified that folder as your root folder for media. I don’t see your code, so this might be difficult to determine on my end. -- KeLLs -- You received this message because you are

RE: Django Saving a form with Imagefield on shared host

2020-06-17 Thread Vishesh Mangla
with Imagefield on shared host I am working on django project and now i have deployed it with NamecheapWhen i submit a form that does not have an ImageField, the form submits successfully on the shared hostbut when i submit a form with one of the fields ImageField, it raises 404 error.but on the localhost

Re: Django Saving a form with Imagefield on shared host

2020-06-16 Thread MUGOYA DIHFAHSIH
now i have deployed it with Namecheap > When i submit a form that does not have an ImageField, the form submits > successfully on the shared host > but when i submit a form with one of the fields ImageField, it raises 404 > error. > but on the localhost, the forms work perfe

Re: Django Saving a form with Imagefield on shared host

2020-06-15 Thread Kelvin Sajere
t does not have an ImageField, the form submits > successfully on the shared host > but when i submit a form with one of the fields ImageField, it raises 404 > error. > but on the localhost, the forms work perfectly. > what can i do to submit such forms on a shared host. > Thank

Django Saving a form with Imagefield on shared host

2020-06-14 Thread MUGOYA DIHFAHSIH
I am working on django project and now i have deployed it with Namecheap When i submit a form that does not have an ImageField, the form submits successfully on the shared host but when i submit a form with one of the fields ImageField, it raises 404 error. but on the localhost, the forms work

Using Rest API i want to Put ImageField ie. ImageFile in Hadoop (HDFS)

2019-08-22 Thread Saurabh Dubey
So, I want to connect Django with Hadoop File system. That is if I send the images from postman using POST Request in Django. that data will directly stored into HDFS (Hadoop Distribution file system). send me some idea or solution for connection. and storage files in hadoop using Django Rest

ImageField attributes

2019-06-18 Thread Luka Nik
for ImageField both attributes exist. -- 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,

Re: What validation tests are applied to ImageField?

2018-02-20 Thread mtnhiker
wants to know how it > ends... > > In this application I'm not using a form (uploadify is a flash-based > file sender) but I can still take advantage of the django.forms > validation routines by invoking ImageField without a form. This seems > to work: > > def upload

Re: CharField vs ImageField for Logo

2017-09-26 Thread tango ward
nce on this. >>> >>> I am having trouble understanding this: >>> >>> 3: All that will be stored in your database is a path to the file >>> (relative to MEDIA_ROOT >>> <https://docs.djangoproject.com/en/1.11/ref/settings/#std:setting-MEDIA_ROOT&g

Re: CharField vs ImageField for Logo

2017-09-26 Thread Andréas Kühne
ng trouble understanding this: >> >> 3: All that will be stored in your database is a path to the file >> (relative to MEDIA_ROOT >> <https://docs.djangoproject.com/en/1.11/ref/settings/#std:setting-MEDIA_ROOT>). >> You’ll most likely want to use the convenience url >&g

Re: CharField vs ImageField for Logo

2017-09-25 Thread tango ward
11/ref/settings/#std:setting-MEDIA_ROOT>). > You’ll most likely want to use the convenience url > <https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.fields.files.FieldFile.url> > attribute provided by Django. For example, if your ImageField &g

Re: CharField vs ImageField for Logo

2017-09-25 Thread tango ward
to use the convenience url <https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.fields.files.FieldFile.url> attribute provided by Django. For example, if your ImageField <https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ImageField> is ca

Re: CharField vs ImageField for Logo

2017-09-25 Thread Andréas Kühne
work. HOWEVER, I really >> think you should use the media storage functionality of Django for this. >> Checkout : https://docs.djangoproject.com/en/1.11/topics/files/. >> >> If you add the settings required (MEDIA_ROOT in the settings file) and >> then change you logo fr

Re: CharField vs ImageField for Logo

2017-09-25 Thread tango ward
tionality of Django for this. > Checkout : https://docs.djangoproject.com/en/1.11/topics/files/. > > If you add the settings required (MEDIA_ROOT in the settings file) and > then change you logo from a CharField to an ImageField AND upload your file > via django admin, you should be able to show your file

Re: CharField vs ImageField for Logo

2017-09-25 Thread Andréas Kühne
, I really think you should use the media storage functionality of Django for this. Checkout : https://docs.djangoproject.com/en/1.11/topics/files/. If you add the settings required (MEDIA_ROOT in the settings file) and then change you logo from a CharField to an ImageField AND upload your file via

CharField vs ImageField for Logo

2017-09-25 Thread tango ward
Hi guys, I am new to django currently stuck in these two. I am writing my pet project which will display a Team name and their logo. I used these lines for my Team class in mode.spy class Team(models.Model): name = models.CharField(max_length=150) logo = models.CharField(null=True,

Re: ImageField always calling update_dimensions_fields

2016-12-04 Thread ggilley
null=True, editable=False, default="0") image = ImageField(upload_to=upload_to, width_field='width', height_field='height') user = models.ForeignKey(settings.AUTH_USER_MODEL, related_name="uploaded_photos") title = models.CharField(max_length=255) slug =

Re: ImageField always calling update_dimensions_fields

2016-12-04 Thread Daniel Roseman
On Sunday, 4 December 2016 00:47:06 UTC, ggi...@gmail.com wrote: > > > I needed to get to the width and height of an image. After discovering > that doing so on an ImageField loads the file, I added width_field and > height_field to my model. > > I did a migration and s

ImageField always calling update_dimensions_fields

2016-12-03 Thread ggilley
I needed to get to the width and height of an image. After discovering that doing so on an ImageField loads the file, I added width_field and height_field to my model. I did a migration and starting using the new model. However, it *always* seems to call update_dimension_fields every time

Re: Extending FieldField (the way ImageField does)

2016-11-20 Thread Michal Petrucha
On Sat, Nov 19, 2016 at 01:34:31PM -0800, Serge Wroclawski wrote: > Hi all, > > I've been a casual user of Django for years, but recently have need to make > a new field based on FileField. I decided to take a look at ImageField, > since it is very similar to what I'm doing. &g

Extending FieldField (the way ImageField does)

2016-11-19 Thread Serge Wroclawski
Hi all, I've been a casual user of Django for years, but recently have need to make a new field based on FileField. I decided to take a look at ImageField, since it is very similar to what I'm doing. Specifically I'm looking at using mutagen (python-mutagen) to get information about audio

Re: problem in converting PIL image object to django file object for saving in imagefield model type

2016-09-10 Thread ali Eblice
,os.SEEK_END), None) #give your file to InMemoryUploadedFile to create django imagefield object #take look at this link to find out to import what things: https://groups.google.com/d/msgid/django-users/a4685c6c-f136-4d5f-8230-edb08fb30c36%40googlegroups.com On Saturday, September 10

Re: problem in converting PIL image object to django file object for saving in imagefield model type

2016-09-10 Thread ludovic coues
. That should be equal to the size. 2016-09-10 9:49 GMT+02:00 ali Eblice <aliebl...@gmail.com>: > Hi everybody > I wanted to save PIL image object in model ImageField , but before doing > that i have to convert PIL image object to django file-like object > I found a solution with string

problem in converting PIL image object to django file object for saving in imagefield model type

2016-09-10 Thread ali Eblice
Hi everybody I wanted to save PIL image object in model ImageField , but before doing that i have to convert PIL image object to django file-like object I found a solution with stringIO but the problem is that in this solution " io_object.len" is used and "len" is not avail

Custom imagefield to accept base64 string

2016-06-04 Thread Ruud Schroen
tring and converts it to an image" def __init__(self, upload_extension="png", *args, **kwargs): self.upload_extension = upload_extension super(Base64ToImageField, self).__init__(*args, **kwargs) def get_internal_type(self): return 'ImageField' def t

ImageField | error

2016-05-30 Thread Erick Brockes
Folks, I'm using django 1.9. I'm having the following problem. When I update the object of Pessoa, described below, I receive the following error message: "i/o operation on closed file". Does anyone have any solution. Thanks. Erick models.py class Pessoa(models.Model): ...

Re: ImageField isn't working

2015-02-19 Thread Valéria Pacheco
> Hello! I'm a newbie in Django and Python, I'm trying to use the ImageField > property. > The problem is represented in the attachment images. > The uploading of the image works fine, but when trying to access it, the > link seems to be broken. > I already checked for a

Re: ImageField isn't working

2015-02-19 Thread Tom Lockhart
On Feb 19, 2015, at 8:03 AM, Valéria Pacheco <valeriacspach...@gmail.com> wrote: > Hello! I'm a newbie in Django and Python, I'm trying to use the ImageField > property. > The problem is represented in the attachment images. > The uploading of the image works fine, but whe

Re: ImageField isn't working

2015-02-19 Thread Jorge Andrés Vergara Ebratt
ng to use the ImageField > property. > The problem is represented in the attachment images. > The uploading of the image works fine, but when trying to access it, the > link seems to be broken. > I already checked for answers online but neither seems to work. > > -- > You

Re: ImageField isn't working

2015-02-19 Thread Lucas Klassmann
<valeriacspach...@gmail.com > wrote: > Hello! I'm a newbie in Django and Python, I'm trying to use the ImageField > property. > The problem is represented in the attachment images. > The uploading of the image works fine, but when trying to access it, the > link seems to be broken

Re: upload_to for ImageField changes name of file being uploaded

2015-02-03 Thread Tom Evans
On Tue, Feb 3, 2015 at 7:22 AM, bradford li wrote: > There is bounty on this stackoverflow question is anyone is interested > It looks like it has already been answered multiple times - you cannot upload a file in to a subdirectory of MEDIA_ROOT and have its name attribute

Re: upload_to for ImageField changes name of file being uploaded

2015-02-02 Thread bradford li
There is bounty on this stackoverflow question is anyone is interested On Thursday, January 29, 2015 at 12:35:22 AM UTC-8, bradford li wrote: > > I posted a question on stackoverflow regarding my issue: > > > http://stackoverflow.com/questions/28205560/upload-to-value-changes-photo-name-attribute

upload_to for ImageField changes name of file being uploaded

2015-01-29 Thread bradford li
I posted a question on stackoverflow regarding my issue: http://stackoverflow.com/questions/28205560/upload-to-value-changes-photo-name-attribute Basically upload_to value will change my ImageField.name to the upload_to value -- You received this message because you are subscribed to the

Re: can't install the pillow library on my first attempt to add an ImageField to my model

2015-01-21 Thread aseds
>> >> On Wednesday, January 21, 2015 at 6:13:23 AM UTC-8, Vijay Khemlani wrote: >>> >>> You need to install the development python package for your distro >>> >>> For example, in Ubuntu >>> >>> sudo apt-get install python-dev

Re: can't install the pillow library on my first attempt to add an ImageField to my model

2015-01-21 Thread Vijay Khemlani
python-dev >> >> in Fedora >> >> sudo yum install python-devel >> >> On Wed, Jan 21, 2015 at 10:44 AM, aseds <s.sami@gmail.com> wrote: >> >>> hi, >>> this is the first time i tried and added an ImageField to my model. >>>

Re: can't install the pillow library on my first attempt to add an ImageField to my model

2015-01-21 Thread aseds
all the development python package for your distro > > For example, in Ubuntu > > sudo apt-get install python-dev > > in Fedora > > sudo yum install python-devel > > On Wed, Jan 21, 2015 at 10:44 AM, aseds <s.sami@gmail.com > > wrote: > >>

Re: can't install the pillow library on my first attempt to add an ImageField to my model

2015-01-21 Thread Vijay Khemlani
ed and added an ImageField to my model. then > i did makemigrations > ./manage.py makemigrations > > but it said that i should do: > pip install pillow > (the django documentation says it's a required library too...) > > doing so, it gave me some errors: > ~/W/d/mysite>

can't install the pillow library on my first attempt to add an ImageField to my model

2015-01-21 Thread aseds
hi, this is the first time i tried and added an ImageField to my model. then i did makemigrations ./manage.py makemigrations but it said that i should do: pip install pillow (the django documentation says it's a required library too...) doing so, it gave me some errors: ~/W/d/mysite>

Crispy form Change default text shown for ImageField when not empty

2014-08-14 Thread Subodh Nijsure
Hello, I have following field in my model. photo = models.ImageField(null=True,blank=True,upload_to="product_images") I have defined the following layout in forms.py for this field, while using crispy-form self.fields['photo'].label = "Asset Image" self.helper.layout = Layout( 'photo',

Remove old image file of ImageField

2014-02-22 Thread Fabrizio Alongi
Hi, I've my django model with an ImageField. When I update (upload) a new image with the ImageField, the older image file remains in Media Folder. *How can I remove the old files when I update ImageField??* What is the best, clear, and simple approach to solve this problem? I've read a lot

Re: UpdateView and ImageField style

2013-12-13 Thread BikerJim
will allow you to use the FileInput widget > and avoid the extraneous text (generated by the default widget for > ImageField). Said form could look similar to this: > > ### forms.py > from django import forms > > from .models import UserProfile > > > class UserPro

Re: UpdateView and ImageField style

2013-12-12 Thread Jonathan Baker
the extraneous text (generated by the default widget for ImageField). Said form could look similar to this: ### forms.py from django import forms from .models import UserProfile class UserProfileEditForm(forms.ModelForm): mugshot = forms.ImageField(required=False, widget=forms.FileInput

UpdateView and ImageField style

2013-12-12 Thread BikerJim
Hi, First post, be gentle :), I cant find a solution here or on StackOverflow, which either means that I am missing something obvious, or the answer is 'you cant', or I am googling for the wrong thing. I am using Django 1.6 on Kubuntu with PIL... I have a simple UserProfile with an image

Security Advisory: ImageField abuse

2013-12-02 Thread Jacob Kaplan-Moss
Hi folks - We've just published a short security advisory about ImageFields: https://www.djangoproject.com/weblog/2013/dec/02/image-field-advisory/ ImageField expects a valid image file, but depending on your app it may allow uploads on non-image content, such as HTML or JavaScript

Providing browse from uploads button for ImageField

2013-10-13 Thread Burak Emre Kabakcı
Is it possible to change field type when saving a model to database? I have an ImageField and I want to put a button for choosing an image already uploaded. I know that ImageField acts like CharField when saving data to database but it uses multipart/form-data so it doesn't see POST data when

Re: problem with ImageField does not show me the picture on a template

2013-05-23 Thread Ronny Villarroel Mendoza
Thanks a lot. I do the following steps: aggregate an alias to the virtual host of my site: Alias /media /var/www/fourweb/media/ and modified: settings.MEDIA_ROOT = '/var/www/fourweb/media/' settings.MEDIA_URL = 'http://fourweb.com/media/' it works!. Cheers Ronny El martes, 21 de mayo de 2013

Re: problem with ImageField does not show me the picture on a template

2013-05-22 Thread Tom Evans
On Wed, May 22, 2013 at 2:10 AM, Ronny Villarroel Mendoza wrote: > Hi all, > > I cant show the picture that I upload from the admin site. > > > settings.py: > > MEDIA_ROOT = '/var/www/fourweb/' > > > > models.py: > > class picture(models.Model): > producto_id =

django ImageField ignores upload_to kwarg

2013-03-21 Thread tomasz ducin
I've fallen into a problem with resolving the correct url of uploaded images. I've made sure that my routing/templates work correctly and the problem is somewhere inside the model layer. This is my model class: from django.db import models from tinymce.models import HTMLField class

Re: Problems doing ajax post with ImageField

2013-02-10 Thread Jani Tiainen
Hi, There is no way to save files through XHR, (not at least without HTML5 features). One quite common approach is to use temporary, hidden iframe where form is duplicated along the filefield and then submit that form as normal page submit and then to read response one way or another. I

Problems doing ajax post with ImageField

2013-02-10 Thread bobhaugen
Here's the relevant parts of the model: class Resource(models.Model): photo = ThumbnailerImageField(_("photo"), upload_to='photos', blank=True, null=True) This works fine in admin and with regular form posts. Trying to use jquery.post in one situation to post a photo without

Re: ImageField upload_to issue

2013-01-26 Thread Sammael
I'm terribly sorry, my bad. Of course, the second example is: class Image(models.Model): image = models.ImageField(upload_to = upload_path('i'), blank=True) thumbnail = models.ImageField(upload_to = upload_path('t'), blank=True) суббота, 26 января 2013 г., 3:58:55 UTC+4

Re: ImageField upload_to issue

2013-01-25 Thread Leonardo S
There is no t_upload_path 2013/1/25 Sammael > Hello, folks! > > Here is the relevant part of my model: > > def i_upload_to(instance, filename): > return '/'.join([strftime('i/%y%m/%d'), filename]) > > def t_upload_to(instance, filename): > return

ImageField upload_to issue

2013-01-25 Thread Sammael
Hello, folks! Here is the relevant part of my model: def i_upload_to(instance, filename): return '/'.join([strftime('i/%y%m/%d'), filename]) def t_upload_to(instance, filename): return '/'.join([strftime('t/%y%m/%d'), filename]) class Image(models.Model):

imagefield

2013-01-14 Thread Randa Hisham
how to hide tag change and currently from imagefield and show only fileinput and imageurl -- Randa Hesham Software Developer Twitter:@ro0oraa <http://twitter.com/#%21/ro0oraa> FaceBook:Randa Hisham <http://www.facebook.com/Ro0oraaa> ٍ -- You received this message because you ar

Re: Trouble Accessing An Image through ImageField

2012-12-23 Thread Ankush
Hi, I think , first of all, you should have tags around the url. . if you are able to get the image if you direct your browser to http://192.0.0.1:8000/images/photo.jpg ? if yes, then the above is the solution . If not then you should set your image files to be served as setatic files. This

Trouble Accessing An Image through ImageField

2012-12-23 Thread That guy
Hi there, I'm trying to create a photo gallery by storing photos in a gallery database and pulling them out when appropriate. However, I ran into the problem of how to publicly expose the pictures in urls. In my template, I return a the url of the photo which turns out to be

Re: ImageField in admin always required

2012-12-16 Thread Detectedstealth
Thanks required=False is what I needed :). "ImageField is not required as expected" Isn't that what you want? :) Yes that is exactly what I wanted but also wanted to display the actual setting the required=False allows me to have my cake and eat it too :). Not sure why require

Re: ImageField in admin always required

2012-12-12 Thread Chris Cogdon
NOTE: I tried adding null=True, blank=True to forms.ImageField however I > get errors __init__() got an unexpected keyword argument so I guess I can't > use them options. If I comment out the def formfield_for_dbfield(self, > db_field, **kwargs): then the ImageField is not

Re: ImageField in admin always required

2012-12-12 Thread Detectedstealth
ImageField however I get errors __init__() got an unexpected keyword argument so I guess I can't use them options. If I comment out the def formfield_for_dbfield(self, db_field, **kwargs): then the ImageField is not required as expected. On Thursday, December 6, 2012 2:47:57 PM UTC-8, Detectedste

ImageField in admin always required

2012-12-06 Thread Detectedstealth
Hi, I have a picture for my custom user declared as follows: class CustomUser(AbstractBaseUser): picture = models.ImageField(upload_to='profile_pictures', null=True, blank=True) In admin I use the image class CustomUserAdmin(UserAdmin): fieldsets( ('Profile details', {

Re: Django ImageField causes 503

2012-09-02 Thread Zeeshan Syed
One other thing I forgot to mention is that we're hosting on Amazon EC2 using Nginx. Zee On Sunday, September 2, 2012 3:46:27 PM UTC-4, Zeeshan Syed wrote: > > Hi there, > > In the models of one of our apps I'm including an ImageField for several > of the fields for som

Django ImageField causes 503

2012-09-02 Thread Zeeshan Syed
Hi there, In the models of one of our apps I'm including an ImageField for several of the fields for some of the models. The images we upload are being stored using AWS S3 Storage. On a local machine, the site works fine and the images are uploading. However on our sandbox server, when I try

Re: [ImageField -Upload a valid image]

2012-08-20 Thread Thomas Orozco
I'd you believe PIL is not picking up your libjpeg when it should be, you could give Pillow a shot ; its basically a PIL installer that makes installation easier. Le 20 août 2012 22:30, "Kurtis Mullins" a écrit : > Whenever you compile PIL, make sure that libjpeg is

Re: [ImageField -Upload a valid image]

2012-08-20 Thread Kurtis Mullins
Whenever you compile PIL, make sure that libjpeg is available to it. You should see a message showing you what is available when you install PIL. On Mon, Aug 20, 2012 at 3:33 PM, MN TS wrote: > Yes. > > Png and GIF are ok. > > > On Mon, Aug 20, 2012 at 8:00 PM, Amyth Arora

Re: [ImageField -Upload a valid image]

2012-08-20 Thread MN TS
Yes. Png and GIF are ok. On Mon, Aug 20, 2012 at 8:00 PM, Amyth Arora wrote: > did you try uploading any other images ? > > > On Mon, Aug 20, 2012 at 12:58 AM, MN TS wrote: > > Hello everybody. > > > > I've problem. When i upload image and submit i

Re: [ImageField -Upload a valid image]

2012-08-20 Thread Amyth Arora
did you try uploading any other images ? On Mon, Aug 20, 2012 at 12:58 AM, MN TS wrote: > Hello everybody. > > I've problem. When i upload image and submit i got follow form error. >- Upload a valid image. The file you uploaded was either not an image or > a corrupted

[ImageField -Upload a valid image]

2012-08-19 Thread MN TS
Hello everybody. I've problem. When i upload image and submit i got follow form error. - Upload a valid image. The file you uploaded was either not an image or a corrupted image. I reinstall PIL (1.1.7) and setup.py file edit like JPEG_ROOT = '/usr/lib/i386-linux-gnu/'. Thanks -- You

Re: SuspiciousOperation exception on ImageField upload

2012-07-19 Thread Thomas Orozco
Reports/%Y%m%d >> >> And the first back slash is must. I can't remove that. So please let me >> know how can i handle this case. >> >> Thanks, >> Binny >> >> >> On Tuesday, August 19, 2008 6:17:16 PM UTC+5:30, Jon Atkinson wrote: >>> &

Re: SuspiciousOperation exception on ImageField upload

2012-07-18 Thread Sithembewena Lloyd Dube
t. So please let me > know how can i handle this case. > > Thanks, > Binny > > > On Tuesday, August 19, 2008 6:17:16 PM UTC+5:30, Jon Atkinson wrote: >> >> Hello, >> >> I'm trying to work with a model which accepts a logo image upload via >> an Imag

Re: SuspiciousOperation exception on ImageField upload

2012-07-18 Thread binny
Atkinson wrote: > > Hello, > > I'm trying to work with a model which accepts a logo image upload via > an ImageField. My a cut down version of my model is below: > > class Promoter(models.Model): > name = models.CharField(max_length=100) > logo = models.Im

Re: Store base64 data in database with imagefield ?

2012-05-16 Thread bussiere bussiere
Thanks all But there is nothing to do it from imagefield directly ? Because if someone use the admin interface ? (mayber i've misread what you gave). regards Bussiere "Les nouvelles technologies offrent pleins de nouvelles possibilités, pleins de possibilités d'erreurs surtout en

Re: Store base64 data in database with imagefield ?

2012-05-15 Thread Hutch
are you sure this is actually a good idea? in almost all cases serving the image via the actual web server, whose job it is to serve images, is the best idea. either way, you wouldn't use an image field to store base64 data. that's for references to actual files in a filesystem. first you'd

Re: Store base64 data in database with imagefield ?

2012-05-15 Thread Frank Stüss
Hi, maybe you could use http://djangosnippets.org/snippets/1669/ Greetings Am Dienstag, den 15.05.2012, 17:36 +0530 schrieb Nikhil Verma: > Hi > > I had similar situation where a textfield (which was made a markup > editor by applying css and all) was given where people come in write >

Re: Store base64 data in database with imagefield ?

2012-05-15 Thread Nikhil Verma
Hi I had similar situation where a textfield (which was made a markup editor by applying css and all) was given where people come in write anything and discuss about their topics; you can imagine like a forum. So i made some regular expressions to allow videos to show in an iframe and image to

Store base64 data in database with imagefield ?

2012-05-15 Thread bussiere bussiere
Does anyone tried to store only Base64 info in databse of an image instead of a file with django image field ? Do you have any idea how to do it ? Or some hints to give me ? regards and thanks Bussiere "Les nouvelles technologies offrent pleins de nouvelles possibilités, pleins de

Re: How to use ImageField??

2012-05-08 Thread Phang Mulianto
u read the official >> documentation<https://docs.djangoproject.com/en/dev/howto/static-files/> >> . >> >> >> >> On Mon, May 7, 2012 at 7:17 PM, atul khairnar <atulnkhair...@gmail.com>wrote: >> >>> Hi, >>> I am writing this Im

Re: How to use ImageField??

2012-05-07 Thread Boris Shemigon
ficial > documentation<https://docs.djangoproject.com/en/dev/howto/static-files/> > . > > > > On Mon, May 7, 2012 at 7:17 PM, atul khairnar <atulnkhair...@gmail.com>wrote: > >> Hi, >> I am writing this ImageViewer app, just to get involved with Django. I

Re: Permission denied when saving a record with an ImageField in the model

2012-03-17 Thread Jonathan Baker
gt;> Thanks. >>> >>> >>> On Sat, Mar 17, 2012 at 6:13 PM, Jonathan D. Baker < >>> jonathandavidba...@gmail.com> wrote: >>> >>>> You need to make sure your server has write permissions on the >>>> home/projects directory. >>>

Re: Permission denied when saving a record with an ImageField in the model

2012-03-17 Thread Sithembewena Lloyd Dube
sions on the >>> home/projects directory. >>> >>> Sent from my iPhone >>> >>> On Mar 17, 2012, at 9:02 AM, Sithembewena Lloyd Dube <zebr...@gmail.com> >>> wrote: >>> >>> Hi all, >>> >>> I have a model with

Re: Permission denied when saving a record with an ImageField in the model

2012-03-17 Thread Jonathan Baker
17, 2012, at 9:02 AM, Sithembewena Lloyd Dube <zebr...@gmail.com> >> wrote: >> >> Hi all, >> >> I have a model with an ImageField and when I try to save a record in the >> admin site, I get the following: >> >> Environment: >> >> &

Re: Permission denied when saving a record with an ImageField in the model

2012-03-17 Thread Sithembewena Lloyd Dube
make sure your server has write permissions on the > home/projects directory. > > Sent from my iPhone > > On Mar 17, 2012, at 9:02 AM, Sithembewena Lloyd Dube <zebr...@gmail.com> > wrote: > > Hi all, > > I have a model with an ImageField and when I tr

Re: Permission denied when saving a record with an ImageField in the model

2012-03-17 Thread Jonathan D. Baker
You need to make sure your server has write permissions on the home/projects directory. Sent from my iPhone On Mar 17, 2012, at 9:02 AM, Sithembewena Lloyd Dube <zebr...@gmail.com> wrote: > Hi all, > > I have a model with an ImageField and when I try to save a record in the

Re: Adding ImageField to Existing Models Results in Errors...and Confusion

2012-03-02 Thread 赵帅
can refer to https://docs.djangoproject.com/en/1.3 for more details. 2012/3/3 DF <donfernan...@gmail.com> > I'm currently working on my first Django project and have hit a > roadblock in regard to adding an ImageField to an existing model. > > I currently have a model for a user postin

Adding ImageField to Existing Models Results in Errors...and Confusion

2012-03-02 Thread DF
I'm currently working on my first Django project and have hit a roadblock in regard to adding an ImageField to an existing model. I currently have a model for a user posting content and one for django- profiles. For the former, I added an ImageField so the used can submit a photo to accompany

Re: ImageField filename

2012-01-27 Thread Damian Soriano (Gmail)
You can define a function that returns the path to upload the image, in this function you receive as argument the object being saved (instance) and the name of the file (filename). You can return whatever you want as a path (that include the filename) def upload_path(instance, filename):

Re: ImageField filename

2012-01-27 Thread wayne
This is the same as the FileField. The UploadedFile class has a name property, which can be used.. https://docs.djangoproject.com/en/dev/topics/http/file-uploads/#handling-uploaded-files On Jan 19, 9:56 am, Mike Dewhirst wrote: > How do I get the actual filename of the

ImageField filename

2012-01-18 Thread Mike Dewhirst
How do I get the actual filename of the uploaded image? The docs mention ... FileField.upload_to A local filesystem path that will be appended to your MEDIA_ROOT setting to determine the value of the url attribute. ... and presumably the widget which uploads the image knows the filename to

  1   2   3   4   5   6   >