summaryrefslogtreecommitdiffstats
path: root/feincms/content/image/models.py
diff options
context:
space:
mode:
authorsubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-07-04 19:26:51 +0100
committersubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-07-04 19:26:51 +0100
commitebebb2f4bc861d6900fbf95b6cc04b5b3bf65e9a (patch)
tree746b52ff3c6b0eba445160c87be0275fd0d7acba /feincms/content/image/models.py
parent9d90506e1cadc17edc908dea4f68b6137ff96b9f (diff)
downloadtroggle-ebebb2f4bc861d6900fbf95b6cc04b5b3bf65e9a.tar.gz
troggle-ebebb2f4bc861d6900fbf95b6cc04b5b3bf65e9a.tar.bz2
troggle-ebebb2f4bc861d6900fbf95b6cc04b5b3bf65e9a.zip
[svn] Remove old subcave model, along with mptt and feincms. Also move OtherCaveNames admin representation to an inline in Cave.
Diffstat (limited to 'feincms/content/image/models.py')
-rw-r--r--feincms/content/image/models.py32
1 files changed, 0 insertions, 32 deletions
diff --git a/feincms/content/image/models.py b/feincms/content/image/models.py
deleted file mode 100644
index 2f1d2c4..0000000
--- a/feincms/content/image/models.py
+++ /dev/null
@@ -1,32 +0,0 @@
-from django.db import models
-from django.template.loader import render_to_string
-from django.utils.translation import ugettext_lazy as _
-
-class ImageContent(models.Model):
- """
- Create an ImageContent like this:
-
- Cls.create_content_type(ImageContent, POSITION_CHOICES=(
- ('left', 'Left'),
- ('right', Right'),
- ))
- """
-
- image = models.ImageField(_('image'), upload_to='imagecontent')
-
- class Meta:
- abstract = True
- verbose_name = _('image')
- verbose_name_plural = _('images')
-
- def render(self, **kwargs):
- return render_to_string([
- 'content/image/%s.html' % self.position,
- 'content/image/default.html',
- ], {'content': self})
-
- @classmethod
- def handle_kwargs(cls, POSITION_CHOICES=()):
- models.CharField(_('position'), max_length=10, choices=POSITION_CHOICES
- ).contribute_to_class(cls, 'position')
-