Re: Help on adding CSS to django project

2011-02-06 Thread Martin Tiršel
Hello, please read the documentation, everything you need to know, is described there. For development: http://docs.djangoproject.com/en/1.2/howto/static-files/ And for production: http://docs.djangoproject.com/en/1.2/howto/deployment/modwsgi/ Regards, Martin On Mon, 07 Feb 2011 00:47:27

Re: Help on adding CSS to django project

2011-02-06 Thread h@ck5t0ck
Guys, Can anyone zipped a working django project which made use of css and mail it to me at hackstock...@gmail.com so that I can study how he went about doing it? Thanks in advance. Best Wishes, h@ck5t0ck On Feb 6, 12:36 pm, "h@ck5t0ck" wrote: > Ronghui Yu, > Can you

Re: Help on adding CSS to django project

2011-02-06 Thread h@ck5t0ck
Ronghui Yu, Can you please tell me which middleware you're talking about here? I've still not been able to get my css to work. On Feb 5, 11:29 am, Ronghui Yu wrote: > It seems that you need to setup your web server to support static contents, > django has a middleware to do

Re: Help on adding CSS to django project

2011-02-05 Thread Ronghui Yu
It seems that you need to setup your web server to support static contents, django has a middleware to do the job, but it is not recommended to use it in product environment. I had this similar problem when I started to learn django. On Sat, Feb 5, 2011 at 6:15 AM, Chris Hannam

Re: Help on adding CSS to django project

2011-02-04 Thread Chris Hannam
Apologies for that premature send: > Hi, > The way I have approached this is to have a static dir set in my urls.py: > > (r'^static/(?P.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_ROOT } ) settings.py has the following MEDIA_ROOT =

Re: Help on adding CSS to django project

2011-02-04 Thread Chris Hannam
> > Hi guys, > am very new to django and am having troubles adding css to my pages > even though i've found some tutorials online > and followed it word for word. Hi, The way I have approached this is to have a static dir set in my urls.py: -- You received this message because you are

Re: Help on adding CSS to django project

2011-02-04 Thread W. Craig Trader
The exact method of adding media resources to a Django application will depend on a number of factors (OS, Webserver, project layout) but it's fairly straight-forward. Here's the approach that I use: Assume that my Django project is named 'foo' and that any media (CSS, Javascript, etc) files I

Re: Help on adding CSS to django project

2011-02-04 Thread h@ck5t0ck
Hi, Thanks for your quick reply. I tried what you showed me but it didn't work. Below are the contents of my settings.py and urls.py files. Could you please study them and point out where am going wrong? SETTINGS.PY === import os DEBUG =

Re: Help on adding CSS to django project

2011-02-04 Thread ozgur yilmaz
In your template: In your urls.py: site_media = os.path.join(os.path.dirname(__file__),'site_media') urlpatterns = patterns('', (r'^site_media/(?P.*)$' , 'django.views.static.serve',{'document_root':site_media}), ) Maybe helps... 2011/2/4 h@ck5t0ck > Hi

Help on adding CSS to django project

2011-02-04 Thread h@ck5t0ck
Hi guys, am very new to django and am having troubles adding css to my pages even though i've found some tutorials online and followed it word for word. Can anyone please help me urgently? I really appreciate your help. Best Wishes, h@ck5t0ck -- You received this message because you are