Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Page not found (404)
- Request URL: http://0.0.0.0:6666/the_image.jpg
- class Image(models.Model):
- product_image = models.ForeignKey(Product)
- image = models.ImageField(upload_to='/')
- MEDIA_ROOT = '/'
- MEDIA_URL = '/'
- class InlineImage(admin.TabularInline):
- model = Image
- class ProductAdmin(admin.ModelAdmin):
- inlines = [InlineImage]
- MEDIA_ROOT = /var/www/example.com/media/
- MEDIA_URL = /media
- image = models.ImageField(upload_to='image')
- from django.conf import settings
- from django.conf.urls.static import static
- urlpatterns = patterns('',
- # ... the rest of your URLconf goes here ...
- ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement