A simple application to allow you to attach notes to models.
Installation
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:
notes=generic.GenericRelation(Note)
Usage
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file notes-0.3.0.tar.gz.
File metadata
- Download URL: notes-0.3.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db47ce667520d797d5db72f00f7b11a67f16bc0c18794041ccee07d86792d266
|
|
| MD5 |
020a4eeba0165739afb39f7678c98b83
|
|
| BLAKE2b-256 |
05a7a998305a479fe19f7471236a7bf0e43b8eb1b351a995c141696182512645
|