Question

I'm trying to create a website using GAE(Google App Engine) as the server and Having pages rendered using the GAE Django API. The CSS style I'd like to use is the 960 Grid System, specifically the adaptive version found here.

My page is being rendered with Django in GAE as usual:

class MainPage(webapp.RequestHandler): 

    def get(self):
        featuredPic = "img/featuredPic.jpg"

        values = {
                  'featuredPic' : featuredPic,
                  }

        self.response.out.write(template.render('index.html', values))


application = webapp.WSGIApplication([('/', MainPage)], debug=True)

And my index.html file also includes the code neccassarry for an adaptive grid system:

<script src="/js/adapt.js"></script>
<script>
    // Edit to suit your needs.
    var ADAPT_CONFIG = {
        // Where is your CSS?
        path : '/css/',

        // false = Only run once, when page first loads.
        // true = Change on window resize and page tilt.
        dynamic : true,

        // First range entry is the minimum.
        // Last range entry is the maximum.
        // Separate ranges by "to" keyword.
        range : [ '0px    to 760px  = mobile.min.css',
                '760px  to 980px  = 720.min.css',
                '980px  to 1280px = 960.min.css',
                '1280px to 1600px = 1200.min.css',
                '1600px to 1940px = 1560.min.css',
                '1940px to 2540px = 1920.min.css',

                '2540px           = 2520.min.css' ]
    };
</script>

Also I am including the css,js,img, and other folders in the app.yaml, yet despite all this the resulting HTML does not follow the 960 Grid System classes I have set to the divs. Does GAE disable JS or am I making some other mistake?

Was it helpful?

Solution 2

This doesn't exactly answer my question but I instead switched to the successor of 960.gs, Unsemantic, available here. It works really well with my project, as it was pretty much what I was looking for in the adaptive version of 960.gs. Also I had no issues setting it up.

OTHER TIPS

Actually, I am not that good at GAE, but I can help you, i guess.

I've also made a page on GAE and that has also template html file which uses the .js and .css files

At the template html file, I've written the script tag like the below.

<script type="application/x-javascript" src="iui/iui.js"></script>

and i put the .js file at the below path.

<app_name>\iui\iui.js

<app_name> has the models.py, urls.py, views.py, etc.

In addition, I've added the following statements on my app.yaml, "muchart" is <app_name>

app.yaml
...
handlers:
- url: /muchart/js
  static_dir: muchart/js

- url: /muchart/iui
  static_dir: muchart/iui
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top