Great tip, Thanks!
Here my code, just in case someone is interested:
from django.db import models
from django.utils.translation import ugettext as _
import Image as PilImage
import settings as s
import os
class Gallery(models.Model):
title = models.CharField(_("Name"), max_length=200)
Am 30.09.2008 um 20:21 schrieb Rajesh Dhawan:
>
> You are overriding __init__ but not making sure to call the base
> class's __init__ method which does a whole bunch of stuff whenever a
> new instance of a Model class is created. This is most definitely
> causing your problem. It's best not to ov
> I have a model for Thumbnail, but I cannot save it. It says:
> AttributeError: 'Thumbnail' object has no attribute 'id'.
> What is wrong?
>
> I use django 1.0-final-SVN-unknown
>
> thanks, Manuel
>
> Here is an example:
>
> >>> from portfolio.models import Photo, Thumbnail
> >>> p = Photo.obj
Hey,
I have a model for Thumbnail, but I cannot save it. It says:
AttributeError: 'Thumbnail' object has no attribute 'id'.
What is wrong?
I use django 1.0-final-SVN-unknown
thanks, Manuel
Here is an example:
>>> from portfolio.models import Photo, Thumbnail
>>> p = Photo.objects.all()[0]
4 matches
Mail list logo