mirror of
https://github.com/jazzband/django-admin2.git
synced 2026-05-04 05:24:45 +00:00
added AdminView.
This commit is contained in:
parent
6a6b3d5f79
commit
7a0f29f2c6
2 changed files with 23 additions and 1 deletions
|
|
@ -1 +1,16 @@
|
|||
# TODO - stub out tests
|
||||
from django.test import TestCase
|
||||
from django.views.generic import View
|
||||
|
||||
from ..views import AdminView
|
||||
|
||||
|
||||
class AdminViewTest(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.admin_view = AdminView(r'^$', View)
|
||||
|
||||
def test_url(self):
|
||||
self.assertEquals(self.admin_view.url, r'^$')
|
||||
|
||||
def test_view(self):
|
||||
self.assertEquals(self.admin_view.view, View)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,13 @@ from .forms import AdminAuthenticationForm
|
|||
from .viewmixins import Admin2Mixin, AdminModel2Mixin, Admin2ModelFormMixin
|
||||
|
||||
|
||||
class AdminView(object):
|
||||
|
||||
def __init__(self, url, view):
|
||||
self.url = url
|
||||
self.view = view
|
||||
|
||||
|
||||
class IndexView(Admin2Mixin, generic.TemplateView):
|
||||
default_template_name = "index.html"
|
||||
registry = None
|
||||
|
|
|
|||
Loading…
Reference in a new issue