from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.template.loader import render_to_string
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.template.loader import render_to_string
logo = models.ImageField(_('logo'), upload_to='sponsorzy/sponsor/logo')
url = models.URLField(_('url'), blank=True)
logo = models.ImageField(_('logo'), upload_to='sponsorzy/sponsor/logo')
url = models.URLField(_('url'), blank=True)
- (THUMB_WIDTH - simg.size[0]) / 2,
- i * THUMB_HEIGHT + (THUMB_HEIGHT - simg.size[1]) / 2,
+ round((THUMB_WIDTH - simg.size[0]) / 2),
+ round(i * THUMB_HEIGHT + (THUMB_HEIGHT - simg.size[1]) / 2),
html = property(fget=html)
def save(self, *args, **kwargs):
html = property(fget=html)
def save(self, *args, **kwargs):