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 PluginMount(type): | |
| """ | |
| A Meta Class plugin mount location for a list of plugin classes. | |
| By creating this, on all subclasses of PluginMount, python will | |
| instantiate a plugin attribute list and maintain it for the Class | |
| using this Meta Class. | |
| """ | |
| def __init__(cls, name, bases, attrs): | |
| if not hasattr(cls, 'plugins'): | |
| cls.plugins = [] |
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
| import six | |
| from django.conf import settings | |
| from django.contrib.auth import REDIRECT_FIELD_NAME | |
| from django.contrib.auth.views import redirect_to_login | |
| from django.core.exceptions import ImproperlyConfigured, PermissionDenied | |
| from django.http import HttpResponseRedirect | |
| from django.utils.encoding import force_text | |
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.shortcuts import render_to_response | |
| from django.template import RequestContext | |
| def handler404(request): | |
| response = render_to_response('404.html', {}, | |
| context_instance=RequestContext(request)) | |
| response.status_code = 404 | |
| return 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
| # A simple way to break out Apps within the Django settings.py | |
| # file in a logical way. Third party and Local Apps will vary | |
| # based on the project. | |
| DEFAULT_APPS = ( | |
| 'django.contrib.auth', | |
| 'django.contrib.contenttypes', | |
| 'django.contrib.sessions', | |
| 'django.contrib.sites', | |
| 'django.contrib.messages', |
NewerOlder