|
List Info
Thread: Tutorial 2 admin Template not found
|
|
| Tutorial 2 admin Template not found |

|
2007-12-21 22:30:41 |
I have 0.96 installed and I'm working on Tutorial 2:
http://www.djangoproject.com/documentation/0.96/tutor
ial02/
Everything from Tutorial 1 worked just fine, but once I
follow the
steps under "Activate the admin site" and try to
visit admin, I get a
TemplateDoesNotExist for admin/login.html
I checked and I do have that file under
/System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/site-packages/dj
ango/
contrib/admin/templates/admin
I hope that's where it's actually supposed to be?
I've checked permissions and everyone has at least read
rights.
Let me know if more info is needed - I'm a noob.
***begin traceback***
Traceback (most recent call last):
File
"/Library/Python/2.5/site-packages/django/core/handlers
/base.py"
in get_response
77. response = callback(request, *callback_args,
**callback_kwargs)
File
"/Library/Python/2.5/site-packages/django/contrib/admin
/views/
decorators.py" in _checklogin
65. return _display_login_form(request, message)
File
"/Library/Python/2.5/site-packages/django/contrib/admin
/views/
decorators.py" in _display_login_form
28. }, context_instance=template.RequestContext(request))
File
"/Library/Python/2.5/site-packages/django/shortcuts/__i
nit__.py"
in render_to_response
10. return HttpResponse(loader.render_to_string(*args,
**kwargs))
File
"/Library/Python/2.5/site-packages/django/template/load
er.py" in
render_to_string
101. t = get_template(template_name)
File
"/Library/Python/2.5/site-packages/django/template/load
er.py" in
get_template
79. source, origin = find_template_source(template_name)
File
"/Library/Python/2.5/site-packages/django/template/load
er.py" in
find_template_source
72. raise TemplateDoesNotExist, name
TemplateDoesNotExist at /admin/
admin/login.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
django-users-unsubscribe googlegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Tutorial 2 admin Template not found |

|
2007-12-22 03:22:56 |
So I've discovered that I can get the admin page to show up
if I add '/
System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/
site-packages/django/contrib/admin/templates' to
TEMPLATE_DIRS in the
settings.py file for my project (for some reason this
doesn't work in
global_settings.py).
But admin shows up with no styling. Looks like my
"MEDIA_ROOT" is
wrong? I tried entering
'/System/Library/Frameworks/Python.framework/
Versions/2.5/lib/python2.5/site-packages/django/contrib/admi
n/media',
but that doesn't work...and how am I to know the MEDIA_URL?
Don't I
have to map a URL or something? Is this stuff just not
covered in the
tutorial?
Clearly I'm confused and have lots of questions - hopefully
someone
can help me make sense of at least one or two of them.
Thanks so much for your help.
--~--~---------~--~----~------------~-------~--~----~
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
django-users-unsubscribe googlegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Tutorial 2 admin Template not found |
  United States |
2007-12-22 03:47:59 |
I have no problems going through the tutorial (and creating
my own apps)
on my mac. Are you using the development server to do all of
this? I
could see where you'd have the problems you are having if
you are trying
this all through apache/mod_python.
How did you install django? from source? I don't know if
there is a
darwinports or a fink package out there. The way I installed
django on
my mac (running leopard) was like this:
cd /Library/Python/2.5/site-packages
sudo |svn co http://code.djangoproject.com/svn/django/trunk/django
django
I never had to do anything like manually configure the admin
TEMPLATE_DIRS.
I am using the development version, and I haven't been
around long
enough to know for sure, but you may be experiencing a bug
related to
django-0.96/mac.
You do need to map a URL for the admin media url in a
production
server--like apache. On my production server, I haven't
bothered to get
it working, so my admin interface is very boring and plain
looking, but
I don't really use it anyway. On the django built-in
development server
it should just work.
Good Luck!
Jeff Anderson
|
kadavy wrote:
> So I've discovered that I can get the admin page to
show up if I add '/
>
System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/
> site-packages/django/contrib/admin/templates' to
TEMPLATE_DIRS in the
> settings.py file for my project (for some reason this
doesn't work in
> global_settings.py).
>
> But admin shows up with no styling. Looks like my
"MEDIA_ROOT" is
> wrong? I tried entering
'/System/Library/Frameworks/Python.framework/
>
Versions/2.5/lib/python2.5/site-packages/django/contrib/admi
n/media',
> but that doesn't work...and how am I to know the
MEDIA_URL? Don't I
> have to map a URL or something? Is this stuff just not
covered in the
> tutorial?
>
> Clearly I'm confused and have lots of questions -
hopefully someone
> can help me make sense of at least one or two of them.
>
> Thanks so much for your help.
> --~--~---------~--~----~------------~-------~--~----~
> 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
django-users-unsubscribe googlegroups.com
> For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
>
|
|
| Re: Tutorial 2 admin Template not found |

