fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
skrypt do poprawiania daty przejścia do domeny publicznej
[redakcja.git]
/
apps
/
cover
/
models.py
diff --git
a/apps/cover/models.py
b/apps/cover/models.py
index
87a70a8
..
14026ac
100644
(file)
--- a/
apps/cover/models.py
+++ b/
apps/cover/models.py
@@
-12,6
+12,7
@@
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.utils.translation import ugettext_lazy as _
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.utils.translation import ugettext_lazy as _
+from django.contrib.sites.models import Site
class Image(models.Model):
class Image(models.Model):
@@
-34,6
+35,9
@@
class Image(models.Model):
def get_absolute_url(self):
return ('cover_image', [self.id])
def get_absolute_url(self):
return ('cover_image', [self.id])
+ def get_full_url(self):
+ return "http://%s%s" % (Site.objects.get_current().domain, self.get_absolute_url())
+
@receiver(post_save, sender=Image)
def download_image(sender, instance, **kwargs):
@receiver(post_save, sender=Image)
def download_image(sender, instance, **kwargs):