Skip to main content

A simple Django app to represent organisms.

Project description

Organisms is a simple Django app to represent organisms.

Download and Install

This package is registered as “django-organisms” in PyPI and is pip installable:

pip install django-organisms

If django is not found on your system, pip will install it too.

Quick Start

  1. Add ‘organisms’ to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = (
        ...
        'organisms',
    )
  2. Run python manage.py migrate command to create organisms model.

  3. (Optional) The following step is only needed if you have django-tastypie installed to create a REST API for your project and would like to have API endpoints for django-organisms.

    Add the following to your project’s urls.py file:

    # There are probably already other imports here, such as:
    # from django.conf.urls import url, patterns, include
    
    # If you have not already done so, import the tastypie API:
    from tastypie.api import Api
    
    # Import the OrganismResource:
    from organisms.api import OrganismResource
    
    # If you have not already done so, initialize your API and
    # add the OrganismResource to it
    v0_api = Api()
    v0_api.register(OrganismResource())
    
    # In the urlpatterns, include the urls for this api:
    urlpatterns = patterns('',
        ...
        (r'^api/', include(v0_api.urls))
    )

Usage of Management Command

This app includes a management command management/commands/organisms_create_or_update.py, which can be used to populate the organisms table in the database. It takes 3 arguments:

  • taxonomy_id

  • scientific_name

  • common_name

For example, to populate the Human object in the database, we would enter:

python manage.py organisms_create_or_update --taxonomy_id=9606 --scientific_name="Homo sapiens" --common_name="Human"

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-organisms-0.3.tar.gz (5.6 kB view details)

Uploaded Source

File details

Details for the file django-organisms-0.3.tar.gz.

File metadata

File hashes

Hashes for django-organisms-0.3.tar.gz
Algorithm Hash digest
SHA256 21fffc1cc4e16c378e04ea5b5036665db2e208eeb1e344a84154f40b6ac23d52
MD5 2149f154ed7e81e4042e151109112145
BLAKE2b-256 251d563382dd2c55031d177e6ea873ab8e9ca1aeec975fd430c062b42c32a898

See more details on using hashes here.

Supported by

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