Hi,
I use Django 1.3.
sample/
static/
js/jquery.1.6.1.min.js
css/
settings.py
APP_DIR = os.path.abspath(os.path.dirname(__file__))
STATIC_ROOT = os.path.join(APP_DIR, 'static/')
STATIC_URL = '
http://192.168.1.141:44/static/'
TEMPLATE_DIRS = (
os.path.join(APP_DIR, 'templates/')
)
urls.py
from django.conf.urls.defaults import patterns, include, url
urlpatterns = patterns('',
(r'^$', 'hydra.views.index'),
)
The above settings works.
Thanks
Madhu
On May 31, 9:44 am, Praveen Krishna R <
rpraveenkris...@gmail.com>
wrote:
> *Pasting one of my earlier replies to the same question*
> ***
> *
> *Please check django official docs to find out how static files are served
> on production and development server.
>
> in the dev server include a similiar snippet into your projects
> urls.py, urlpatterns:
>
> (r'^site_media/(?P<path>.*)$', 'django.views.static.serve',{'document_root':
> 'D:/djangoprojects/praveensprofile/templates/static'}),
>
> and in the templates something similar to the below text.
> <link href="/site_media/default.css" rel="stylesheet" type="text/css" />
>
> *Praveen Krishna R*