package updates and resulting compat stuff

changes to urls.py in the django views, trivial __init__ change for the
irc library stuff

bss/dr.botzo#16
This commit is contained in:
Brian S. Stephan 2017-02-06 22:58:51 -06:00
parent 5184a30a52
commit 8f8af4e6b4
8 changed files with 53 additions and 58 deletions

View File

@ -1,8 +1,10 @@
"""URL patterns for choices."""
from django.conf.urls import patterns, url
from django.conf.urls import url
urlpatterns = patterns('choices.views',
url(r'^$', 'index', name='choices_index'),
url(r'^(?P<set_name>.+)/$', 'choiceset_detail', name='choices_choiceset_detail'),
)
from choices.views import index, choiceset_detail
urlpatterns = [
url(r'^$', index, name='choices_index'),
url(r'^(?P<set_name>.+)/$', choiceset_detail, name='choices_choiceset_detail'),
]

View File

@ -1,12 +1,12 @@
"""URL patterns for the dispatcher API."""
from django.conf.urls import patterns, url
from django.conf.urls import url
from dispatch.views import (DispatchMessage, DispatchMessageByKey, DispatcherList, DispatcherDetail,
DispatcherDetailByKey, DispatcherActionList, DispatcherActionDetail)
urlpatterns = patterns('dispatch.views',
urlpatterns = [
url(r'^api/dispatchers/$', DispatcherList.as_view(), name='dispatch_api_dispatchers'),
url(r'^api/dispatchers/(?P<pk>[0-9]+)/$', DispatcherDetail.as_view(), name='dispatch_api_dispatcher_detail'),
url(r'^api/dispatchers/(?P<pk>[0-9]+)/message$', DispatchMessage.as_view(), name='dispatch_api_dispatch_message'),
@ -17,4 +17,4 @@ urlpatterns = patterns('dispatch.views',
url(r'^api/actions/$', DispatcherActionList.as_view(), name='dispatch_api_actions'),
url(r'^api/actions/(?P<pk>[0-9]+)/$', DispatcherActionDetail.as_view(), name='dispatch_api_action_detail'),
)
]

View File

@ -1,6 +1,6 @@
"""General/baselite/site-wide URLs."""
from django.conf.urls import patterns, include, url
from django.conf.urls import include, url
from django.contrib import admin
from django.views.generic import TemplateView
@ -9,7 +9,7 @@ from adminplus.sites import AdminSitePlus
admin.site = AdminSitePlus()
admin.autodiscover()
urlpatterns = patterns('',
urlpatterns = [
url(r'^$', TemplateView.as_view(template_name='index.html'), name='home'),
url(r'^choices/', include('choices.urls')),
@ -20,4 +20,4 @@ urlpatterns = patterns('',
url(r'^accounts/', include('registration.backends.default.urls')),
url(r'^admin/', include(admin.site.urls)),
)
]

View File

@ -60,11 +60,10 @@ class DrReactor(irc.client.Reactor):
def __do_nothing(*args, **kwargs):
pass
def __init__(self, on_connect=__do_nothing, on_disconnect=__do_nothing, on_schedule=__do_nothing):
def __init__(self, on_connect=__do_nothing, on_disconnect=__do_nothing):
"""Initialize our custom stuff."""
super(DrReactor, self).__init__(on_connect=on_connect, on_disconnect=on_disconnect,
on_schedule=on_schedule)
super(DrReactor, self).__init__(on_connect=on_connect, on_disconnect=on_disconnect)
self.regex_handlers = {}
def server(self):

View File

@ -1,6 +1,6 @@
"""URL patterns for the karma views."""
from django.conf.urls import patterns, url, include
from django.conf.urls import url, include
from rest_framework.routers import DefaultRouter
from karma.views import key_detail, index, KarmaKeyViewSet
@ -8,9 +8,9 @@ from karma.views import key_detail, index, KarmaKeyViewSet
router = DefaultRouter()
router.register(r'keys', KarmaKeyViewSet)
urlpatterns = patterns('races.views',
urlpatterns = [
url(r'^$', index, name='karma_index'),
url(r'^key/(?P<karma_key>.+)/', key_detail, name='karma_key_detail'),
url(r'^api/', include(router.urls)),
)
]

View File

@ -1,9 +1,11 @@
"""URL patterns for markov stuff."""
from django.conf.urls import patterns, url
from django.conf.urls import url
from django.views.generic import TemplateView
urlpatterns = patterns('markov.views',
from markov.views import context_index
urlpatterns = [
url(r'^$', TemplateView.as_view(template_name='index.html'), name='markov_index'),
url(r'^context/(?P<context_id>\d+)/$', 'context_index', name='markov_context_index'),
)
url(r'^context/(?P<context_id>\d+)/$', context_index, name='markov_context_index'),
]

View File

@ -1,6 +1,8 @@
from django.conf.urls import patterns, url
from django.conf.urls import url
urlpatterns = patterns('races.views',
url(r'^$', 'index', name='races_index'),
url(r'^race/(?P<race_id>[A-Za-z0-9]+)/$', 'race_detail', name='race_detail'),
)
from races.views import index, race_detail
urlpatterns = [
url(r'^$', index, name='races_index'),
url(r'^race/(?P<race_id>[A-Za-z0-9]+)/$', race_detail, name='race_detail'),
]

View File

@ -4,39 +4,29 @@
#
# pip-compile --output-file requirements.txt requirements.in
#
appdirs==1.4.0 # via setuptools
django-adminplus==0.3
django-bootstrap3==7.0.1
django-extensions==1.5.3
django-adminplus==0.5
django-bootstrap3==8.1.0
django-extensions==1.7.6
django-registration-redux==1.4
django==1.8.8
djangorestframework==3.1.3
Django==1.10.5
djangorestframework==3.5.3
inflect==0.2.5 # via jaraco.itertools
irc==12.1.4
jaraco.apt==1.0 # via jaraco.context
jaraco.classes==1.2 # via jaraco.collections
jaraco.collections==1.1 # via irc, jaraco.text
jaraco.context==1.3 # via jaraco.text
jaraco.functools==1.3 # via jaraco.text
jaraco.itertools==1.3 # via irc
jaraco.logging==1.2 # via irc
jaraco.text==1.3 # via irc, jaraco.collections
jaraco.timing==1.2.2 # via yg.lockfile
more-itertools==2.2 # via jaraco.itertools
oauthlib==1.0.3 # via requests-oauthlib
packaging==16.8 # via setuptools
irc==15.0.6
jaraco.classes==1.4 # via jaraco.collections
jaraco.collections==1.5 # via irc, jaraco.text
jaraco.functools==1.15.1 # via irc, jaraco.text
jaraco.itertools==2.0 # via irc
jaraco.logging==1.5 # via irc
jaraco.stream==1.1.1 # via irc
jaraco.text==1.9 # via irc, jaraco.collections
more-itertools==2.5.0 # via irc, jaraco.functools, jaraco.itertools
oauthlib==2.0.1 # via requests-oauthlib
ply==3.10
pyparsing==2.1.10 # via packaging
python-dateutil==2.4.2
python-gitlab==0.13
python-dateutil==2.6.0
python-gitlab==0.18
pytz==2016.10
requests-oauthlib==0.6.0 # via twython
requests==2.9.1 # via python-gitlab, requests-oauthlib, twython
six==1.10.0 # via django-extensions, irc, jaraco.apt, jaraco.classes, jaraco.collections, jaraco.itertools, jaraco.logging, packaging, python-dateutil, python-gitlab, setuptools
tempora==1.4 # via jaraco.logging
twython==3.3.0
yg.lockfile==2.1 # via jaraco.context
zc.lockfile==1.1.0 # via yg.lockfile
# The following packages are considered to be unsafe in a requirements file:
# setuptools # via zc.lockfile
requests-oauthlib==0.7.0 # via twython
requests==2.13.0 # via python-gitlab, requests-oauthlib, twython
six==1.10.0 # via django-extensions, irc, jaraco.classes, jaraco.collections, jaraco.itertools, jaraco.logging, jaraco.stream, more-itertools, python-dateutil, python-gitlab, tempora
tempora==1.6.1 # via irc, jaraco.logging
twython==3.4.0