Thursday, September 5, 2013

Re: Does easy thumbnails for django work for apache server?

And also in the uploaded directory it was creating an extra image for the same image.


On Thu, Sep 5, 2013 at 11:42 PM, Robin Lery <robinlery@gmail.com> wrote:

I have a page, which is served by apache. When I upload images by the django's server (on localhost:8000) page, it does show me the uploaded image properly. However when I upload images by the apache server (on localhost) page, it does not show the uploaded image. Only when I reload the page on the django's inbuilt server (localhost:8000) i can see it on both the page served by the apache and django's server.

This was the index.html:

  {% load static from staticfiles %}  {% load thumbnail %}    <!DOCTYPE html>    <html>      <head>          <title>leo</title>          <link rel="stylesheet" type="text/css" href="{% static "css/style.css" %}">      </head>  ....  ....

And here's the other part of it for image:

                          {% for Status in status %}                              <p class="user">{{ Status.creator.get_full_name }}</p>                              {% if Status.image %}                                  <div class="image_image">                                      <center>                                      <img src="{{Status.image |thumbnail_url:'status'}}"/>                                      </center>                                  </div>                                  <p class="status_image">{{Status}}</p>                                  <span class="clear"></span>                                  <hr>                              {% else %}                                  <p class="status_status">{{Status}}</p>                                  <span class="clear_right"></span>                                  <hr>                              {% endif %}                          {% endfor %}

After I removed the EASY THUMBNAILS tag from the html file and made these changes on the html file, I was ok.

  {% load static from staticfiles %}    <!DOCTYPE html>    <html>  ....  ....

And this:

                              <div class="image_image">                                  <center>                                  <img src="{{ MEDIA_URL }}{{Status.image}}" width=300px />                                  </center>                              </div>

Why is apache behaving so? Or am I making some mistake here? Is it the problem of easy_thumbnails tag??? Please guide me. Thank you!


--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment