Questions tagged [imagefield]

A place to store or display a graphic image.

"Image field" is a generic term that typically would belong in a or setting such as:

It appears to be a synonym for .

342 questions
3
votes
0 answers

Django model imagefield This field is required error

I have a django app which contains the following model: class Business(models.Model, GetDistance): business_name = models.CharField(max_length=128) . user = models.ForeignKey(User) . media_dir = models.CharField(max_length=256,…
Henri
  • 875
  • 2
  • 14
  • 22
2
votes
3 answers

Which property or method should i use to bind the ToolTip property to an ImageField Class?

In an image control that is bound within a GridView column i can set the Alt text property by using the DataAlternateTextField property.
OrElse
  • 9,709
  • 39
  • 140
  • 253
2
votes
1 answer

How can I get the full url of the image in DRF?

I am not good at English. I hope you understand. There can be multiple images in the diary. Diary and DiaryImage are in a 1:N relationship. this is my model from django.db import models from userSystem.models import User class…
han070707
  • 53
  • 4
2
votes
1 answer

Django : Media Images not displayed in templates

I am trying to create a blog and to display image for each post. i am trying to display user-uploaded images on a webpage. When I upload the image files using the Django admin interface (I made a model for Post images with an ImageField), the image…
2
votes
1 answer

Error on uploading image in django: "coercing to Unicode: need string or buffer, tuple found"

Trying to work with ImageField in django. Here are my models class Album(models.Model): title = models.CharField(max_length=100) def __unicode__(self): return self.title class Photo(models.Model): image =…
megido
  • 4,135
  • 6
  • 29
  • 33
2
votes
2 answers

Invalid block tag expected 'empty' or 'endfor'. Error trying to showing a ImageField

im tryinh to use the ImageField from pillow library. And i have a problem with that. When i try to show my image, i get the error: TemplateSyntaxError at /home Invalid block tag on line 62: 'articulo.nombre_imagen.url', expected 'empty' or 'endfor'.…
Luis Bermúdez
  • 592
  • 11
  • 25
2
votes
0 answers

Django Default image for ImageField using Google Drive Storage

I'm using an ImageField to store the images of my models and implementing Google Drive Storage as a backend to store the data. However, in some cases it is necessary to load a predetermined image. So try to assign a static image from the model but…
scafrs
  • 443
  • 8
  • 20
2
votes
1 answer

Cannot upload image to MEDIA_ROOT using Mongoengine ImageField

I'm trying to upload images using Mongoengine ImageField. But after uploading a test image,I got page not found by visiting http://127.x.x.x:xxxx/media/testimage.png. Raised by: django.views.static.serve …
Lin
  • 33
  • 6
2
votes
3 answers

Add Class to Image Field in Drupal 7

I have added an image field to content type "Basic Page" and using the "Manage Displays" option have it displayed at the top of the page. However there is no styling on the image and I can't for the life of me figure out how I add a class to the…
Matthew Dolman
  • 1,732
  • 7
  • 25
  • 49
2
votes
2 answers

Can't set ImageField url attribute

I want to change my ImageField's attribute, however I'm constantly getting the Can't set attribute error. My model is class Society(models.Model): name = models.CharField(max_length=200) slug = models.SlugField(unique=True) summary =…
iva123
  • 3,395
  • 10
  • 47
  • 68
2
votes
2 answers

Django ImageField upload to nfs. (No locks available)

I want to upload with a Django ImageField to a nfs storage but I get this error: [Errno 37] No locks available This is in /etc/fstab/: 173.203.221.112:/home/user/project/media/uploads/ /home/user/project/media/uploads nfs…
user568219
  • 51
  • 4
2
votes
1 answer

Image paths in Django view are relative to directory instead of MEDIA_URL

I've been struggling with this problem for a few days and unable to solve it on my own. I am working on a blog site. The post view is rendered at a URL such as this: domain.com/blog/specificpost/ I have an ImageField in my model. The images upload…
Charlie Deets
  • 109
  • 1
  • 11
2
votes
2 answers

Django imageField

I'm trying to set an imageField for upload an image on the admin page, but this error raises. no such column: series_serie.serie_cover This is the model: class Serie (models.Model): serie_name = models.CharField(max_length=100) serie_cover…
Lechucico
  • 1,914
  • 7
  • 27
  • 60
2
votes
1 answer

How to get filename of file uploaded to imagefield?

I need to past in template a filename of file which uploaded in instance imagefield. My class: def conference_directory_path(instance, filename): return 'dialogues/conferences/conference_{0}/avatar/{1}'.format(instance.id, filename) class…
Alexander Shpindler
  • 811
  • 1
  • 11
  • 31
2
votes
1 answer

SuspiciousFileOperation: Storage can not find an available filename for

I have this error after saving an avatar while creating an instance of this model (I didn't rewrite any base django model methods): BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) def conference_directory_path(instance,…
Alexander Shpindler
  • 811
  • 1
  • 11
  • 31