Skip to main content

An introspective interface for Django and Document Based NoSQL databases

Project description

Many NoSQL databases, mostly the Document based ones, translate into Python as a list of dictionaries, right? So why do us developers try to staple document databases into Django’s traditional style relational introspection and tools? It’s like we’re trying to add object impedance mismatch to something that avoids it in the first place.

Taking lessons learned from django-mongonaut, django-nosql-admin is an introspection tool for NoSQL databases. Our original test case is MongoDB, but if this works we’ll invite authorship of interfaces for other NoSQL databases.

Fundamentals

  • Display the results of lists of dictionaries

  • mongoadmin.py features:

    • Define a collection

    • Only show ObjectId by default

    • Can add search fields which attempt to search

    • Can add list fields which try to display

    • Define which collections are displayed.

Sample mongoadmin.py file:

# mongoadmin.py
class ProfileAdmin(MongoAdmin):

    collection = 'Profile'
    search_fields = ['username']
    list_fields = ['username']

    def has_view_permission(self, request):
        return True

class ArticleAdmin(MongoAdmin):

    collection = 'Article'
    search_fields = ['title',]
    list_fields = ['title','create_date']


admins = [ProfileAdmin(), ArticleAdmin()]

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-nosqladmin-0.1.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file django-nosqladmin-0.1.tar.gz.

File metadata

File hashes

Hashes for django-nosqladmin-0.1.tar.gz
Algorithm Hash digest
SHA256 dd3d20429b7d540e75b3ee4623038106edaa332ba77ae1c2a4f2a31623979868
MD5 fff78492b7ac014c94b8b7b6625b33f0
BLAKE2b-256 950265d4d8b4552ddd24740581bfeb1a0a302cbc425f7f5575bed7f9ab67128d

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