Re: Images and Stylesheets

2008-04-16 Thread Reisswolf
>> The only relevant thing to note based on your earlier post would be that '/media/' is by default used by the ADMIN_MEDIA_PREFIX setting. Perhaps the 'media' URL is experiencing some stompage... << Hi Doug, For pointing out the above pitfall, I would personally like to pay for your plane ticke

Re: Images and Stylesheets

2008-04-15 Thread Doug Van Horn
Your previous description sounds pretty close. Check your URLs in your HTML (mentioned by Karen Tracey in this thread). As a quick reference, here are the relevant entries in my settings.py: import os ROOT_DIR = os.path.normpath(os.path.dirname(__file__)) MEDIA_ROOT = os.path.join(ROOT_DIR, 'me

Re: Images and Stylesheets

2008-04-15 Thread Duke
This is strange its work for me U config the URL as i suggested and referce the image as below in the tab This should definitly work it even work for javascript. Thank Duke --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Images and Stylesheets

2008-04-15 Thread Karen Tracey
On Tue, Apr 15, 2008 at 6:34 AM, Reisswolf <[EMAIL PROTECTED]> wrote: > > I have followed Doug Van Horn's detailed explanation very closely. I > have also read the Django documentation page on this particular > topic. But for some reason, I still cannot get the thing to work. > > Here is my situ

Re: Images and Stylesheets

2008-04-15 Thread Reisswolf
Hi, Sorry to bother everyone again, but the suggestion above is not working either. Actually, I fail to see why the ROOT_PATH suggestion would work when hard-coding the path document_root is not working. But that could just as well be due to my ignorance. I have tried the ROOT_PATH suggestion.

Re: Images and Stylesheets

2008-04-15 Thread Duke
change the URL config as from django.conf.urls.defaults import * import os ROOT_PATH = os.path.dirname(__file__) urlpatterns = patterns('', # Example: (r'^hellodojo/', 'hello.views.hellodojo'), (r'^site_media/(?P.*)$', 'django.views.static.serve', {'document_ro

Re: Images and Stylesheets

2008-04-15 Thread Reisswolf
I have followed Doug Van Horn's detailed explanation very closely. I have also read the Django documentation page on this particular topic. But for some reason, I still cannot get the thing to work. Here is my situation: In my /Programming/Python/Django directory I have created a project calle

Re: Images and Stylesheets

2008-04-12 Thread greg
Thanks to everyone for the replies. Static content now makes sense to me, and I have things up and working. --greg --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send em

Re: Images and Stylesheets

2008-04-12 Thread andy baxter
Greg Lindstrom wrote: > Hello Everyone- > > I started learning Django at PyCon in Chicago and have worked most of > the way through the "Django Book" and Sams "Teach Yourself Django", as > well as "Head First HTML with CSS and XHTML". It's been quite a lot > for this old dog, but I'd like to t

Re: Images and Stylesheets

2008-04-11 Thread Doug Van Horn
Here's my rewording of your question: "How do I serve static content?" Websites need to serve up your HTML, CSS, JavaScript, and images. In Django, your views are serving up your HTML. What you need to do is serve up the rest of that stuff. The first way to serve static content, when you are

Re: Images and Stylesheets

2008-04-11 Thread Tim Chase
> I started learning Django at PyCon in Chicago and have worked > most of the way through the "Django Book" and Sams "Teach > Yourself Django", as well as "Head First HTML with CSS and > XHTML". It's been quite a lot for this old dog, but I'd like > to take a crack a writing my own web site u

Re: Images and Stylesheets

2008-04-11 Thread Justin Lilly
You're problems are one and the same. It seems you're runserver isn't configured to serve images. The bit of code you're looking for is: if settings.DEBUG: urlpatterns += patterns('', (r'^site_media/(?P.*)$', 'django.views.static.serve', {'document_root': '/path/to/media'}), ) wh

Images and Stylesheets

2008-04-11 Thread Greg Lindstrom
Hello Everyone- I started learning Django at PyCon in Chicago and have worked most of the way through the "Django Book" and Sams "Teach Yourself Django", as well as "Head First HTML with CSS and XHTML". It's been quite a lot for this old dog, but I'd like to take a crack a writing my own web site