Discuss Django "TemplateDoesNotExist at /admin/" in the Python Programming forum on Dev Shed. Django "TemplateDoesNotExist at /admin/" Python Programming forum discussing coding techniques, tips and tricks, and Zope related information. Python was designed from the ground up to be a completely object-oriented programming language.
The ASP Free website provides in-depth information on the latest developer tools available from Microsoft. Our cadre of writers, highly experienced industry experts, reveals the best ways to use established technologies as well as new and emerging technologies. Our coverage of Microsoft's development and administration technologies is among the most respected in the IT industry today.
ASP Free and Iron Speed Designer are giving away $5,500+ in FREE licenses. Iron Speed's RAD CASE toolset can save up to 80% of your coding time. One free license per week, one perpetual license per month! Download and Activate to enter!
Intel® Graphics Performance Analyzers is a powerful tool suite for analyzing and optimizing your games, media, and graphics-intensive applications. Used by some of the best developers on the planet, Intel GPA lets you maximize your app’s performance.
Posts: 5,309
Time spent in forums: 2 Months 2 Weeks 4 Days 7 h 25 m 36 sec
Reputation Power: 2348
Django "TemplateDoesNotExist at /admin/"
I'm going through the Django tutorials but it keeps throwing me.
I tried to add the admin thing to my test project but it didn't work and I have no idea what to do now.
Code:
Exception Type: TemplateDoesNotExist
Exception Value: admin/login.html
Exception Location: C:\Python25\Lib\site-packages\django\template\loader.py in find_template_source, line 72
Python Executable: C:\Python25\python.exe
Python Version: 2.5.0
Django tried loading these templates, in this order:
* Using loader django.template.loaders.filesystem.load_template_source:
* Using loader django.template.loaders.app_directories.load_template_source:
"All matter is merely energy condensed to a slow vibration. We are all one consciousness experiencing itself - subjectively. There is no such thing as death, life is only a dream. We are the imaginations of ourselves."
- Bill Hicks
"Truth is hidden in the subtle nature of the heart of everything, although it is invisible. One cannot see it from inside and neither from the surface. One can only live and experience it."
- Heart Sutra
Posts: 1
Time spent in forums: 13 m 47 sec
Reputation Power: 0
TemplateDoesNotExists on Win32 resolved !
It seems the Django installation (pre0.97) on Windows does not copy all the required files into the Python site-packages directory.
To correct this, just copy the following directories from the django source into their corresponding Python directories.
For example on my computer with Python 2.5
<Django sources from subversion or tar archive>\django\contrib\admin\media to C:\Python25\Lib\site-packages\django\contrib\admin\media
and
<Django sources from subversion or tar archive>\django\contrib\admin\templates to C:\Python25\Lib\site-packages\django\contrib\admin\templates
Posts: 5,309
Time spent in forums: 2 Months 2 Weeks 4 Days 7 h 25 m 36 sec
Reputation Power: 2348
Thanks,
I've put my Python experimentation on hold for the moment but I'll try your suggestions. I think I'll actually try the standard version instead of the development SVN checkout.
Posts: 6
Time spent in forums: 1 h 9 m 25 sec
Reputation Power: 0
Yup it worked. Thanks a lot.
It seems that the Django distro. is a little shaky on windows.
The step-by-step execution of operations indicated in the on-line tutorial will sometimes lead to unexpected error messages. Then you need to get to the forums to find a solution.
I have also encountered problems in setting up the initial project folders (there are some path issues in the associated python scripts).
Posts: 2,270
Time spent in forums: 1 Month 2 Weeks 4 Days 15 h 34 m 57 sec
Reputation Power: 1734
There aren't any installation issues on Windows. I never used the install script, I manually did so by hand (as suggested in the install instructions).
__________________
When you ask a question, be prepared to tell us: what have you tried? If you think you don't need to try anything, we will never be interested in helping you. If you agree with the link, and you refuse to answer that question, you are being a hypocrite.
Need help with broken code? Your question should be like a good bug report: (1) It has the smallest number of steps to reproduce the problem you see (2) It tells us precisely what you expected to see and (3) It tells us what you saw and how it differed from what you expected. We need all three to help you. Want better answers? Tell us what you Googled for and what steps you took to answer your own question.
Posts: 6
Time spent in forums: 1 h 9 m 25 sec
Reputation Power: 0
Quote:
Originally Posted by Oler1s
There aren't any installation issues on Windows. I never used the install script, I manually did so by hand (as suggested in the install instructions).
I have downloaded the 0.96 official djingo version.
According to the install.txt file in the /docs folder (under the "Installing the official version" section) one should perform the following steps:
1. Unpack the tar.gz archive
2. go to the folder created by the unpacking folder
2. run the setup.py install command
Note: the same instructions are also listed on the Django official website (see installation guide).
On windows however, doing just that doesn't work. Running the install script will lead you to an error message:
running install
running build
running build_py
error: package directory '\django' does not exist
Apparently, the solution is to change line 24 of the setup.py script from:
Doing this will allow the script to run without a problem.
However, I see now that the setup script does not copy all the files and folders (such as the /contrib/admin/media and contrib\admin\templates folders that caused this thread discussions).
I am a noob with Djingo, and all I can do for now is to follow the written instructions in a blindly fashion. So far I had to hit the forums twice just to be able to follow the tutorial lessons.
Should I re-install Djingo manually (bypassing the setup script)?
If I stick with the current installation, should I expect additional problems?
Posts: 10,101
Time spent in forums: 3 Months 3 Weeks 6 h 8 m 34 sec
Reputation Power: 0
Hi folks,
As part of Django's triage team I feel I should step in
All these install glitches should be well fixed now in the svn checkout, and I strongly recommend using that instead of the 0.96 version (there's many bugfixes, and lots of new cool stuff - the main one being the complete unicodisation of everything).
Unfortunately, none of the developers use windows, and very few people seem to develop on windows, so it's easier for glitches to stick around on that platform.
We try really hard to keep the tutorials working smoothly, but things do get broken. If you DO run into issues with these, please drop by code.djangoproject.com and create a new ticket with what went wrong.
Posts: 5,309
Time spent in forums: 2 Months 2 Weeks 4 Days 7 h 25 m 36 sec
Reputation Power: 2348
Thanks,
I was thinking about the Python files in the wrong way before. I did install the Official release (0.96) and that installed itself properly. But yeah, now I understand the file structure I'll try the SVN version. It's simple - I just have to checkout django to it's own folder and then copy the django subfolder to Python\Lib\site-packages\django\
Anyway it seems pretty cool so far - I can see the advantages, but I'm still getting confused too easily! Lots of new, obscure syntax to learn
Posts: 1
Time spent in forums: 17 m 15 sec
Reputation Power: 0
More files missing for Django 0.96
I had problems seeing the "Today" and "Now" features associated with the "Date published:" field in the django tutorial. I also had the admin page problems noted earlier in this thread.
As I compared the contents of C:\Python25\Lib\site-packages\django with the contents of C:\Django-0.96\django I noticed that more template directories that were missing in other subfolders (not just in the admin folder).
I fixed this by copying the django folder in "C:\Django-0.96" to "C:\Python25\Lib\site-packages\"
Posts: 1
Time spent in forums: 3 m 32 sec
Reputation Power: 0
Gracias!thank you!!!!!!!!!!!!!!!!!!
chicos por fin consegui en este foro respuestas a lo que buscaba!!!que fino que sean tan activos!!!tenia un rollo con mi instalacion de django y por fin consegui estos post explicadolo todo!!!
Posts: 6
Time spent in forums: 1 h 9 m 25 sec
Reputation Power: 0
The "safe" filter is no longer avaialble in django 0.97?
I have a problem with Django's "safe" filter.
It seems that it does not exist although the official documentation lists it as a valid filter.
I have downloaded the latest SVN version: 0.97-pre-SVN-6658.
I try to use the "safe" filter in one of my templates but an exception gets triggered indicating that the "safe" filter is not recognized as being valid.
I haver looked in the "defaultfilters.py" in Django's source code and indeed it is not there. Also the "defaulttags.py" does not include the "autoescape" tag, so I cannot use that either.
I really need to make Django to bypass the autoescape of HTML text, so any help is appreciated.