Changes between Initial Version and Version 1 of CookBookLabels


Ignore:
Timestamp:
04/02/2006 01:46:00 PM (9 years ago)
Author:
boxed@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CookBookLabels

    v1 v1  
     1The code for this labels system is attached. Any item can have an arbitrary number of labels on them. Usage is simple: in your model import the labels model ("from django.models.labels import Label" if you don't change the package name) and then add this line to the view:
     2
     3{{{
     4labels = meta.ManyToManyField(Label, null=True, blank=True)
     5}}}
     6
     7And you're done. If you install the urls for this you will also be able to get a listing of all items for a given label with the url /labels/<label_id>/ and it will list them in categories. /labels/ will list all the labels in the system.
Back to Top