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

Commit

Permalink
Merge a999d20 into 7a0a5d7
Browse files Browse the repository at this point in the history
  • Loading branch information
bashu committed Jan 18, 2018
2 parents 7a0a5d7 + a999d20 commit 29bd873
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 21 deletions.
23 changes: 6 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,18 @@
language: python

python:
- "3.3"
- "3.4"
- "2.7"
- "2.6"

env:
- DJANGO="Django==1.5"
- DJANGO="Django==1.6"
- DJANGO="Django==1.7"
- DJANGO="Django==1.8"
- DJANGO="Django==1.9"

matrix:
exclude:
# Python 2.6 support has been dropped in Django 1.7
- python: "2.6"
env: DJANGO="Django==1.7"
- python: "2.6"
env: DJANGO="Django==1.8"

# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
# command to install dependencies, e.g. pip install -r requirements.txt
install:
- pip install $DJANGO --use-mirrors
- pip install wheel==0.24.0 --use-mirrors
- pip install -r requirements-test.txt --use-mirrors
- pip install $DJANGO
- pip install wheel==0.24.0
- pip install -r requirements-test.txt

# command to run tests using coverage, e.g. python setup.py test
script: coverage run --source usersettings runtests.py
Expand Down
2 changes: 1 addition & 1 deletion usersettings/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def select_site_view(self, request, form_url=''):
context = {
'title': _('Add %s') % force_text(self.opts.verbose_name),
'adminform': adminForm,
'is_popup': '_popup' in request.REQUEST,
'is_popup': '_popup' in request.GET,
'media': mark_safe(media),
'errors': AdminErrorList(form, ()),
'app_label': self.opts.app_label,
Expand Down
6 changes: 3 additions & 3 deletions usersettings/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
from django.utils.translation import ugettext_lazy as _
from django.db.models.signals import pre_save, pre_delete

from .models import clear_usersettings_cache
from .shortcuts import get_usersettings_model


class UserSettingsConfig(AppConfig):
name = 'usersettings'
verbose_name = _('User Settings')

def ready(self):
from .models import clear_usersettings_cache
from .shortcuts import get_usersettings_model

usersettings_model = get_usersettings_model()
pre_save.connect(clear_usersettings_cache, sender=usersettings_model)
pre_delete.connect(clear_usersettings_cache, sender=usersettings_model)

0 comments on commit 29bd873

Please sign in to comment.