I know this has been asked before, but I'm having a hard time setting up JS on my Django web app, even though I'm reading the documentation.

I'm running the Django dev server. My file structure looks like this:

```
mysite/
      __init__.py
      MySiteDB
      manage.py
      settings.py
      urls.py
      myapp/
           __init__.py
           admin.py
           models.py
           test.py
           views.py
           templates/
                index.html

```

Where do I want to put the Javascript and CSS? I've tried it in a bunch of places, including `myapp/`, `templates/` and `mysite/`, but none seem to work.

From **index.html**:

```
<head>
    <title>Degree Planner</title>
    <script type="text/javascript" src="/scripts/JQuery.js"></script>
    <script type="text/javascript" src="/media/scripts/sprintf.js"></script>
    <script type="text/javascript" src="/media/scripts/clientside.js"></script>
</head>

```

From **urls.py**:

```
(r'^admin/', include(admin.site.urls)),
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'media'})
(r'^.*', 'mysite.myapp.views.index'),

```

I suspect that the `serve()` line is the cause of errors like:

```
TypeError at /admin/auth/
'tuple' object is not callable

```

Just to round off the rampant flailing, I changed these settings in **settings.py**:

```
MEDIA_ROOT = '/media/'
MEDIA_URL = 'http://127.0.0.1:8000/media'

```

**UPDATE**: I made some changes, but it's still not working:

**settings.py**:

```
ROOT_PATH = os.path.normpath(os.path.dirname(__file__))

```

**urls.py**:

```
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': os.path.join(settings.ROOT_PATH, 'site_media')}),

```

**index.html**:

```
<script type="text/javascript" src="/media/JQuery.js"></script>
<script type="text/javascript" src="/media/sprintf.js"></script>
<script type="text/javascript" src="/media/clientside.js"></script>

```

**Filesystem**:

```
mysite/
      site_media/
                JQuery.js
                sprintf.js
                clientside.js
      __init__.py
      settings.py
      manage.py
      -- etc
      myapp/
           -- app files, etc

```

When I go to a url like `http://127.0.0.1:8000/media/sprintf.js`, I get:

```
Page not found: /media/sprintf.js

```