Here is my settings.py file:
http://dpaste.com/660563/
Here is the template which I want to style:
http://dpaste.com/660565/
And here is my urls.py file:
http://dpaste.com/660568/
Let me know if anything else is needed, such as the views.py file or something.
thanks,
Guillaume
On Wed, Nov 23, 2011 at 7:33 AM, Ivo Brodien <ib@brodien.de> wrote:
In your original post you had the url like this:(r'^home/$','myapp.views.homepage'),than your the url starts with view instead of home so there might be something wrong.just paste these files into somthing like dpaste.com- settings.py- myapp.views.homepage- urls.pycheersOn Nov 23, 2011, at 0:29 , Guillaume Chorn wrote:Thank you Ivo. Your suggestion makes a lot of sense so I tried it out. Unfortunately, after adding TEMPLATE_CONTEXT_PROCESSORS and its associated tuple into the settings.py file, I tried to restart the development server to see if it worked and it didn't. I checked the page source again and it's still looking for /view/stylesheet.css. Am I missing something else?
thanks,
GuillaumeOn Tue, Nov 22, 2011 at 10:42 PM, Ivo Brodien <ib@brodien.de> wrote:Finally, I have another question. In my settings.py file, there is actually no section for TEMPLATE_CONTEXT_PROCESSORS. I have noticed in the documentationyes.
put this in there:("django.contrib.auth.context_processors.auth", "django.core.context_processors.debug", "django.core.context_processors.i18n", "django.core.context_processors.media", "django.core.context_processors.static", "django.core.context_processors.tz", "django.contrib.messages.context_processors.messages")and try again.What happens in your template is that {{ STATIC_URL }} is empty because the context processor ""django.core.context_processors.static"" did not put the STATIC_URL into the context. so your path to the file becomes: /view/stylesheet.css instead of /static/stylesheet.cssYou have to put the CSS file in a directory called static as mentioned before.
--
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 http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment