This file contains hidden or 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
You'll want to replace 'localwiki.org' with your hostname here. | |
---------------------- | |
Add to localsettings.py: | |
OLWIDGET_CUSTOM_LAYER_TYPES = { | |
'cachedcloudmade': """OpenLayers.Layer.CachedCloudMade('CachedCloudMade', | |
['//map-a.localwiki.org/tile/ca694687020d468283a545db191bcb81/35165/256/', | |
'//map-b.localwiki.org/tile/ca694687020d468283a545db191bcb81/35165/256/', | |
'//map-c.localwiki.org/tile/ca694687020d468283a545db191bcb81/35165/256/'])""", | |
} |
This file contains hidden or 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
{% load static from staticfiles %} | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame | |
Remove this if you use the .htaccess --> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> |
This file contains hidden or 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
class SlugifyMixin(object): | |
def obj_get(self, request=None, **kwargs): | |
slug = getattr(self._meta, 'slug_lookup_field', 'slug') | |
kwargs[slug] = slugify(kwargs[slug]) | |
return super(SlugifyMixin, self).obj_get(request=request, **kwargs) | |
def override_urls(self): | |
slug = getattr(self._meta, 'slug_lookup_field', 'slug') | |
return [ | |
url(r"^(?P<resource_name>%s)/(?P<%s>.+?)/*$" % |
This file contains hidden or 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
wikispot@leo:~/Sycamore$ diff request.py.old request.py | |
34a35,172 | |
> MAX_POST_PER_MINUTE = 40 | |
> | |
> DO_SOPA = True | |
> SOPA_HTML = """<html lang="en"> | |
> <head> | |
> <title>Davis Wiki - Day of Protest</title> | |
> | |
> <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'> |
This file contains hidden or 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
<html lang="en"> | |
<head> | |
<title>Day of Protest</title> | |
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'> | |
<style type="text/css"> |
This file contains hidden or 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
Run: | |
localwiki-manage shell | |
then enter this, afer editing the `ago` value: | |
import datetime | |
now = datetime.datetime.now() | |
############### |
This file contains hidden or 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.middleware.cache import UpdateCacheMiddleware | |
from django.utils.cache import learn_cache_key, get_max_age | |
class UpdateCacheMiddlewareNoHeaders(UpdateCacheMiddleware): | |
""" | |
Just like UpdateCacheMiddleware but we don't set cache headers in the | |
HTTP response. | |
""" |
This file contains hidden or 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 | |
# For Ubuntu 8.x and 9.x releases. | |
if [ -d "/usr/share/postgresql-8.3-postgis" ] | |
then | |
POSTGIS_SQL_PATH=/usr/share/postgresql-8.3-postgis | |
POSTGIS_SQL=lwpostgis.sql | |
fi | |
# For Ubuntu 10.04 |
This file contains hidden or 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
== Updating to 0.2 == | |
1. Move your current localsettings.py out of the sapling directory and rename it: | |
$ mv sapling/localsettings.py sapling/../localsettings.py.bak | |
2. Activate your virtualenv: | |
$ source env/bin/activate |
This file contains hidden or 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
diff --git a/sapling/ckeditor/templates/ckeditor/ckeditor_script.html b/sapling/ckeditor/templates/ckeditor/ckeditor_script.html | |
index 7e3f404..6f536be 100644 | |
--- a/sapling/ckeditor/templates/ckeditor/ckeditor_script.html | |
+++ b/sapling/ckeditor/templates/ckeditor/ckeditor_script.html | |
@@ -1,5 +1,6 @@ | |
<script type="text/javascript"> | |
<!-- | |
+CKEDITOR.basePath = '{{ STATIC_URL }}js/ckeditor/'; | |
CKEDITOR.replace('id_{{ name }}'{% if config %}, {{ config|safe }}{% endif %}); | |
--> |