Django template not loading javascript and css properly due to urlpatterns
        Posted  
        
            by fmsf
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by fmsf
        
        
        
        Published on 2010-04-03T23:07:51Z
        Indexed on 
            2010/04/03
            23:23 UTC
        
        
        Read the original article
        Hit count: 400
        
django
|urlpatterns
Hey,
When this one runs everything goes fine:
(r"^newobject$", "views.myobjects.newobject"),
All the CSS + JS files are properly fetched from:
static/css/...
static/js/...
When this one runs:
(r"^mybjects/(([a-z]|[A-Z]|[0-9])+)$","views.myobjects.loadobject"),
All the css and JS files that are being fetched, are run trough the urlpatterns and are returning my defailt page:
(r"", 'views.main.index'),
This makes all my CSS and JS code to actualy be HTML. My guess is that i'm giving some noob mistake. Is there any common reason why this should happen? And how to fix it?
© Stack Overflow or respective owner