Skip to content

Commit

Permalink
Allow serving the private directory in offline mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dusty Phillips committed Apr 3, 2012
1 parent dd15a0e commit 4cfef5e
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 11 deletions.
2 changes: 1 addition & 1 deletion www/.aspen/base.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html {% block cache_manifest %}{% end %}>
<head>
<title>Welcome to Todoy</title>
<script type="text/javascript" src="/js/jquery-1.7.1.min.js"></script>
Expand Down
1 change: 1 addition & 0 deletions www/.aspen/mime.types
@@ -0,0 +1 @@
text/cache-manifest manifest
15 changes: 15 additions & 0 deletions www/home/cache.manifest
@@ -0,0 +1,15 @@
CACHE MANIFEST

CACHE:
/home/
/home/index.html
/css/master.css
/js/jquery-1.7.1.min.js
/js/jquery.validate.min.js
/js/py-builtins.js
/js/todoy.js

FALLBACK:
/ /offline.html
/account/* /offline.html

1 change: 1 addition & 0 deletions www/home/index.html
Expand Up @@ -4,6 +4,7 @@
login_required(request)
^L
{% extends 'base.html' %}
{% block cache_manifest %} manifest="cache.manifest"{% end %}

{% block content %}
Hello {{request.user.username}}, Welcome to your private page.
Expand Down
10 changes: 0 additions & 10 deletions www/js/pyjados.js

This file was deleted.

7 changes: 7 additions & 0 deletions www/offline.html
@@ -0,0 +1,7 @@
^L
^L
{% extends 'base.html' %}

{% block content %}
You are offline. Main page is not available. Your <a href="/home/index.html">Private Page</a> may have been cached, though.
{% end %}

0 comments on commit 4cfef5e

Please sign in to comment.