Skip to main content

Django Citations

Citations is a simple Django app which lets you use a citations and reference lists within your templates.

Quick start

  1. Install using:

    pip install django-citations
  2. Add “citations” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = (
        ...
        'citations',
    )
  3. Run python manage.py migrate to create the models.

Usage

You can use the admin panel to create references for your site. These can have a range of details including ISBN, URLs, titles, etc. Each reference must have a unique slug. This is how we will refer to the reference when we cite it within a template.

To refer to a reference in your database, you first need to load the tags in your template:

{% load citation_tags %}

You can then do the following in your template where you want the reference to appear:

{% cite "my_reference_slug" %}

You can refer to multiple references at a time by just adding new slugs separated by spaces. Note that quotation marks are required around the slugs, and slug names should not contain spaces:

{% cite "my_first_reference_slug" "my_second_reference_slug" %}

If you attempt to reference a work that is not in your reference list a TemplateSyntaxError will be raised showing the offending reference slug.

The references will be included in text as numbers - e.g. [1], or [1, 2] for multiple references. Reference objects will also be placed in the reference_list variable of the template’s context.

A reference list can be included at the bottom of the document:

{% show_references reference_list %}

Importing References

If you have the package bibtexparser installed then you will have access in the admin panel to an “Upload Bibtex” button. This feature will upload a bibtex file, scan it for fields that django-citations supports and save new records.

The bibtexparser package is provided under the LGPL.

Change Log

Version 0.3
  • Improved documentation

  • Add new fields to database

  • Add bibtex upload function, where bibtexparser is installed

  • Add show_all_references tag for complete bibliography

Version 0.2.1
  • Fix tags in README

Version 0.2

  • Improved citation database - more fields available

  • Improved reference output (uses a Harvard referencing format)

Version 1.0

  • Initial version

Metadata

Release files for django-citations 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-citations 0.3
File Size Uploaded Provenance
django-citations-0.3.zip 12.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-citations 0.3
File Interpreter ABI Platform
django-citations-0.3.win32.exe Details

Total release size: 219.9 kB

Release files / django-citations-0.3.zip

Download URL django-citations-0.3.zip
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e6ca2e34891ee20c3498e3fba54c795e92c562b3af3e394282b8fb4759a0300b
BLAKE2b-256 checksum
How to use checksums
12b91762b948b7c60fb22e5b4918080a3d847a0510404904a35f5dc49f16fc51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django-citations-0.3.win32.exe

Download URL django-citations-0.3.win32.exe
Size 207.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ef638a4053d3f5c89c9d75d2c6108da9efd9ef21d8e28844f999e063e2b41742
BLAKE2b-256 checksum
How to use checksums
7531fbf6f35b6834b7d60b842f920b5fd47b3c712860ae52bc475fba21616f4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-citations 0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page