logo       

i need custom database behaviour, but i dont know how to do it: msg#02268

DjangoUsers

Subject: i need custom database behaviour, but i dont know how to do it

I am working on a Categories application for my project. The model that i need to categorize ise Announces.. i descibed category in announces like this

class Category
    ...
    ...
    path = models.CharField ....

class Announce:
    ...
    ...
    ...
    category = models.ForeignKey(Category)

So my question,

This Announce model saves id of category on database and calls with id when it needed, but i want to make it save Category.path

can i do it easly? or should i override something ? any ideas?

--~--~---------~--~----~------------~-------~--~----~
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@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to django-users+unsubscribe@xxxxxxxxxxxxxxxx
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise