Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
f1nality committed Jan 5, 2018
2 parents 1972633 + 09c6eca commit d4f6608
Show file tree
Hide file tree
Showing 39 changed files with 872 additions and 70 deletions.
29 changes: 21 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:
- DJANGO="<1.10"
- DJANGO="<1.11"
- DJANGO="<1.12"
- DJANGO="<2.1"
before_install:
- export DJANGO_SETTINGS_MODULE=jet.tests.settings
install:
Expand All @@ -35,22 +36,34 @@ matrix:
env: DJANGO="<1.9"
- python: 2.6
env: DJANGO="<1.10"
- python: 3.2
env: DJANGO="<1.10"
- python: 3.3
env: DJANGO="<1.10"
- python: 2.6
env: DJANGO="<1.11"
- python: 3.2
env: DJANGO="<1.11"
- python: 3.3
env: DJANGO="<1.11"
- python: 2.6
env: DJANGO="<1.12"
- python: 2.6
env: DJANGO="<2.1"

- python: 2.7
env: DJANGO="<2.1"

- python: 3.2
env: DJANGO="<1.10"
- python: 3.2
env: DJANGO="<1.11"
- python: 3.2
env: DJANGO="<1.12"
- python: 3.2
env: DJANGO="<2.1"

- python: 3.3
env: DJANGO="<1.10"
- python: 3.3
env: DJANGO="<1.11"
- python: 3.3
env: DJANGO="<1.12"
- python: 3.3
env: DJANGO="<2.1"

- python: 3.5
env: DJANGO="<1.7"
- python: 3.5
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
=========

1.0.7
-----
* PR-265: Fixed Django 2 support (thanks to HarryLafranc for PR)
* PR-219: Added Persian/Farsi translation (thanks to pyzenberg for PR)
* PR-271: Fix locale names (thanks to leonardoarroyo for PR)


1.0.6
-----
* PR-191: Added sidebar pinning functionality (thanks to grigory51 for PR)
Expand Down
2 changes: 1 addition & 1 deletion jet/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '1.0.6'
VERSION = '1.0.7'
11 changes: 6 additions & 5 deletions jet/dashboard/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from django.core.exceptions import ValidationError
from jet.dashboard.models import UserDashboardModule
from jet.dashboard.utils import get_current_dashboard
from jet.utils import user_is_authenticated


class UpdateDashboardModulesForm(forms.Form):
Expand All @@ -17,7 +18,7 @@ def __init__(self, request, *args, **kwargs):
def clean(self):
data = super(UpdateDashboardModulesForm, self).clean()

if not self.request.user.is_authenticated() or not self.request.user.is_staff:
if not user_is_authenticated(self.request.user) or not self.request.user.is_staff:
raise ValidationError('error')

try:
Expand Down Expand Up @@ -68,7 +69,7 @@ def clean_app_label(self):
def clean(self):
data = super(AddUserDashboardModuleForm, self).clean()

if not self.request.user.is_authenticated() or not self.request.user.is_staff:
if not user_is_authenticated(self.request.user) or not self.request.user.is_staff:
raise ValidationError('error')

if 'app_label' in data:
Expand Down Expand Up @@ -110,7 +111,7 @@ class Meta:
def clean(self):
data = super(UpdateDashboardModuleCollapseForm, self).clean()

if not self.request.user.is_authenticated() or not self.request.user.is_staff:
if not user_is_authenticated(self.request.user) or not self.request.user.is_staff:
raise ValidationError('error')

if self.instance.user != self.request.user.pk:
Expand All @@ -131,7 +132,7 @@ class Meta:
def clean(self):
cleaned_data = super(RemoveDashboardModuleForm, self).clean()

if not self.request.user.is_authenticated() or self.instance.user != self.request.user.pk:
if not user_is_authenticated(self.request.user) or self.instance.user != self.request.user.pk:
raise ValidationError('error')

return cleaned_data
Expand All @@ -156,7 +157,7 @@ def clean(self):
data = super(ResetDashboardForm, self).clean()
data['app_label'] = data['app_label'] if data['app_label'] else None

if not self.request.user.is_authenticated() or not self.request.user.is_staff:
if not user_is_authenticated(self.request.user) or not self.request.user.is_staff:
raise ValidationError('error')

return data
Expand Down
Loading

0 comments on commit d4f6608

Please sign in to comment.