I have a bit of a problem - I'm creating a GTD-focused task management
app for Django, mainly for my own benefit, but it's open source if any
one cares.

I've been trying to implement a taxonomy system like the one Drupal
uses. Only problem is that I find it difficult to get the right data
out into the template system.

As an example, I have a list of Task objects, which is supposed to be
displayed to the user. These Task objects all have Term object
associated with them (ManyToMany). The Term objects belong
(ForeignKey) to a Vocabulary object. I want to get the Term objects by
their Vocabulary so I can display them in different columns.

Lets say I have a Task object called 'Fix the apache configuration on
xyz server', which has the Term objects 'Urgent' (from the Priority
Vocabulary) and 'Work' (from the Context Vocabulary).

Currently, I have a bit of a kludge where I've put a refresh method on
the Task object that generates a dictionary with vocabulary names as
keys and as value a string containing a comma-separated list of all
the terms from that Vocabulary associated with the Term object in
question.

I would like to be able to access the Term objects directly in the
template, so I could get the absolute URL for them in the "right" way
or if that's not feasible, some other solution, because I need the
aforementioned string to have links to the Term objects in question...

You can see the model code in question here:
http://codebrowse.launchpad.net/~mikl/kaplan/kaplan.dev/annotate/mikkel%40hoegh.org-20071015103825-kmr72968yz91serq?start_revid=mikkel%40hoegh.org-20071017164032-iz6zlgj3m735a5qe&file_id=svn-v2%3A1%4005d49af5-ae19-0410-aa10-c28341cc0fd9--src%2fdanet%2ftodo%2fmodels.py

Checkout instructions etc. here:
https://code.launchpad.net/~mikl/kaplan/kaplan.dev

Any input will be greatly appreciated.

Kind regards,

Mikkel Høgh


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to