/**
*    Copyright (C) 2008 10gen Inc.
*
*    This program is free software: you can redistribute it and/or  modify
*    it under the terms of the GNU Affero General Public License, version 3,
*    as published by the Free Software Foundation.
*
*    This program is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*    GNU Affero General Public License for more details.
*
*    You should have received a copy of the GNU Affero General Public License
*    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

package ed.appserver.frameworks;

import java.io.IOException;

import ed.appserver.AppContext;
import ed.appserver.frameworks.Framework;
import ed.js.JSObject;
import ed.js.JSDict;
import ed.js.JSString;

public class AppEngine extends Framework {
    public void install (AppContext context) throws IOException {
        // Set up mapping "import google" => "import core.modules.py-google".
        JSObject packages = (JSObject)context.getConfigObject("packages");
        if (packages == null) {
            packages = new JSDict();
        }
        packages.set("google", "py-google");
        context.setConfigObject("packages", packages);

        // Run _init_ae.py (sets up adapterType and mapUrlToJxpFile)
        context.runInitFile("/~~/modules/py-google/_init_ae.py");
    };
}

@@ -986,24 +986,43 @@
    /
-/ Set up
+*%0A         * Set up package
  mapping
  %22im
@@ -1021,60 +1021,44 @@
 ping
- %22imp
+s f
 or
-t
  google
-%22 =%3E %22import core.modules.py-google%22.
+ and django.%0A         */
 %0A   
@@ -1208,16 +1208,179 @@
       %7D%0A
+%0A        JSObject django = new JSDict();%0A        django.set(%22module%22, %22py-google%22);%0A        django.set(%22path%22, %22django%22);%0A        packages.set(%22django%22, django);%0A%0A
         
@@ -1408,32 +1408,33 @@
 , %22py-google%22);%0A
+%0A
         context.
@@ -1482,17 +1482,28 @@
        /
-/
+*%0A         *
  Run _in
@@ -1553,16 +1553,28 @@
 xpFile)%0A
+         */%0A
         

add package mapping for django. use block comments for geir.