Skip to content

Instantly share code, notes, and snippets.

View bolshoibooze's full-sized avatar

Arthur Mwai bolshoibooze

View GitHub Profile
"""
Two things are wrong with Django's default `SECRET_KEY` system:
1. It is not random but pseudo-random
2. It saves and displays the SECRET_KEY in `settings.py`
This snippet
1. uses `SystemRandom()` instead to generate a random key
2. saves a local `secret.txt`
from django.core.exceptions import PermissionDenied
from django.http import HttpResponse
from pyExcelerator import *
def export_as_xls(modeladmin, request, queryset):
"""
Generic xls export admin action.
usage:actions = [export_as_xls]
#
# CONFIGURATION FOR USING SMS KANNEL WITH RAPIDSMS
#
# For any modifications to this file, see Kannel User Guide
# If that does not help, see Kannel web page (http://www.kannel.org) and
# various online help and mailing list archives
#
# Notes on those who base their configuration on this:
# 1) check security issues! (allowed IPs, passwords and ports)
# 2) groups cannot have empty rows inside them!