UrlConf problem when capture value from url

7 views
Skip to first unread message

DanYun Liu

unread,
Apr 20, 2012, 8:57:31 AM4/20/12
to django...@googlegroups.com
When I use url pattern like this "/search/(\s+)","myview" : django will set mydomain/search as the root domain, so the css and js will not request correctly:

in my template: 
<link rel="stylesheet" type="text/css" href="styles/index.css"/>

the request url for the index.css  is: http://mydomain/search/styles/index.css but not:

is there any solution?


--
Pursuit the freedom of the soul.

Daniel Sokolowski

unread,
Apr 20, 2012, 10:11:26 AM4/20/12
to django...@googlegroups.com
 
<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}styles/index.css"/>
 
Does that help?
From: DanYun Liu
Sent: Friday, April 20, 2012 8:57 AM
Subject: UrlConf problem when capture value from url
 
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Daniel Sokolowski
Web Engineer
KL Insight
http://klinsight.com/
Tel: 613-344-2116 | Fax: 613.634.7029
993 Princess Street, Suite 212
Kingston, ON K7L 1H3, Canada


Notice of Confidentiality:
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review re-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error please contact the sender immediately by return electronic transmission and then immediately delete this transmission including all attachments without copying distributing or disclosing same.

DanYun Liu

unread,
Apr 21, 2012, 1:07:16 AM4/21/12
to django...@googlegroups.com
yes, it works well :)
Reply all
Reply to author
Forward
0 new messages