Mongo Admin

Get the source: https://github.com/jschrewe/django-mongoadmin

Makes django's admin site compatible with mongoengine documents. You can use database models and mongodb documents together, so your old legacy projects and apps aren't lost.

What works

mongoadmin should in most cases work like django's admin. The less used admin features are not really tested. If you find something that doesn't work please open a new issue.

How to use

Add mongoadmin to INSTALLED_APPS settings

INSTALLED_APPS = (
    ...
        'mongoadmin',
        'django.contrib.admin',
    ...
)

Add mongoadmin to urls.py

from django.contrib import admin
admin.autodiscover()

from mongoadmin import site

urlpatterns = patterns('',
    # Uncomment the next line to enable the admin:
        url(r'^admin/', include(site.urls)),
)

The admin.py for your app needs to use mongoadmin instead of django's admin:

from mongoadmin import site, DocumentAdmin

from app.documents import AppDocument

class AppDocumentAdmin(DocumentAdmin):
    pass
site.register(AppDocument, AppDocumentAdmin)

Missing models from third party apps

To use third party apps (i.e. apps that register their admin classes in django.contrib.admin.site) with mongoadmin you have to add MONGOADMIN_OVERRIDE_ADMIN = True to your settings file. This overrides the django admin site with mongoadmin's admin site.

Latest commits

Fork me on GitHub