:
abstract = True
On 16 май, 18:25, Julien <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I think it should be %(class)s, not %s(class)s (take out the first
> 's')
>
> Julien
>
> On May 16, 11:33 pm, Legioneer <[EMAIL PROTECTED]> wrote:
>
> > Hi All
Hi All,
Got a problem when trying to define an abstract class. Below there is
an examle:
class PaymentData(models.Model):
owner = models.ForeignKey(Customer,
related_name="%s(class)s_related" )
class Meta:
abstract = True
When running 'python manage.py validate' receive an erro
ck <[EMAIL PROTECTED]>
wrote:
> On Thu, 2008-04-17 at 07:00 -0700, Legioneer wrote:
> > Hi All!
>
> > Trying to get a solution for a problem. I have a model which has one
> > to many relationship with another model which contains an ImageField.
> > E.g:
Hi All!
Trying to get a solution for a problem. I have a model which has one
to many relationship with another model which contains an ImageField.
E.g:
class Person(models.Model):
name = models.CharField(max_length=512)
class Image(models.Model):
image = models.ImageField(upload_to='/im
) raises
DoesNotExist exception
where c = Category.objects.filter(parent__exact=0)
On Apr 2, 1:07 pm, Legioneer <[EMAIL PROTECTED]> wrote:
> yes. in admin there are no problems with it.
>
> On Apr 2, 4:40 am, 1234 <[EMAIL PROTECTED]> wrote:
>
> > Is this model work on in admin?
&
yes. in admin there are no problems with it.
On Apr 2, 4:40 am, 1234 <[EMAIL PROTECTED]> wrote:
> Is this model work on in admin?
>
> 2008/4/1, Legioneer <[EMAIL PROTECTED]>:
>
>
>
> > My data model is very similar to your:
>
> > class Category(model
My data model is very similar to your:
class Category(models.Model):
name = models.CharField(max_length=64)
descr = models.CharField(max_length=255, blank=True)
rank = models.PositiveIntegerField(default=10)
parent = models.ForeignKey('self', null=True, blank=True,
egory.objects.all() it
> should work.
>
> Hope that helps,
> Michael
>
> On Mon, Mar 31, 2008 at 5:39 AM, Legioneer <[EMAIL PROTECTED]> wrote:
>
> > Hi All,
>
> > I'm trying to serialize recursive model (a category which refers to
> > itself) a
Hi All,
I'm trying to serialize recursive model (a category which refers to
itself) and get a 'DoesNotExist: Category matching query does not
exist', while other models work fine. Does anyone know a clue for
this?
I'm doing like this:
from django.core import serializers;
from newproject.models
>
> > The unicode branch was merged after the 0.96 release, thus 9.96.1 does not
> > include its benefits...
>
> I meant 0.96.1 of course.
thanks a lot
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" g
Hi All,
I use django 0.96.1 on CentOS 4 box (python 2.3.4). When use __str__()
in model definitions everything is fine, but when change it to
__unicode__() I don't see it working (e.g. in admin interface there is
a default output). Does 0.96.1 support __unicode__() or I should move
to SVN versio
11 matches
Mail list logo