i think u have to add this code urls.py
DIRNAME = os.path.dirname(__file__) (r'^photos/(.*)$', 'django.views.static.serve', {'document_root': os.path.join(DIRNAME, "photos")}), pls answer me if your code will ok 2009/1/23 nmr <jonas...@gmail.com> 2009/1/23 nmr <jonas...@gmail.com> > > Hi. > > I'm having problem to view my thumbnails. I'm using sorl for thumbnail > creation and uploading: > > model.py: > > class Photo(models.Model): > text=models.TextField(max_length=50) > photo=ImageWithThumbnailsField(upload_to='photos/',thumbnail= > {'size': (50, 50)}) > > def __unicode__(self): > return self.text > class Admin: > pass > > template photo.html: > > {% extends "base.html" %} > {% block right %} > {% load thumbnail %} > <p> Photos that will come... Still under construction!</p> > <img src="{% thumbnail "photos/DSCN6487.JPG" 100x100 %}" /> > {% endblock %} > > urls.py: > > urlpatterns = patterns('', > (r'^admin/(.*)', admin.site.root), > (r'^', include('server.music.urls')), > > ) > > if settings.DEBUG: > urlpatterns += patterns('',(r'^m/(?P<path>.*)$', serve, { > 'document_root' : os.path.join(os.path.dirname(__file__),"media") > }) > ) > > and that works (i.e thuimbanils are made in the right directory) but > they don't show up on the webpage. Now, I think that urls.py needs to > be configured in the right way, i.e translate the output of the > thumbnail tag to something that 'django.views.static.serve' can use > but I haven't figured out how. The last lines in urls.py is for static > images in css and I guess the tumbs should use something similar. > > any help? > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---