Friday 15 April 2011

css - django stylesheet donot link with the image file -



css - django stylesheet donot link with the image file -

in settings.py have static setting this:

static_root = ' ' static_url = '/static/' staticfiles_dirs = ( os.path.join(base_dir, 'static'), ) staticfiles_finders = ( 'django.contrib.staticfiles.finders.filesystemfinder', 'django.contrib.staticfiles.finders.appdirectoriesfinder', #'django.contrib.staticfiles.finders.defaultstoragefinder', )

and project construction :

projectname app1 app2 projectname static css js images

and have written css in named style.css :

input.search { width: 279px; border: none; background: #fff url(../images/input.gif) no-repeat; padding: 6px 10px; color: #1e67a8; font-weight: bold; }

when didnt display image have assigned in style.css..

whats problem ??

you may need in settings.py

staticfiles_dirs = ( 'static', os.path.join(os.path.dirname(__file__), '..', 'static'),)

css django templates static

No comments:

Post a Comment