Neither name nor app_label fixed situation.
AdminSite instance django.contrib.admin.site is constructed without
any names and it works.
In documentation is written: "If no instance name is provided, a
default instance name of admin will be used."

On Sep 9, 5:31 pm, Ramiro Morales <[email protected]> wrote:
> On Wed, Sep 9, 2009 at 4:33 AM, Vlastimil Zima <[email protected]> 
> wrote:
>
> > Hello,
> > I found out, that if I made derived class of
> > django.contrib.admin.sites.AdminSite admin generated by this AdminSite
> > in unable to to create correct links e.g. for Logout (http://
> > 127.0.0.1:8000/admin/Nonelogout/), Change Password (http://
> > 127.0.0.1:8000/admin/Nonepassword_change/), etc. (examples are from
> > index page). I am not sure whether it is mistake at my site or
> > somewhere else.
>
> > Everything I changed since createproject and syncdb:
>
> > - add 'django.contrib.admin' to INSTALLED_APPS
> > - create sites.py :
>
> > from django.contrib.admin.sites import AdminSite
>
> > class TestAdminSite(AdminSite):
> >   def get_urls(self):
> >       """
> >       So far call super.get_urls, prepared for extensions
> >       """
> >       urlpatterns = []
> >       urlpatterns.extend( super(TestAdminSite, self).get_urls() )
> >       return urlpatterns
> >     def urls(self):
> >       return self.get_urls()
> >   urls = property(urls)
>
> > admin_site = TestAdminSite()
>
> You need to provide a name parameter to the constructor of your AdminSite
> sub-class as described in the relevant Django 1.1 admin app documentation:
>
> http://docs.djangoproject.com/en/dev/ref/contrib/admin/#adminsite-obj...http://docs.djangoproject.com/en/dev/ref/contrib/admin/#multiple-admi...
>
>
>
> > - generate admin in urls.py :
>
> > from django.conf.urls.defaults import *
> > from sites import admin_site
> > urlpatterns = patterns('',
> >   (r'^admin/', include(admin_site.urls)),
> > )
>
> > Although there are no registered models, it can be observed that links
> > are not correct.
>
> > Any idea how to solve this problem or confirm that it is a bug will be
> > helpful.
>
> --
> Ramiro Moraleshttp://rmorales.net
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to