You can also refer to this page in the documentation for more information: http://www.djangoproject.com/documentation/static_files/
-------- Nathan Ostgard On Jul 17, 11:35 am, Dmitriy Sodrianov <[EMAIL PROTECTED]> wrote: > Hello everyone! > > Let me ask for help with the following problem: > > I want to attach css file to my template and I'm doing it in this > steps. > > 1) First edited setting.py file, MEDIA_URL and MEDIA_ROOT variables in > this way: > > MEDIA_ROOT = '/home/sodrian/versatility/static/' > > MEDIA_URL = 'http://127.0.0.1:8000/static/' > > 2) then in my base.html template pointed to the cascade style sheet > file: > > <link rel="stylesheet" href="/static/style.css" type="text/css" > media="screen" /> > > But unluckily it doesn't work. I tries different solutions such as: > > <link rel="stylesheet" href="style.css" type="text/css" > media="screen" /> > > <link rel="stylesheet" href="http://127.0.0.1/static/style.css" > type="text/css" media="screen" /> > > but nothing worked, template is shown but css is not loaded. > > Could anyone solve this problem? --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---