Skip to main content

A simple reusable app to add notes to various models

Project description

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.

  1. Add ‘notes’ to your INSTALLED_APPS variable

  2. Import the Note model:

    from notes.models import Note

  3. 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, ]

  4. 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-notes-0.2.2.tar.gz (4.9 kB view details)

Uploaded Source

File details

Details for the file django-notes-0.2.2.tar.gz.

File metadata

  • Download URL: django-notes-0.2.2.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-notes-0.2.2.tar.gz
Algorithm Hash digest
SHA256 55adc56061afb9c658b9cbf54eeaec16b16fced5768352c5e6a682d7b9782176
MD5 e614e6b56a14b46e19b0c61db23f42c0
BLAKE2b-256 fed2369b0221dc494960b42b62bac45740f1cbc04e1e428cbc53848850cbef0f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page