Skip to main content

django-zotero

django-zotero is a django app that provides a generic formset to tag any django object with Zotero metadata. Tagged object are easily exportable to Zotero in one click.

Installation

First of all, it is needed to have pip installed on your system. It is strongly recommended to install virtualenv and virtualenvwrapper to take the most advantage of pip.

To install pip, go to http://www.pip-installer.org/en/latest/installing.html

To install virtualenv, go to https://pypi.python.org/pypi/virtualenv

To install virtualenvwrapper, go to http://virtualenvwrapper.readthedocs.org/en/latest/install.html#basic-installation

Now install django-zotero:

$ pip install django-zotero

Usage

To use django-zotero, follow the next steps:

  1. Django settings: add the app name to INSTALLED_APPS in settings.py:

    INSTALLED_APPS = (
        #...,
        'zotero',
    )
  2. Administration side: add the following code to admin.py:

    1. Import the class TagInlineAdmin [1]:

      from zotero.admin import TagInlineAdmin
    2. For each model you wish to tag, add to its admin class:

      inlines = (
          #...,
          TagInlineAdmin,
      )
  3. User side: add the following code:

    1. In views.py:

      1. Import the function get_tag_formset [2]:

        from zotero.forms import get_tag_formset
      2. In the view that manages the tagged object, instanciate the formset and save it:

        tag_formset = get_tag_formset(
            obj=form.instance,
            data=request.POST,
            show_labels=False,
            labels={
                'item_type': 'Document type',
                #...,
            }
        )
        #...
        tag_formset.save()
    2. In the template that manages the object:

      1. Import the template tag zotero_inline_tags [3]:

        {% load zotero_inline_tags from zotero_inline_extras %}
      2. Render the formset:

        {% zotero_inline_tags formset %}
    3. In the template that renders the object:

      1. Import the template tag zotero_tags [4]:

        {% load zotero_tags from zotero_tags_extras %}
      2. Render Zotero metadata:

        {% zotero_tags
            object=document
            vocabulary="dc"
            output_method="meta" %}

Metadata

Release files for django-zotero 0.4

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-zotero 0.4
File Size Uploaded
django-zotero-0.4.tar.gz 136.3 kB Details

Release files / django-zotero-0.4.tar.gz

Download URL django-zotero-0.4.tar.gz
Size 136.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0f9fc116c8961e6326a8b84e8619902c3e466bdd97cda1649a2991ab12a19ff0
BLAKE2b-256 checksum
How to use checksums
6eae240820aee5c7c2bddb0ac01c30df5355e42c127c6a49166ccd57f1c164b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.4 This release

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

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