Skip to content
This repository has been archived by the owner on Nov 9, 2018. It is now read-only.

Commit

Permalink
Merge pull request #77 from valenmope/master
Browse files Browse the repository at this point in the history
Support for Django 1.10
  • Loading branch information
stephenmuss committed Oct 21, 2016
2 parents bb6d585 + 869f797 commit c86f76c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -6,3 +6,4 @@ build
.DS_Store
dist
*.egg-info
env/
11 changes: 3 additions & 8 deletions ios_notifications/admin.py
@@ -1,14 +1,9 @@
# -*- coding: utf-8 -*-

try:
from django.conf.urls import patterns, url
except ImportError: # deprecated since Django 1.4
from django.conf.urls.defaults import patterns, url

from django.conf.urls import url
from django.contrib import admin
from django.template.response import TemplateResponse
from django.shortcuts import get_object_or_404

from .models import Device, Notification, APNService, FeedbackService
from .forms import APNServiceForm

Expand All @@ -34,9 +29,9 @@ class NotificationAdmin(admin.ModelAdmin):

def get_urls(self):
urls = super(NotificationAdmin, self).get_urls()
notification_urls = patterns('',
notification_urls = ['',
url(r'^(?P<id>\d+)/push-notification/$', self.admin_site.admin_view(self.admin_push_notification),
name='admin_push_notification'),)
name='admin_push_notification'),]
return notification_urls + urls

def admin_push_notification(self, request, **kwargs):
Expand Down
10 changes: 3 additions & 7 deletions ios_notifications/urls.py
@@ -1,13 +1,9 @@
# -*- coding: utf-8 -*-

try:
from django.conf.urls import patterns, url
except ImportError: # deprecated since Django 1.4
from django.conf.urls.defaults import patterns, url

from django.conf.urls import url
from .api import routes

urlpatterns = patterns('',
urlpatterns = [
url(r'^device/$', routes.device, name='ios-notifications-device-create'),
url(r'^device/(?P<token>\w+)/(?P<service__id>\d+)/$', routes.device, name='ios-notifications-device'),
)
]
2 changes: 1 addition & 1 deletion requirements.txt
@@ -1,4 +1,4 @@
django-fields==0.2.2
django-fields==0.3.0
pyOpenSSL==0.13.1
pycrypto==2.6
wsgiref==0.1.2
5 changes: 4 additions & 1 deletion setup.py
Expand Up @@ -26,7 +26,10 @@
install_requires=[
'Django>=1.3',
'pyOpenSSL>=0.10',
'django-fields>=0.2.2'
'django-fields>=0.3.0'
],
dependency_links=[
'https://github.com/nautilebleu/django-fields/tarball/master#egg=django-fields-0.3.0',
],
zip_safe=False
)

0 comments on commit c86f76c

Please sign in to comment.