Search code examples
djangojavascript-frameworkjavascriptmvc

Where is the appropriate place to put JavaScriptMVC files in Django project


Django 1.4 has updates its default project layout, so my new project layout becomes

root
    manage.py
    /project
        /settings.py
    /app1
        /static
    /app2
        /static

Now I'd like to use JavascriptMVC framework for my project, where is the best place to place it? It's huge(39M) just for the bare framework.

I don't want to have a framework inside each of my app. So, is there a way to host it in a central place and used by all my apps?


Solution

  • I personally put my project-wide static files in the top level directory (root/static/) and add it to STATICFILES_DIRS

    https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-dirs

    It makes much more sense to me to keep it in the same level as apps. I only put project configuration related files in my root/project/ equivalent folder like settings.py, urls.py, local_dev flags / local settings, etc.