Skip to content

Instantly share code, notes, and snippets.

Working from home

KhoPhi seanmavley

Working from home
View GitHub Profile
seanmavley /
Created Jan 23, 2016 — forked from sgnn7/
Mongodb 3.2 on Ubuntu 15.10
echo '[Unit]
Description=High-performance, schema-free document-oriented database
ExecStart=/usr/bin/mongod -f /etc/mongod.conf
from django.contrib import admin
from django.contrib.flatpages.models import FlatPage
# Note: we are renaming the original Admin and Form as we import them!
from django.contrib.flatpages.admin import FlatPageAdmin as FlatPageAdminOld
from django.contrib.flatpages.admin import FlatpageForm as FlatpageFormOld
from django import forms
from ckeditor.widgets import CKEditorWidget
from django import forms
# import models here from django and subclass
from django.db import models
from django.template.defaultfilters import filesizeformat
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
class RestrictedFileFieldModel(models.FileField):
def __init__(self, *args, **kwargs):
self.content_types = kwargs.pop('content_types', None)