Re: Template path for new admin doc broken in revision 8520?
Hi, not an expert! but I think I had this same problem. The admin docs were fairly recently moved into a separate app. So you'll need to update your urls to something like: -- from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Admin (r'^admin/doc/', include('django.contrib.admindocs.urls')), (r'^admin/(.*)', admin.site.root), ) -- I think that's right? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Template path for new admin doc broken in revision 8520?
I opened the ticket and I have a patch out there to fix the problem. The real problem is 'django.contrib.admindocs' doesn't really deserve its own contrib app page in the documents. It is more of a helper application than anything. It just needs to be enabled via INSTALLED_APPS and adding a one-liner in the urls.py when you open a project would seem like a suitable location. On Aug 24, 2:18 pm, Ulf Kronman <[EMAIL PROTECTED]> wrote: > Thanks Karen and Shadow, > > > > > urlpatterns = patterns('', > > > > #Admin > > > > (r'^admin/doc/', include('django.contrib.admindocs.urls')), > > > > (r'^admin/(.*)',admin.site.root), > > > > ) > > > You need that in urls.py, plus you need 'django.contrib.admindocs' added > > > to your INSTALLED_APPS. There's a ticket open > > > (http://code.djangoproject.com/ticket/8496) for getting this last bit > > > mentioned somewhere in the docs, at the moment I don't believe it's > > > mentioned anywhere. > > I had the urlpatterns mentioned by Shadow already installed, but I > missed the django.contrib.admindocs app that Karen mentioned. > > I have installed the admindocs app now, andadmindocs are working > fine for me again. > > Thanks for quick help, > Ulf --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Template path for new admin doc broken in revision 8520?
Thanks Karen and Shadow, > > > urlpatterns = patterns('', > > > # Admin > > > (r'^admin/doc/', include('django.contrib.admindocs.urls')), > > > (r'^admin/(.*)', admin.site.root), > > > ) > > You need that in urls.py, plus you need 'django.contrib.admindocs' added > > to your INSTALLED_APPS. There's a ticket open > > (http://code.djangoproject.com/ticket/8496) for getting this last bit > > mentioned somewhere in the docs, at the moment I don't believe it's > > mentioned anywhere. I had the urlpatterns mentioned by Shadow already installed, but I missed the django.contrib.admindocs app that Karen mentioned. I have installed the admindocs app now, and admin docs are working fine for me again. Thanks for quick help, Ulf --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Template path for new admin doc broken in revision 8520?
Are yes, that too ;) On Aug 25, 1:36 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Sun, Aug 24, 2008 at 10:27 AM, Shadow <[EMAIL PROTECTED]>wrote: > > > > > > > Hi, not an expert! > > > but I think I had this same problem. The admin docs were fairly > > recently moved into a separate app. So you'll need to update your urls > > to something like: > > > -- > > from django.conf.urls.defaults import * > > from django.contrib import admin > > > admin.autodiscover() > > > urlpatterns = patterns('', > > # Admin > > (r'^admin/doc/', include('django.contrib.admindocs.urls')), > > (r'^admin/(.*)', admin.site.root), > > ) > > > -- > > > I think that's right? > > You need that in urls.py, plus you need 'django.contrib.admindocs' added > to your INSTALLED_APPS. There's a ticket open > (http://code.djangoproject.com/ticket/8496) for getting this last bit > mentioned somewhere in the docs, at the moment I don't believe it's > mentioned anywhere. > > Karen --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Template path for new admin doc broken in revision 8520?
On Sun, Aug 24, 2008 at 10:27 AM, Shadow <[EMAIL PROTECTED]>wrote: > > Hi, not an expert! > > but I think I had this same problem. The admin docs were fairly > recently moved into a separate app. So you'll need to update your urls > to something like: > > -- > from django.conf.urls.defaults import * > from django.contrib import admin > > admin.autodiscover() > > urlpatterns = patterns('', ># Admin >(r'^admin/doc/', include('django.contrib.admindocs.urls')), >(r'^admin/(.*)', admin.site.root), > ) > > -- > > I think that's right? > You need that in urls.py, plus you need 'django.contrib.admindocs' added to your INSTALLED_APPS. There's a ticket open ( http://code.djangoproject.com/ticket/8496) for getting this last bit mentioned somewhere in the docs, at the moment I don't believe it's mentioned anywhere. Karen --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Template path for new admin doc broken in revision 8520?
Hi all, some time ago, I noticed that I got an error when I clicked on the link to Documentation in the Django admin. I also saw that admin docs had been moved from /django/contrib/admin/templates/admin_doc/ to /django/contrib/admindocs/templates/admin_doc/ but some part of my Django installation was still trying to get a template from /django/contrib/admin/templates/admin_doc/ Today, I installed revision 8520 and notice that the error is still there. This is what I get when I click on the Documentation link in my Django admin (in my case leading to http://localhost/vr/admin/doc/): TemplateDoesNotExist at /vr/admin/doc/ admin_doc/index.html Request Method: GET Request URL:http://localhost/vr/admin/doc/ Exception Type: TemplateDoesNotExist Exception Value: admin_doc/index.html Exception Location: /Library/Frameworks/Python.framework/Versions/2.5/ lib/python2.5/site-packages/django/template/loader.py in find_template_source, line 73 - And in the report for template searching I see the following: Using loader django.template.loaders.app_directories.load_template_source: * /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ site-packages/django/contrib/admin/templates/admin_doc/index.html (File does not exist) As you see some part of the code is looking for the admin index template in: /django/contrib/admin/templates/admin_doc/index.html instead of: /django/contrib/admindocs/templates/admin_doc/index.html Am I alone with this problem? Traceback listed below. Regards Ulf --- Environment: Request Method: GET Request URL: http://localhost/vr/admin/doc/ Django Version: 1.0-beta_1-SVN-8520 Python Version: 2.5.1 Installed Applications: ['vr.isi', 'vr.org', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin'] Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware') Template Loader Error: Django tried loading these templates, in this order: Using loader django.template.loaders.filesystem.load_template_source: /var/local/web/vr/templates/admin_doc/index.html (File does not exist) /Users/ulf/web/vr/templates/admin_doc/index.html (File does not exist) Using loader django.template.loaders.app_directories.load_template_source: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site- packages/django/contrib/admin/templates/admin_doc/index.html (File does not exist) Traceback: File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ site-packages/django/core/handlers/base.py" in get_response 86. response = callback(request, *callback_args, **callback_kwargs) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ site-packages/django/contrib/admin/views/decorators.py" in _checklogin 61. return view_func(request, *args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ site-packages/django/contrib/admindocs/views.py" in doc_index 29. }, context_instance=RequestContext(request)) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ site-packages/django/shortcuts/__init__.py" in render_to_response 18. return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ site-packages/django/template/loader.py" in render_to_string 102. t = get_template(template_name) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ site-packages/django/template/loader.py" in get_template 80. source, origin = find_template_source(template_name) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ site-packages/django/template/loader.py" in find_template_source 73. raise TemplateDoesNotExist, name Exception Type: TemplateDoesNotExist at /vr/admin/doc/ Exception Value: admin_doc/index.html --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---