-
24 |
- 25 | 26 | {% blocktrans with admin.verbose_name as name %}Add {{ name }}{% endblocktrans %} 27 | 28 | 29 |
| {{ header }} | 37 | {% endfor %} 38 ||
|---|---|
| {{ item }} | 46 | {% else %} 47 |{{ item }} | 48 | {% endif %} 49 | {% endfor %} 50 |
├── .gitignore ├── mongoadmin ├── models.py ├── templates │ └── mongoadmin │ │ ├── base.html │ │ ├── delete_confirmation.html │ │ ├── change_list.html │ │ ├── index.html │ │ └── change_form.html ├── tests.py ├── __init__.py ├── forms.py └── views.py ├── LICENSE ├── setup.py └── README.mkd /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | .DS_Store 3 | django-mongoengine.komodoproject 4 | -------------------------------------------------------------------------------- /mongoadmin/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /mongoadmin/templates/mongoadmin/base.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n %} 3 | 4 | {% block userlinks %} 5 | {% trans 'Log out' %} 6 | {% endblock %} 7 | -------------------------------------------------------------------------------- /mongoadmin/tests.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file demonstrates two different styles of tests (one doctest and one 3 | unittest). These will both pass when you run "manage.py test". 4 | 5 | Replace these with more appropriate tests for your application. 6 | """ 7 | 8 | from django.test import TestCase 9 | 10 | class SimpleTest(TestCase): 11 | def test_basic_addition(self): 12 | """ 13 | Tests that 1 + 1 always equals 2. 14 | """ 15 | self.failUnlessEqual(1 + 1, 2) 16 | 17 | __test__ = {"doctest": """ 18 | Another way to test that 1 + 1 is equal to 2. 19 | 20 | >>> 1 + 1 == 2 21 | True 22 | """} 23 | 24 | -------------------------------------------------------------------------------- /mongoadmin/__init__.py: -------------------------------------------------------------------------------- 1 | from mongoadmin.views import MongoAdmin, site 2 | from mongoadmin.forms import MongoAdminForm 3 | 4 | def autodiscover(*args): 5 | ''' Discover submodules in Django apps that would otherwise be 6 | ignored (listeners, configforms, etc) 7 | 8 | Usage: autodiscover('configforms'[, 'listeners'[, ...]]) 9 | ''' 10 | from django.conf import settings 11 | from django.utils.importlib import import_module 12 | from django.utils.module_loading import module_has_submodule 13 | 14 | for submod in args: 15 | for app in settings.INSTALLED_APPS: 16 | mod = import_module(app) 17 | if module_has_submodule(mod, submod): 18 | import_module('%s.%s' % (app, submod)) 19 | -------------------------------------------------------------------------------- /mongoadmin/templates/mongoadmin/delete_confirmation.html: -------------------------------------------------------------------------------- 1 | {% extends "mongoadmin/base.html" %} 2 | {% load i18n %} 3 | 4 | {% block breadcrumbs %} 5 |
11 | {% endblock %} 12 | 13 | {% block content %} 14 |{% blocktrans with object as escaped_object %}Are you sure you want to delete the {{ collection }} "{{ document }}"?{% endblocktrans %}
15 |{{ document.to_mongo|pprint }}
16 |
22 | {% endblock %}
23 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) derek payton | {{ header }} | 37 | {% endfor %} 38 ||
|---|---|
| {{ item }} | 46 | {% else %} 47 |{{ item }} | 48 | {% endif %} 49 | {% endfor %} 50 |
| {{ document.name|capfirst }} | 24 |25 | | {% trans 'Add' %} | 26 |
|---|
{% trans "You don't have permission to edit anything." %}
33 | {% endif %} 34 |