Questions tagged [django-media]

237 questions
0
votes
4 answers

Django not show images

Pls tell me. Why ../static/image.jpg show images, and ../media/image.jpg now show Need write url? Need change Setting? i dont fiend answer in documentation. pls help. 2 night search answer. Need upload from admin-panel photo and show in…
Dimon Kudimon
  • 53
  • 3
  • 7
0
votes
2 answers

How to delete all django media so I can start fresh?

This might be a simple question, but I just thought I'd double check. If I delete all of the objects in my django db that are linked to user uploaded media files, can I then manually delete everything in my media directory? I noticed when objects…
stephan
  • 2,293
  • 4
  • 31
  • 55
0
votes
2 answers

Strange MEDIA_ROOT location

I'm using wysiwyg redactor for admin page. So I can add some images to my articles. Firstly, In settings.pyI wrote: REDACTOR_UPLOAD = '/media/uploads/' MEDIA_ROOT = '/media/' MEDIA_URL = '/media/' in this case, all uploaded images are in…
Andrew
  • 391
  • 2
  • 4
  • 12
0
votes
1 answer

image2 django-ckeditor plugin: configure url

I've added the plugin image2 to my django-ckeditor. When I upload the image there are two new lines at the server log: [Wed Nov 05 14:54:26 2014] [error] WARNING 2014-11-05 14:54:26,419 base 10867 139681117435872 Not Found:…
sogeking
  • 1,216
  • 2
  • 14
  • 45
0
votes
2 answers

Prevent users from seeing other user's uploaded pictures

I have a django applications that uses multi-users. Users can upload pictures on the system.I have created a picture model that has a foreignKey of a users to know which user uploaded which picture. class Picture(models.Model): picture =…
Apostolos
  • 7,763
  • 17
  • 80
  • 150
0
votes
1 answer

two copies of images are stored each time I upload an image in django?

when I upload an image, i see it uploaded twice in my project. The two locations are /Users/myproject/media/ and /Users/myproject/media/assets/uploaded_files/username/. I expect the image to be uploaded only to the latter. why two copies are…
brain storm
  • 30,124
  • 69
  • 225
  • 393
0
votes
1 answer

Issue in loading user uploaded images in Django

My urls.py urlpatterns = patterns('', # Examples: # url(r'^$', 'photo.views.home', name='home'), # url(r'^photo/', include('photo.foo.urls')), # Uncomment the admin/doc line below to enable admin documentation: url(r'^admin/doc/',…
Neil
  • 1,715
  • 6
  • 30
  • 45
0
votes
2 answers

Django: Making alias in urls.py for amazon s3?

I am encountering a problem in setting up the URLs in Django. To serve my media files I have this Amazon S3 bucket: https://somebucket.s3.amazonaws.com/ I set the media URL inside settings.py as follows: MEDIA_URL =…
dtjokro
  • 122
  • 7
0
votes
1 answer

Displaying image held in ImageField in a django template

I'm trying to display an ImageField image in my django template. I'm doing it as such: This, however, shows an image for mysite.com/appname/appname/picturename.ext. (which I'm like 90% sure is wrong; I don't know…
River Tam
  • 3,096
  • 4
  • 31
  • 51
0
votes
1 answer

Form ImageField with custom media link (not MEDIA_ROOT)

User should upload his passport data to site. This data is private, so it will be better, if it will be placed outside of server's directories. Here is a model: passport_storage = FileSystemStorage(setting('ROOT_PATH')) class…
night-crawler
  • 1,409
  • 1
  • 26
  • 39
-1
votes
1 answer

Problems with media and migrations

have problems. 1)In production Django tries to access photos at http://"ip_address"/images/"image".jpg URL however images must be in http://"ip_address"/media/images/"image".jpg 2)I have added two more fields (alt and text) to existing model.…
mightycoder
  • 71
  • 3
  • 12
-2
votes
3 answers

Adding image as a background for a django template

I have checked a links for how to set an image as background for a div. I have tried various ways. But still am going wrong somewhere and would need some guidance... Below is my directory structure: frontend /frontend (django project) …
nidHi
  • 833
  • 3
  • 10
  • 21
1 2 3
15
16