Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Python 3 support #12

Merged
merged 8 commits into from
This page is out of date. Refresh to see the latest.
View
9 .travis.yml
@@ -2,13 +2,20 @@ language: python
python:
- "2.6"
- "2.7"
+ - "3.3"
script: ./example/manage.py test authority
env:
- TRAVIS_DJANGO_VERSION=1.3
- TRAVIS_DJANGO_VERSION=1.4
- TRAVIS_DJANGO_VERSION=1.5
install:
- - pip install django-extensions django-debug-toolbar django==$TRAVIS_DJANGO_VERSION --use-mirrors
+ - pip install django==$TRAVIS_DJANGO_VERSION --use-mirrors
+matrix:
+ exclude:
+ - python: "3.3"
+ env: TRAVIS_DJANGO_VERSION=1.3
+ - python: "3.3"
+ env: TRAVIS_DJANGO_VERSION=1.4
notifications:
email:
- jason.louard.ward@gmail.com
View
3  README
@@ -58,6 +58,9 @@ Changelog:
* It is now possible to minimize the number of queries when using
django-authority by caching the results of the Permission query. This can be
done by adding ``AUTHORITY_USE_SMART_CACHE = True`` to your settings.py
+* Confirmed support (via travis ci) for all combinations of Python 2.6,
+ Python2.7 and Django 1.3, Django 1.4, Django 1.5. Added Python 3.3 support
+ for Django 1.5
0.4 (2010-01-15):
View
2  authority/sites.py
@@ -110,7 +110,7 @@ def setup(self, model, permission):
'check': check_name}
func.check_name = check_name
if func_name not in permission.checks:
- permission.checks.append(func_name)
+ permission.checks = (list(permission.checks) + [func_name])
setattr(permission, func_name, func)
setattr(model, "permissions", PermissionDescriptor())
View
2  buildout.cfg
@@ -6,8 +6,6 @@ parts =
develop = .
eggs =
django-authority
- django-extensions
- django-debug-toolbar
[python]
recipe = zc.recipe.egg
View
4 example/exampleapp/views.py
@@ -1,3 +1,5 @@
+from __future__ import print_function
+
from django.contrib.flatpages.views import flatpage
from django.contrib.flatpages.models import FlatPage
@@ -12,5 +14,5 @@ def top_secret(request, url, lala=None):
"""
A wrapping view that performs the permission check given in the decorator
"""
- print "secret!"
+ print("secret!")
return flatpage(request, url)
View
3  example/settings.py
@@ -50,7 +50,6 @@
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
- 'debug_toolbar.middleware.DebugToolbarMiddleware',
#'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
)
@@ -78,8 +77,6 @@
'django.contrib.admin',
'authority',
'example.exampleapp',
- 'debug_toolbar',
- 'django_extensions',
)
TEMPLATE_LOADERS = (
View
5 setup.py
@@ -7,7 +7,7 @@ def read(fname):
setup(
name='django-authority',
- version='0.4',
+ version='0.5',
description=(
"A Django app that provides generic per-object-permissions "
"for Django's auth app."
@@ -28,12 +28,13 @@ def read(fname):
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3.3',
'Framework :: Django',
'Framework :: Django :: 1.3',
'Framework :: Django :: 1.4',
'Framework :: Django :: 1.5',
],
- install_requires=['django', 'django-extensions', 'django-debug-toolbar'],
+ install_requires=['django'],
package_data = {
'authority': [
'fixtures/test.json',
Something went wrong with that request. Please try again.