Re: Is there a standard way to implement the top level of my site?
On Mon, Nov 7, 2011 at 10:51 PM, M. Herold <digitallimit0@gmail.com> wrote:
> With that, I'm trying to link a static style.css file for development,
> but it's not working worth a damn:
>
> if settings.DEBUG:
> urlpatterns += patterns('',
> (r'^static/(?P<path>.*)$', 'django.views.static.serve',
> {'document_root': 'static/'}),
> )
>
document_root is not a relative path, it is an absolute path to your
document root.
This serves "<project_root>/doc-build/html/" from "docs/"
if settings.DEBUG:
docs_root = os.path.join(os.path.dirname(__file__), 'doc-build', 'html')
urlpatterns += patterns('',
(r'docs/$', 'django.views.static.serve'
{ 'document_root': docs_root, 'path': 'index.html' }),
(r'docs/(?P<path>.*)$', 'django.views.static.serve',
{ 'document_root': docs_root }),)
Cheers
Tom
--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home