PK [lC [$ $ % django-notes-latest/installation.html
To install
pip install django-notes
Add '' to your INSTALLED_APPS setting:
INSTALLED_APPS = (
...
"notes",
...
)
Import the Note model in your model:
from notes.models import Note
Add the note inline to your model’s admin def in your admin.py file:
from notes.admin import NoteInline
class YourModelAdmin(admin.ModelAdmin):
inlines = [ NoteInline, ]
To enable easy management you can add a hook to your model:
notes=generic.GenericRelation(Note)
Finally, if you want to handle/view notes by themselves:
urlpatterns += patterns('',
...
(r'^', include('farm.urls')),
...
)
Follow the steps above (including 4) and you should have access to all the notes at instance_of_yourmodel.notes_set.all():
> object = YourModel.objects.get(pk=1)
> notes_for_object = object.notes_set.all()
Simple.
No signals...yet.
The source repository can be found at https://github.com/powellc/django-notes