A simple reusable app to add notes to various models
A simple application to allow you to attach notes to models.
Notes uses generic relations to handle attaching themselves to models. So installation is basically just like adding a generic relation item to your model.
Add ‘notes’ to your INSTALLED_APPS variable
Import the Note 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:
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()
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size django-notes-0.2.2.tar.gz (4.9 kB)||File type Source||Python version None||Upload date||Hashes View hashes|