Re: Can't get css working

2009-10-17 Thread bruno desthuilliers
On 17 oct, 15:26, David wrote: > Finally I solved it, and my first suspicion of me being to stupid > proved to be true. > I've put my url-settings in the projects-url-file, instead of the > app's. Don't feel stupid - we all do this kind of mistakes, and sometimes even worse. Been here, done th

Re: Can't get css working

2009-10-17 Thread bruno desthuilliers
On 16 oct, 11:09, David wrote: > > The "interesting discussion" was actually a practical example of a > > setup that is known to work and really helps avoiding typos. > > Of course I included your suggestion before I was replying. Sorry to ask but since you didn't mention it... > The only > thi

Re: Can't get css working

2009-10-17 Thread David
Finally I solved it, and my first suspicion of me being to stupid proved to be true. I've put my url-settings in the projects-url-file, instead of the app's. However, now I can sleep again :) Thanks everybody for looking into this, and at least I've learned about clean setting-files! --~--~

Re: Can't get css working

2009-10-17 Thread David
Finally I solved it, and my first suspicion of me being to stupid proved to be true. I've put my url-settings in the projects-url-file, instead of the app's. However, now I can sleep again :) Thanks everybody for looking into this, and at least I've learned about clean setting-files! --~--~

Re: Can't get css working

2009-10-16 Thread David
> The "interesting discussion" was actually a practical example of a > setup that is known to work and really helps avoiding typos. Of course I included your suggestion before I was replying. The only thing i did not get was the part with TEMPLATE_CONTEXT_PROCESSORS, so I hardcoded the URL in the

Re: Can't get css working

2009-10-15 Thread bruno desthuilliers
On 15 oct, 17:44, David wrote: > Thank you for the interesting discussion. > Still, my original problem is bothering me. The "interesting discussion" was actually a practical example of a setup that is known to work and really helps avoiding typos. Did you try to rewrite your code according to

Re: Can't get css working

2009-10-15 Thread David
thanks for your help! I just won't get it. The "GET /media_site/style.css HTTP/1.1" 404 2118 is triggered by the link-tag in the template. After it checks in the urls.py. The output is the same, whether I have the "static-stuff" configured or not. So I probabely can't tell whether the url wasn't

Re: Can't get css working

2009-10-15 Thread Jim McGaw
Sorry, David, didn't mean to hijack your discussion! Looking over your original code, is it possible you need to use the += operator? So, you have your urlpatterns, and then you add one for the static media below: urlpatterns = pattern('', # patterns for site here ) urlpatterns += patterns(

Re: Can't get css working

2009-10-15 Thread David
Thank you for the interesting discussion. Still, my original problem is bothering me. Any idea what I could do to narrow it down? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

Re: Can't get css working

2009-10-15 Thread Bayuadji
Hi Bruno, Nice tips you got. thanks :) -djibon- On 10/15/09, bruno desthuilliers wrote: > > On 14 oct, 19:34, David wrote: >> Thanks JIm, didn't solve my problem, but always good to learn some >> best practices. Any particular reason  why >> {'document_root' : os.path.join(settings.CURRENT_PA

Re: Can't get css working

2009-10-15 Thread bruno desthuilliers
On 14 oct, 19:34, David wrote: > Thanks JIm, didn't solve my problem, but always good to learn some > best practices. Any particular reason  why > {'document_root' : os.path.join(settings.CURRENT_PATH,"media_site") }) > is better than > {'document_root': settings.MEDIA_ROOT} > in settings.py? Ob

Re: Can't get css working

2009-10-14 Thread Jim McGaw
Nope, that's a much better solution, since you don't repeat yourself nearly as much. --~--~-~--~~~---~--~~ 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

Re: Can't get css working

2009-10-14 Thread David
Thanks JIm, didn't solve my problem, but always good to learn some best practices. Any particular reason why {'document_root' : os.path.join(settings.CURRENT_PATH,"media_site") }) is better than {'document_root': settings.MEDIA_ROOT} in settings.py? On 14 Okt., 18:17, Jim McGaw wrote: > Hi Davi

Re: Can't get css working

2009-10-14 Thread Jim McGaw
Hi David, I don't anything wrong with what you've typed. I have one suggestion: use the os.path module from Python to avoid hard-coding the paths to your project. Inside of settings.py, you could add: import os # CURRENT_PATH points to your project's root directory # (the directory in which your

Can't get css working

2009-10-14 Thread David
Hello I can't get my css working. I read http://docs.djangoproject.com/en/dev/howto/static-files/ and many stack overflow and group entries, and I think I have what everybody hast that has it working, yet it doesn't work! In settings.py: MEDIA_ROOT ="/home/myhome/workspaces/django-project/media_s