Thanks to all of you.
Now I understand this better.
Jaroslav
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubs
On Tue, Jan 25, 2011 at 11:41 AM, Jaroslav Dobrek
wrote:
>>> What happens ?
>
> I get this error message when I run manage.py syncdb:
>
> AttributeError: 'ForeignKey' object has no attribute 'producer'
>
>>> And what did you expect to happen ?
>
> I want the 'country_of_origin' of cars to be the s
On 25 jan, 12:41, Jaroslav Dobrek wrote:
> >> What happens ?
>
> I get this error message when I run manage.py syncdb:
>
> AttributeError: 'ForeignKey' object has no attribute 'producer'
>
> >> And what did you expect to happen ?
>
> I want the 'country_of_origin' of cars to be the string that is
Hi there,
Are you sure that you want to denormalize your schema like that ?
I now this is a totally different issue and question but in this case
do you really need to perform this operation ? Have considered the
problems that this approach will bring?
Imagine this simple use case:
If one changes
On 25 Jan., 12:36, Euan Goddard wrote:
> I agree with the previous poster - the title is misleading as the word
> "method" is incorrect in both places.
O.k. sorry. Should have been "attribute of attribute", right?
--
You received this message because you are subscribed to the Google Groups
"
>> What happens ?
I get this error message when I run manage.py syncdb:
AttributeError: 'ForeignKey' object has no attribute 'producer'
>> And what did you expect to happen ?
I want the 'country_of_origin' of cars to be the string that is stored
in their producer's 'country_of_origin':
class C
I agree with the previous poster - the title is misleading as the word
"method" is incorrect in both places.
It seems that the original poster is talking about denormalizing data.
However, this is unnecessary as the ORM allows for this type of data
to be retrieved any how, e.g.
Car.objects.all().s
On 25 jan, 11:57, Jaroslav Dobrek wrote:
> Hi,
>
> can I use methods of methods in Django?
What's a "methods of methods" ???
> Like so:
>
> class Car(models.Model):
> producer = models.ForeignKey(CarProducer)
> country_of_origin = producer.country_of_origin
What is CarProducer.country
Hi,
can I use methods of methods in Django?
Like so:
class Car(models.Model):
producer = models.ForeignKey(CarProducer)
country_of_origin = producer.country_of_origin
This doesn't seem to work. Is there a special syntax for this?
Jaroslav
--
You received this message because you are
9 matches
Mail list logo