Skip to content

Instantly share code, notes, and snippets.

View rakanalh's full-sized avatar

Rakan Al-Huneiti rakanalh

  • Open Source
  • Jordan
  • 22:20 (UTC +03:00)
  • X @rakanalh
View GitHub Profile
@rakanalh
rakanalh / fix_permissions.py
Created March 8, 2016 09:42 — forked from magopian/fix_permissions.py
Django admin command to "fix permissions" (create them properly for proxy models). This is needed because of the following bug in Django (not fixed as of 1.6): https://code.djangoproject.com/ticket/11154
# -*- coding: utf-8 -*-
"""Add permissions for proxy model.
This is needed because of the bug https://code.djangoproject.com/ticket/11154
in Django (as of 1.6, it's not fixed).
When a permission is created for a proxy model, it actually creates if for it's
base model app_label (eg: for "article" instead of "about", for the About proxy
model).
# Hacky script for downloading videos from PyVideo and converting them to m4v
# format so they can be synced onto your apple device. Useful if you
# want to see everything that happened at PyCon while commuting.
# This version supports the new PyVideo.org website
#
# Requirements:
# * pip install requests BeautifulSoup
# * youtube-dl (from https://github.com/rg3/youtube-dl/) - you can execute
# pip install youtube-dl to install it
# This was the only YouTube downloader I found that worked. It doesn't