This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Backup script, meant to me run at the geonode mirror. | |
# Make sure to enable passwordless access from the mirror to the original site. | |
# Authors: Jude Mwenda, Ariel Nunez | |
# http://github.com/GFDRR | |
#NOTE: This tool requires pgsql_schema_diff.py to be installed first | |
# cd /usr/bin | |
# https://raw.github.com/gist/380278/140b133ea52e55e63ea2bfae9630e14f22c80ac9/pgsql_schema_diff.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Backup script, meant to me run at the geonode mirror. | |
# Make sure to enable passwordless access from the mirror to the original site. | |
# Authors: Jude Mwenda, Ariel Nunez | |
# http://github.com/GFDRR | |
#NOTE: This tool requires pgsql_schema_diff.py to be installed first | |
# cd /usr/bin | |
# https://raw.github.com/gist/380278/140b133ea52e55e63ea2bfae9630e14f22c80ac9/pgsql_schema_diff.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.auth.models import User | |
from django.shortcuts import render_to_response | |
from django.utils.encoding import force_unicode | |
from tastypie.resources import ModelResource,ALL | |
from tastypie import fields | |
from tastypie.serializers import Serializer | |
import pickle | |
#we deal with stuff related with content | |
from masomo.models import Content,Subject,Topic,Chapter,Page | |
#we now deal with stuff related with setup and devices |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#have to add subject here because of the import | |
class Subject(models.Model): | |
name = models.CharField("Subject", max_length=45) | |
description = models.TextField("Description", max_length=255) | |
def __unicode__(self): | |
return self.name | |
@models.permalink | |
def get_absolute_url(self): | |
return ('curricula',(),{}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' encoding='utf-8'?> | |
<response><objects type="list"><object><description>theee</description><value>ewqqe</value><subject><name>Science</name><chapters type="list"><object><title>Weather and Solar System</title><topics type="list"><object><id>1</id><title>The Sky</title><pages type="list"><object><pagelabel>Page One</pagelabel><id>1</id><resource_uri>/api/masomo/page/1/</resource_uri></object></pages><resource_uri>/api/masomo/topic/1/</resource_uri></object></topics><resource_uri>/api/masomo/chapter/1/</resource_uri><description>wetho</description><id>1</id></object><object><title>Human Anatomy</title><topics type="list"/><resource_uri>/api/masomo/chapter/2/</resource_uri><description>humo</description><id>2</id></object></chapters><description>scio</description></subject></object></objects><meta type="hash"><next type="null"/><total_count type="integer">1</total_count><previous type="null"/><limit type="integer">20</limit><offset type="integer">0</offset></meta></response> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mapnik | |
import cairo | |
m = mapnik.Map(15000, 15000, "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs") # end result: OpenStreetMap projection | |
m.background = mapnik.Color(0, 0, 0, 0) | |
bbox = mapnik.Envelope(-10000000, 2000000, -4000000, -19000000) # must be adjusted | |
m.zoom_to_box(bbox) | |
s = mapnik.Style() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% content_for(:page_title) do %> | |
<%= current_user.username %> | | |
<% end %> | |
<%= content_for(:js) do %> | |
<%= headjs_include_tag "plugins/jquery.min", "admin/show/helpers", "plugins/file_uploader", "admin/index/dashboard", "plugins/jquery.color", "plugins/jquery.cookie", "admin/index/import" %> | |
<% | |
# Get the user space to set the uploader max file size | |
if @quota && @database_size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
<title>Nation Maps - <%= @table.name %> map</title> | |
<style type="text/css"> | |
html, body {height: 100%; margin: 0; padding: 0;} | |
#map_canvas {height: 100%;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import url(https://fonts.googleapis.com/css?family=Telex); | |
/*! | |
* Bootstrap v2.2.1 | |
* | |
* Copyright 2012 Twitter, Inc | |
* Licensed under the Apache License v2.0 | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Designed and built with all the love in the world @twitter by @mdo and @fat. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"> | |
<title>Nation Data | Login</title> |
OlderNewer