Also check the permissions on your images. I had set the
FILE_UPLOAD_PERMISSIONS to 0640 in development, but this wasn't
correct for my production server. Ensure that Apache or whatever user
the webserver is running has read access to your images.
--~--~-~--~~~---~--~--
Guys, can throw off to me to you on an e-mail my project to find an
error - why the map is not output?
I tried to do everything that to me prompted in it topic, but anything
it is impossible to me
--~--~-~--~~~---~--~~
You received this message because you are subsc
On Monday 22 June 2009 10:27:22 am Vlad(L) wrote:
> Mike, excuse that I occupy your time.
>
> All has made also, but is not present Image.
> I will write more in detail. When I instal, for example, "{{MEDIA_URL}} {{art.image}}" width=200;/> image it is not displayed
> on html page, but the place u
Mike, excuse that I occupy your time.
All has made also, but is not present Image.
I will write more in detail. When I instal, for example, image it is not displayed
on html page, but the place under a figure and together with a red
dagger in a corner is displayed. If here it is possible to load
On Monday 22 June 2009 09:14:41 am Vlad(L) wrote:
> art.html
>
> {% for art in art %}
> {{ art.title }}
> {{art.anonce }}
>
>
> {% endfor %}
>
>
This will add the media url that you set for MEDIA_URL in settings.py (as long
as the context processor for media is also set)
an ex
Ok!
views.py
from booksite.books.models import Article
from django.template import RequestContext
def art(request):
art = Article.objects.all()
return render_to_response('art.html', {'art': art},
context_instance=RequestContext(request))
art.html
{% for art in art %}
On Monday 22 June 2009 08:06:25 am Vlad(L) wrote:
> Mike, I work on Django 1.0.2 - in this version in settings.py is not
> mentioned at all about Media context processor and RequestContext. To
> me they need to be added in addition most???
It's not mentioned in the settings.py file, but that's why
Mike, I work on Django 1.0.2 - in this version in settings.py is not
mentioned at all about Media context processor and RequestContext. To
me they need to be added in addition most???
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
On Monday 22 June 2009 03:04:03 am Vlad(L) wrote:
> Unfortunately, it is impossible. Through a browser has looked html
> code - p>
>
> And how should be correctly registered MEDIA_URL in my case if I work
> on built in server Django?
In your settings.py check the context processors and make sure
def art(request):
art = Article.object.all()
retrun % (art)
art.allow_tags = True
try this .Add this in your model or if in admin then pass object .then use
list_display to display the image.see docs for more help:
http://docs.djangoproject.com/en/dev/ref/contrib/admin/
On Mon, Jun 22, 2009 at
It so needs to be made?
def art(request):
art = Article.objects.all()
return render_to_response('art.html', {'art': art})
art.allow_tags = True
I so have written, but all the same it is impossible
http://127.0.0.1:8000/article/media/1.jpg
It can is necessary to make, that the
not got ur question.If u want to display image then set allow_tags=True.
On Mon, Jun 22, 2009 at 3:34 PM, Vlad(L) wrote:
>
> Unfortunately, it is impossible. Through a browser has looked html
> code - p>
>
> And how should be correctly registered MEDIA_URL in my case if I work
> on built in se
Unfortunately, it is impossible. Through a browser has looked html
code -
And how should be correctly registered MEDIA_URL in my case if I work
on built in server Django?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gro
On 21/06/2009, at 11:14 PM, Vlad(L) wrote:
>
> MEDIA_ROOT = 'C:/booksite/media/'
> MEDIA_URL = 'http://127.0.0.1:8000/media'
>
> ...
>
>
I think this line should be more along the lines of:
When you render the html, view the source, and make sure its rendering
the right path.
Access the im
Nick, thanks!
But I unfortunately cannot still make.
My problem: that in the Template the picture was displayed
For example, I load in Django Admin article, I write title, anonce,
body and I load Image... It is necessary For me, that Image it was
deduced on a site together with title, anonce, body
> I study Django 1.0.2 on Djangobook
> Has read not all, but why that I can not find in this book the
> information anywhere how to be with Image? In the book the example
> with three models - Authors, Publisher and Books is resulted. And if I
> want still the Image to books and that they were ou
16 matches
Mail list logo