|
2007-12-22 11:51:50 |
>
> So I've discovered that I can get the admin page to
show up if I add '/
>
System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/
> site-packages/django/contrib/admin/templates' to
TEMPLATE_DIRS in the
> settings.py file for my project (for some reason this
doesn't work in
> global_settings.py).
Looks almost like your TEMPLATE_LOADERS in settings.py
doesn't have
the app loader enabled. Check that.
> But admin shows up with no styling. Looks like my
"MEDIA_ROOT" is
> wrong? I tried entering
'/System/Library/Frameworks/Python.framework/
>
Versions/2.5/lib/python2.5/site-packages/django/contrib/admi
n/media',
> but that doesn't work...and how am I to know the
MEDIA_URL? Don't I
> have to map a URL or something? Is this stuff just not
covered in the
> tutorial?
You need to set your ADMIN_MEDIA_PREFIX
(http://www.djangoproject.com/documentatio
n/settings/#admin-media-prefix)
appropriately, as well as make sure it doesn't collide with
your own
MEDIA_URL.
If you're using the built-in webserver (runserver) it will
handle
mapping based on that ADMIN_MEDIA_PREFIX.
For serving your own static media, read though this:
http://www.djangoproject.com/documentation/static_files/
Michael Trier
blog.michaeltrier.com
--~--~---------~--~----~------------~-------~--~----~
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
django-users-unsubscribe googlegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Tutorial 2 admin Template not found |

|
2007-12-23 19:24:22 |
Thanks, everyone,
Jeff, I installed the SVN version, like you said - and it
worked! I
guess I was under the (apparently false) impression that the
official
release would be better to install than the SVN version.
On Dec 22, 3:47 am, Jeff Anderson <jeffe... programmerq.net> wrote:
> I have no problems going through the tutorial (and
creating my own apps)
> on my mac. Are you using the development server to do
all of this? I
> could see where you'd have the problems you are having
if you are trying
> this all through apache/mod_python.
> How did you install django? from source? I don't know
if there is a
> darwinports or a fink package out there. The way I
installed django on
> my mac (running leopard) was like this:
>
> cd /Library/Python/2.5/site-packages
> sudo |svn cohttp://code.djangoproject.com/svn/django/trunk/django
django
>
> I never had to do anything like manually configure the
admin TEMPLATE_DIRS.
> I am using the development version, and I haven't been
around long
> enough to know for sure, but you may be experiencing a
bug related to
> django-0.96/mac.
>
> You do need to map a URL for the admin media url in a
production
> server--like apache. On my production server, I haven't
bothered to get
> it working, so my admin interface is very boring and
plain looking, but
> I don't really use it anyway. On the django built-in
development server
> it should just work.
>
> Good Luck!
>
> Jeff Anderson
> |
>
> kadavy wrote:
> > So I've discovered that I can get the admin page
to show up if I add '/
> >
System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/
> > site-packages/django/contrib/admin/templates' to
TEMPLATE_DIRS in the
> > settings.py file for my project (for some reason
this doesn't work in
> > global_settings.py).
>
> > But admin shows up with no styling. Looks like my
"MEDIA_ROOT" is
> > wrong? I tried entering
'/System/Library/Frameworks/Python.framework/
> >
Versions/2.5/lib/python2.5/site-packages/django/contrib/admi
n/media',
> > but that doesn't work...and how am I to know the
MEDIA_URL? Don't I
> > have to map a URL or something? Is this stuff just
not covered in the
> > tutorial?
>
> > Clearly I'm confused and have lots of questions -
hopefully someone
> > can help me make sense of at least one or two of
them.
>
> > Thanks so much for your help.
> > >
>
>
> signature.asc
> 1KDownload
--~--~---------~--~----~------------~-------~--~----~
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
django-users-unsubscribe googlegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
[1-5]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|