Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming
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.


Tutorials
| Forums

Download to Enter
| Contest Rules

DOWNLOAD INTEL® GPA FOR FREE

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 3rd, 2007, 11:16 AM
b3n's Avatar
b3n b3n is offline
Prisoner of the Sun
Dev Shed God (5000 - 5499 posts)
 
Join Date: Jul 2004
Location: The Mews At Windsor Heights
Posts: 5,309 b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 4 Days 7 h 25 m 36 sec
Reputation Power: 2348
Facebook Orkut
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:

http://www.djangoproject.com/documentation/tutorial02/
__________________
.
:: My blip.fm tunes :: Web Design Feeds :: Web Dev Feeds :: CheatSheets :: PHP :: MySQL :: 13 Moon FB App.

"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

Reply With Quote
  #2  
Old July 19th, 2007, 07:38 AM
sebastien sebastien is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 1 sebastien User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 47 sec
Reputation Power: 0
Thumbs up 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

Stop and restart your django server:
CTRL+C
Code:
manager.py runserver


and go to http://localhost:8000/admin/

And no more TemplateDoesNotExists error !
Comments on this post
andrei.fecioru agrees: A much needed quick fix.

Reply With Quote
  #3  
Old July 19th, 2007, 09:10 AM
b3n's Avatar
b3n b3n is offline
Prisoner of the Sun
Dev Shed God (5000 - 5499 posts)
 
Join Date: Jul 2004
Location: The Mews At Windsor Heights
Posts: 5,309 b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 4 Days 7 h 25 m 36 sec
Reputation Power: 2348
Facebook Orkut
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.

Reply With Quote
  #4  
Old August 3rd, 2007, 03:00 PM
andrei.fecioru andrei.fecioru is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2007
Location: Romania
Posts: 6 andrei.fecioru User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 9 m 25 sec
Reputation Power: 0
Send a message via Yahoo to andrei.fecioru Send a message via Google Talk to andrei.fecioru
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).

Thanks again for your post.

Reply With Quote
  #5  
Old August 3rd, 2007, 05:59 PM
Oler1s Oler1s is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 2006
Posts: 2,270 Oler1s User rank is General 11st Grade (Above 100000 Reputation Level)Oler1s User rank is General 11st Grade (Above 100000 Reputation Level)Oler1s User rank is General 11st Grade (Above 100000 Reputation Level)Oler1s User rank is General 11st Grade (Above 100000 Reputation Level)Oler1s User rank is General 11st Grade (Above 100000 Reputation Level)Oler1s User rank is General 11st Grade (Above 100000 Reputation Level)Oler1s User rank is General 11st Grade (Above 100000 Reputation Level)Oler1s User rank is General 11st Grade (Above 100000 Reputation Level)Oler1s User rank is General 11st Grade (Above 100000 Reputation Level)Oler1s User rank is General 11st Grade (Above 100000 Reputation Level)Oler1s User rank is General 11st Grade (Above 100000 Reputation Level)Oler1s User rank is General 11st Grade (Above 100000 Reputation Level)Oler1s User rank is General 11st Grade (Above 100000 Reputation Level)Oler1s User rank is General 11st Grade (Above 100000 Reputation Level)Oler1s User rank is General 11st Grade (Above 100000 Reputation Level)Oler1s User rank is General 11st Grade (Above 100000 Reputation Level) 
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.

Reply With Quote
  #6  
Old August 3rd, 2007, 11:56 PM
andrei.fecioru andrei.fecioru is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2007
Location: Romania
Posts: 6 andrei.fecioru User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 9 m 25 sec
Reputation Power: 0
Send a message via Yahoo to andrei.fecioru Send a message via Google Talk to andrei.fecioru
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:

package = dirpath[len_root_dir:].lstrip('/').replace('/', '.')

to

package = dirpath[len_root_dir:].lstrip('\\').replace('\\', '.')

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?

Thanks again for your support!

Reply With Quote
  #7  
Old August 4th, 2007, 07:27 AM
SimonGreenhill's Avatar
SimonGreenhill SimonGreenhill is offline
(retired)
Dev Shed God 11th Plane (10000 - 10499 posts)
 
Join Date: Dec 2003
Location: The Laboratory
Posts: 10,101 SimonGreenhill User rank is General 6th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 6th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 6th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 6th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 6th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 6th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 6th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 6th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 6th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 6th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 6th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 6th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 6th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 6th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 6th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 6th Grade (Above 100000 Reputation Level)  Folding Points: 4925 Folding Title: Novice Folder
Time spent in forums: 3 Months 3 Weeks 6 h 8 m 34 sec
Reputation Power: 0
Facebook
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.

--Simon

Reply With Quote
  #8  
Old August 9th, 2007, 09:51 AM
b3n's Avatar
b3n b3n is offline
Prisoner of the Sun
Dev Shed God (5000 - 5499 posts)
 
Join Date: Jul 2004
Location: The Mews At Windsor Heights
Posts: 5,309 b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level)b3n User rank is General 21st Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 4 Days 7 h 25 m 36 sec
Reputation Power: 2348
Facebook Orkut
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

Reply With Quote
  #9  
Old September 18th, 2007, 12:55 PM
GoRonPaul GoRonPaul is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2007
Posts: 1 GoRonPaul User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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\"

Reply With Quote
  #10  
Old December 5th, 2007, 04:08 PM
laslorma laslorma is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Posts: 1 laslorma User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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!!!

thank you very much!!

Reply With Quote
  #11  
Old January 12th, 2008, 09:59 AM
andrei.fecioru andrei.fecioru is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2007
Location: Romania
Posts: 6 andrei.fecioru User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 9 m 25 sec
Reputation Power: 0
Send a message via Yahoo to andrei.fecioru Send a message via Google Talk to andrei.fecioru
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Django "TemplateDoesNotExist at /admin/"


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 10 - Follow our Sitemap