Skip to content
This repository has been archived by the owner on Dec 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #20 from ambitioninc/develop
Browse files Browse the repository at this point in the history
1.0.0
  • Loading branch information
somewes authored Dec 8, 2017
2 parents f0b8fc8 + 39f7272 commit 16cd8b6
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 17 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
sudo: false
language: python
python:
- '2.7'
- '3.4'
- '3.5'
- '3.6'
env:
global:
- DB=postgres
matrix:
- DJANGO=">=1.9,<1.10"
- DJANGO=">=1.10,<1.11"
- DJANGO=">=1.11,<2.0"
- DJANGO=">=2.0,<2.1"
install:
- pip install -q coveralls coverage flake8 Django$DJANGO django-nose>=1.4
- pip install -r requirements/docs.txt
Expand Down
8 changes: 8 additions & 0 deletions docs/release_notes.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Release Notes
=============

v1.0.0
------
* Remove python 2.7 support
* Remove python 3.4 support
* Remove Django 1.9 support
* Remove Django 1.10 support
* Add Django 2.0 support

v0.7.0
------
* Add Python 3.6 support
Expand Down
7 changes: 4 additions & 3 deletions restraint/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from __future__ import unicode_literals

from django.db import models, migrations
import django.db.models.deletion


class Migration(migrations.Migration):
Expand Down Expand Up @@ -38,7 +39,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)),
('name', models.CharField(max_length=256, blank=True)),
('display_name', models.TextField(blank=True)),
('perm', models.ForeignKey(to='restraint.Perm')),
('perm', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='restraint.Perm')),
],
options={
},
Expand Down Expand Up @@ -68,13 +69,13 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='permaccess',
name='perm_set',
field=models.OneToOneField(default=None, null=True, to='restraint.PermSet'),
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, default=None, null=True, to='restraint.PermSet'),
preserve_default=True,
),
migrations.AddField(
model_name='permaccess',
name='perm_user_type',
field=models.ForeignKey(default=None, null=True, to='contenttypes.ContentType'),
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, default=None, null=True, to='contenttypes.ContentType'),
preserve_default=True,
),
migrations.AlterUniqueTogether(
Expand Down
6 changes: 3 additions & 3 deletions restraint/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def sync_perm_levels(self, perms):

@python_2_unicode_compatible
class PermLevel(models.Model):
perm = models.ForeignKey(Perm)
perm = models.ForeignKey(Perm, on_delete=models.CASCADE)
name = models.CharField(max_length=256, blank=True)
display_name = models.TextField(blank=True)

Expand Down Expand Up @@ -126,8 +126,8 @@ class PermAccess(models.Model):
Provides access a list of permission levels for a permission set or for an individual
user
"""
perm_set = models.OneToOneField(PermSet, null=True, default=None)
perm_user_type = models.ForeignKey(ContentType, null=True, default=None)
perm_set = models.OneToOneField(PermSet, null=True, default=None, on_delete=models.CASCADE)
perm_user_type = models.ForeignKey(ContentType, null=True, default=None, on_delete=models.CASCADE)
perm_user_id = models.PositiveIntegerField(default=0)
perm_levels = models.ManyToManyField(PermLevel)

Expand Down
2 changes: 1 addition & 1 deletion restraint/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.7.0'
__version__ = '1.0.0'
9 changes: 3 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,19 @@ def get_version():
packages=find_packages(),
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Framework :: Django',
'Framework :: Django :: 1.9',
'Framework :: Django :: 1.10',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
],
license='MIT',
install_requires=[
'Django>=1.9',
'django-manager-utils>=0.13.0',
'Django>=1.11',
'django-manager-utils>=1.0.0',
],
tests_require=[
'psycopg2',
Expand Down

0 comments on commit 16cd8b6

Please sign in to comment.