I have multiple models.  I'm trying to create an admin site for all
models (using admin.site) and an admin site for each model (by
inheriting from AdminSite).

The admin.site is working as expected.  The AdminSite will load the
app as normal but when I click on the model, I get a 404 error.

I'm following very closely 'How to have 2 different admin sites in a
Django project'(http://stackoverflow.com/questions/3206856/how-to-
have-2-different-admin-sites-in-a-django-project).

Here is the pseudo code of what I'm doing:
model.py
-------------------
class myBaseModel(models.Model):
    first_name   = models.CharField( max_length=100)

class myModel1( myBaseModel ):
    class Meta(myBaseModel .Meta):
        verbose_name = 'my model 1 info'

class myModel2( myBaseModel ):
    class Meta(myBaseModel .Meta):
        verbose_name = 'my model 2 info'
-------------------

admin.py
-------------------
admin.site.register( myModel1)
admin.site.register(myModel2)
-------------------

myModel1Admin.py
-------------------
class myModel1Site(AdminSite):
    pass

adminModel1 = myModel1Site()
adminModel1.register( myModel1 )
-------------------

url.py
-------------------
from django.contrib import admin
admin.autodiscover()

from <app name>.myModel1Admin import adminModel1

urlpatterns = patterns('',

    url(r'^masterAdmin/', include(admin.site.urls)),
    url(r'^model1Admin/$', include(adminModel1.urls)),
)
-------------------

The url  <masterAdmin> is working as expected.  When I go to
<model1Admin> the page looks as I would expect but when I click on
'my model 1 info' I get a 404 error.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to