Merge pull request #34 from audreyr/master

Get example project working with /admin/ and /admin2/ urls
This commit is contained in:
Audrey Roy 2013-05-18 04:19:27 -07:00
commit 361fd2faca
4 changed files with 8 additions and 10 deletions

View file

@ -21,6 +21,8 @@ urlpatterns = patterns('',
view=views.ModelListView.as_view(),
name="model_list"
),
)
"""
url(
regex=r'^(?P<app_label>[_\-\w]+)/(?P<model_name>[_\-\w]+)/(?P<id>[\w]+)/$',
@ -43,4 +45,3 @@ urlpatterns = patterns('',
name="model_delete"
)
"""
)

View file

@ -20,7 +20,7 @@ class IndexView(ListView): #(LoginRequiredMixin, StaffuserRequiredMixin, ListVie
return get_admin2s()
class ModelListView(object):
class ModelListView(ListView):
pass

View file

@ -115,8 +115,7 @@ INSTALLED_APPS = (
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
# Uncomment the next line to enable the admin:
# 'django.contrib.admin',
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
'djadmin2',

View file

@ -1,17 +1,15 @@
from django.conf.urls import patterns, include, url
from django.contrib import admin
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
url(r'^$', include('djadmin2.urls')),
url(r'^admin2/$', include('djadmin2.urls')),
# url(r'^example/', include('example.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
# url(r'^admin/', include(admin.site.urls)),
url(r'^admin/', include(admin.site.urls)),
)