views:

26

answers:

1

look this simple django on gae :

http://code.google.com/p/google-app-engine-samples/source/browse/trunk/django_example

and this is my code:

DIRNAME = os.path.dirname(__file__)
MEDIA_ROOT = os.path.join(DIRNAME, 'Media')
MEDIA_URL = '/mymedia/'


(r'^mymedia/(?P<path>.*)$', 'django.views.static.serve',{'document_root':settings.MEDIA_ROOT}),

<script type="text/javascript" src="/mymedia/js/jquery-1.4.min.js"></script>
<script type="text/javascript" src="/mymedia/js/reg.js"></script>

but i can't load the js file

can any one load this successful ??

thanks

+2  A: 

AFAIR you need to define handling of static files in app.yaml on Google app engine. The django.views.static.serve works only in standalone web server in Django.

Michal Čihař