Reputation: 31
I'm working on a google app engine (with Django) and I just can't figure out what's a good practice for folder hierarchy.. I've looked at this: Project structure for Google App Engine but one thing isn't clear - what if I have static folder (like js files) that are unique to my app, not project? where do they go? my current hierarchy is:
proj
** js
** css
** templates
So when a template inside my app sends a GET for js/script.js. this gets redirected to /myapp/js/script.js, which my server doesn't recognize.
here is my project url.py:
urlpatterns = patterns('',
(r'^myapp/', include('myapp.urls')),
)
and here is my myapp.urls.py:
urlpatterns = patterns('myapp.views',
(r'^$', 'myapp.views.index'),
)
how should I rearrange this to work?
thanks!
Upvotes: 0
Views: 162
Reputation: 101139
Why not just use absolute URLs? Prefix your references to static resources with a /
, and all will be well.
Upvotes: 1