Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added LICENSE and AUTHORS files; updated version in setup.py; added B…

…aseViews.deny() shortcut
  • Loading branch information...
commit 67f2b3f4927206ecb3ae3cde1bf089e55b8d319f 1 parent 7927f09
@rudyryk rudyryk authored
Showing with 38 additions and 1 deletion.
  1. +5 −0 AUTHORS
  2. +24 −0 LICENSE
  3. +1 −1  setup.py
  4. +8 −0 smarter/views.py
View
5 AUTHORS
@@ -0,0 +1,5 @@
+Alexey Kinyov <rudy@05bit.com>
+
+Contributors:
+Fabio Santos
+Sameer Al-Sakran
View
24 LICENSE
@@ -0,0 +1,24 @@
+Copyright (c) 2012, Alexey Kinyov
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Alexey Kinyov nor the
+ names of contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL ALEXEY KINYOV BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View
2  setup.py
@@ -3,7 +3,7 @@
from os.path import join, dirname
from setuptools import setup
-version = 0.4
+version = '0.4.1'
LONG_DESCRIPTION = """
Django application for smarter application building.
View
8 smarter/views.py
@@ -1,5 +1,6 @@
#-*- coding: utf-8 -*-
from django.core import serializers
+from django.core.exceptions import PermissionDenied
from django.conf.urls.defaults import patterns
from django.forms.models import modelform_factory, ModelForm
from django.http import HttpResponse, Http404
@@ -9,6 +10,7 @@
from django.utils import simplejson
from django.utils.functional import update_wrapper
+
class BaseViews(object):
"""
Base class for views. It doesn't implement any real
@@ -91,6 +93,12 @@ def check_permissions(self, **kwargs):
"""
pass
+ def deny(self):
+ """
+ Shortcut for raising PermissionDenied.
+ """
+ raise PermissionDenied
+
### Response
def get_template_names(self):
Please sign in to comment.
Something went wrong with that request. Please try again.