Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#653 closed defect (fixed)

setup.py doesn't create django/contrib/admin/templates/

Reported by: Tom Tobin <korpios@…> Owned by: adrian
Component: contrib.admin Version: master
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

With a recent svn pull (968) and a fresh install using setup.py, django/contrib/admin/templates/ is not copied over. The result is that the admin interface fails with a traceback:

There's been an error:

Traceback (most recent call last):

  File "/home/korpios/devel/py3p/django/core/handlers/base.py", line 68, in get_response
    response = callback(request, **param_dict)

  File "/home/korpios/devel/py3p/django/contrib/admin/views/decorators.py", line 60, in _checklogin
    return _display_login_form(request, message)

  File "/home/korpios/devel/py3p/django/contrib/admin/views/decorators.py", line 26, in _display_login_form
    }, context_instance=DjangoContext(request))

  File "/home/korpios/devel/py3p/django/core/extensions.py", line 11, in render_to_response
    return HttpResponse(loader.render_to_string(*args, **kwargs))

  File "/home/korpios/devel/py3p/django/core/template/loader.py", line 77, in render_to_string
    t = get_template(template_name)

  File "/home/korpios/devel/py3p/django/core/template/loader.py", line 57, in get_template
    return get_template_from_string(load_template_source(template_name))

  File "/home/korpios/devel/py3p/django/core/template/loader.py", line 47, in load_template_source
    raise TemplateDoesNotExist, name

TemplateDoesNotExist: admin/login

This issue is likely not a problem for those merely linking to the checked out django directory, rather than using setup.py.

The workaround is to copy django/contrib/admin/templates/ from the checked out django directory to the corresponding location in the installed directory.

Change History (6)

comment:1 Changed 10 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [972]) Fixed #653 -- setup.up now accounts for admin file moves. Thanks, korpios@…

comment:2 Changed 8 years ago by korpios

  • Reporter changed from korpios@… to Tom Tobin <korpios@…>

comment:3 Changed 8 years ago by kumar.nimesh@…

I started django-ing since 3 weeks.
OS is WinXP. setup.py does create django/contrib/admin/templates/ but the problem still exist for me. Works on linux.

TemplateDoesNotExist at /admin/
admin/login.html

Any help?

comment:4 follow-up: Changed 8 years ago by Simon G <dev@…>

Kumar - please take support requests to the django-users mailing list. What version of Django are you using?

comment:5 in reply to: ↑ 4 Changed 8 years ago by anonymous

Replying to Simon G <dev@simon.net.nz>:

Kumar - please take support requests to the django-users mailing list. What version of Django are you using?

Django Ver 0.96.1. downloaded on 10/26/07. I will seek support from user list from now on. Thank you.

comment:6 Changed 7 years ago by gherndon@…

  • Version set to SVN

i saw this behavior when installing django today on osx 10.5.2+, python 2.5.1 and django from SVN version build 7049.

i did a ln -s from my django-svn/django directory to my site-packages directory and it's working now

-geo

Note: See TracTickets for help on using tickets.
Back to Top