django - Sorl thumbnail not showing thumb in AdminImageMixin -


I'm having trouble with Django 1.3 using the Digengo-grappily and shurl-thumbnails. I have a project that uses this code from official shawl-thumbnail docs:

  django.contrib import from #myapp / admin.py Import MyModel from admin myapp.models sorl .thumbnail.admin AdminImageMixin Category MyModelAdmin Import (AdminImageMixin, admin.ModelAdmin): Pass   

This project works well with debug server and a nice short Thumbnail is visible.

However, in any other project, I am serving my project through WSGI and I have 3 different domains:

  www.example Com media.example.com (this is serving user uploaded files) Static.example.com (which is serving stable files)   

However, this project In AdminImageMixin works fine except for a thumbnail, a model is available for change:

  • This is the correct world
  • This database contains the correct text in the field (upload / + photo_name.jpg) (i verify it with phpmyadmin)
  • it s

    Here are some sample codes:

      # Models.py class category (models.model): name = models.CharField (max_length = 200 Description = models.TextField (verbose_name = 'description', help_text = 'You can use' Textile ') icon = ImageField (upload_to =' uploads / ' , Blank = true, null = true) # admin.py class CategoryAdmin (AdminImageMixin, admin.ModelAdmin): admin.site.register Do (Category, CategoryAdmin) # Settings.py INSTALLED_APPS = ('django.contrib.auth', 'django.contrib.contenttypes',' django.contrib.sessions', 'django.contrib.sites',' django.contrib Repeat the next line to enable .messages', 'Django Contrib.staticfiles',' grappelli ', # admin:' django.contrib.admin ',' django_evolution ',' django_extensions', 'sorl.thumbnail', # Inappropriate next line to enable admin document: # 'Django.contrib.admindocs',)   

    any ideea wh

    What have you done? Remember to put sorl.thumbnail in your INSTALLED_APPS and then sync the database. If you do not have a table for key value pairs and it does not work, I think that you are using the default database as your key value storage, not again.

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -